summaryrefslogtreecommitdiff
path: root/drivers/video/aperture.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-07-18 09:23:22 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-07-19 13:19:11 +0200
commit15fced5b051e6e22c228a521a5894b12c2ba0892 (patch)
tree1dca50cceea7580345a996e8ce33d6f1ac01b626 /drivers/video/aperture.c
parent72a6a3e03bdc957996a74c1053eab1b2c073db8e (diff)
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.c21
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);