Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video/aperture: Move vga handling to pci function

A few reasons for this:

- It's really the only one where this matters. I tried looking around,
and I didn't find any non-pci vga-compatible controllers for x86
(since that's the only platform where we had this until a few
patches ago), where a driver participating in the aperture claim
dance would interfere.

- I also don't expect that any future bus anytime soon will
not just look like pci towards the OS, that's been the case for like
25+ years by now for practically everything (even non non-x86).

- Also it's a bit funny if we have one part of the vga removal in the
pci function, and the other in the generic one.

v2: Rebase.

v4:
- fix Daniel's S-o-b address

v5:
- add back an S-o-b tag with Daniel's Intel address

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230406132109.32050-6-tzimmermann@suse.de

authored by

Daniel Vetter and committed by
Thomas Zimmermann
f1d599d3 7450cd23

+7 -8
+7 -8
drivers/video/aperture.c
··· 298 298 299 299 aperture_detach_devices(base, size); 300 300 301 - /* 302 - * If this is the primary adapter, there could be a VGA device 303 - * that consumes the VGA framebuffer I/O range. Remove this device 304 - * as well. 305 - */ 306 - if (primary) 307 - aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE); 308 - 309 301 return 0; 310 302 } 311 303 EXPORT_SYMBOL(aperture_remove_conflicting_devices); ··· 335 343 } 336 344 337 345 if (primary) { 346 + /* 347 + * If this is the primary adapter, there could be a VGA device 348 + * that consumes the VGA framebuffer I/O range. Remove this 349 + * device as well. 350 + */ 351 + aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE); 352 + 338 353 /* 339 354 * WARNING: Apparently we must kick fbdev drivers before vgacon, 340 355 * otherwise the vga fbdev driver falls over.