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

video/aperture: Only kick vgacon when the pdev is decoding vga

Otherwise it's a bit silly, and we might throw out the driver for the
screen the user is actually looking at. I haven't found a bug report
for this case yet, but we did get bug reports for the analog case
where we're throwing out the efifb driver.

v2: Flip the check around to make it clear it's a special case for
kicking out the vgacon driver only (Thomas)

v4:
- fixes to commit message
- fix Daniel's S-o-b address

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

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216303
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-5-tzimmermann@suse.de

authored by

Daniel Vetter and committed by
Thomas Zimmermann
7450cd23 62aeaeaa

+9 -7
+9 -7
drivers/video/aperture.c
··· 342 342 return ret; 343 343 } 344 344 345 - /* 346 - * WARNING: Apparently we must kick fbdev drivers before vgacon, 347 - * otherwise the vga fbdev driver falls over. 348 - */ 349 - ret = vga_remove_vgacon(pdev); 350 - if (ret) 351 - return ret; 345 + if (primary) { 346 + /* 347 + * WARNING: Apparently we must kick fbdev drivers before vgacon, 348 + * otherwise the vga fbdev driver falls over. 349 + */ 350 + ret = vga_remove_vgacon(pdev); 351 + if (ret) 352 + return ret; 353 + } 352 354 353 355 return 0; 354 356