]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/vga: Register vgaarb client later
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 8 Dec 2025 18:26:19 +0000 (20:26 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 23 Jan 2026 02:34:09 +0000 (04:34 +0200)
commit70ea362b84449b7061cefd63a532f648d2919916
tree648abcaee0ead3c0b0266c7b3c26122c56e603f1
parent37d5f4da49821cd542561d5cfffea35d32f5bef6
drm/i915/vga: Register vgaarb client later

Currently we register to vgaarb way too early. Thus it is
possible that the entire VGA decode logic gets nuked via
GMCH_CTRL before intel_vga_disable() has even disabled the
VGA plane. This could even cause a system hang because
we'll be unable to turn off the VGA plane gracefully.

Move the vgaarb registration into intel_display_driver_register().
I suppose we could do it a bit earlier (after intel_vga_disable()),
but not convinced there's any point.

Also the error handling here is pointless since the
registration can't fail (unless the device isn't a VGA class
in which case all VGA decode logic should aleady be disabled
by the BIOS via GMCH_CTRL). But let's toss in a WARN to catch
any future breakage of vga_client_register().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251208182637.334-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display_driver.c
drivers/gpu/drm/i915/display/intel_vga.c
drivers/gpu/drm/i915/display/intel_vga.h