diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-07-18 09:23:22 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-07-19 13:19:11 +0200 |
commit | 15fced5b051e6e22c228a521a5894b12c2ba0892 (patch) | |
tree | 1dca50cceea7580345a996e8ce33d6f1ac01b626 /drivers/video/aperture.c | |
parent | 72a6a3e03bdc957996a74c1053eab1b2c073db8e (diff) | |
download | linux-15fced5b051e6e22c228a521a5894b12c2ba0892.tar.gz linux-15fced5b051e6e22c228a521a5894b12c2ba0892.tar.bz2 linux-15fced5b051e6e22c228a521a5894b12c2ba0892.zip |
fbdev: Remove conflict-handling code
Remove the call to do_remove_conflicting_framebuffers() from the
framebuffer registration. Aperture helpers take care of removing
conflicting devices. With all ownership information stored in the
aperture datastrcutures, remove remove_conflicting_framebuffers()
entirely.
This change also rectifies DRM generic-framebuffer registration, which
tried to unregister conflicting framebuffers, even though it's entirely
build on top of DRM.
v2:
* remove internal aperture-overlap helpers, which are
now unused
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220718072322.8927-12-tzimmermann@suse.de
Diffstat (limited to 'drivers/video/aperture.c')
-rw-r--r-- | drivers/video/aperture.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c index abc691284a77..9e6bcc03a1a4 100644 --- a/drivers/video/aperture.c +++ b/drivers/video/aperture.c @@ -2,7 +2,6 @@ #include <linux/aperture.h> #include <linux/device.h> -#include <linux/fb.h> /* for old fbdev helpers */ #include <linux/list.h> #include <linux/mutex.h> #include <linux/pci.h> @@ -286,11 +285,6 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, bool primary, const char *name) { -#if IS_REACHABLE(CONFIG_FB) - struct apertures_struct *a; - int ret; -#endif - /* * If a driver asked to unregister a platform device registered by * sysfb, then can be assumed that this is a driver for a display @@ -312,21 +306,6 @@ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t si if (primary) aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE); -#if IS_REACHABLE(CONFIG_FB) - a = alloc_apertures(1); - if (!a) - return -ENOMEM; - - a->ranges[0].base = base; - a->ranges[0].size = size; - - ret = remove_conflicting_framebuffers(a, name, primary); - kfree(a); - - if (ret) - return ret; -#endif - return 0; } EXPORT_SYMBOL(aperture_remove_conflicting_devices); |