summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2025-12-08 21:26:26 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2026-01-23 06:20:27 +0300
commit01f827140bcbde9f6b4ce68bc7657f9bb9739a69 (patch)
tree3681d8cdb87cbbede51d4e53a4497f24229a0f47 /include
parentcc6ed470caa201b25e9e7e1ca21144e17914644c (diff)
downloadlinux-01f827140bcbde9f6b4ce68bc7657f9bb9739a69.tar.xz
drm/i915/vga: Stop trying to use GMCH_CTRL for VGA decode control
intel_gmch_vga_set_state() is a complete lie on ILK+ because the GMCH_CTRL register is locked and can't actually be written. But we still need to remove the iGPU from the VGA arbitration on iGPU+dGPU systems, or else Xorg performance will tank due to the constant VGA arbiter accesses. For VGA memory decode we can't turn off the PCI_COMMAND memory deocde as that would disable even normal MMIO. Instead we can disable just the VGA memory decode via the VGA MSR register. And we can do that just once when disabling the VGA plane. That way we don't have to touch VGA registers anywhere else. We can also inform the arbiter that we're no longer decoding VGA memory. This will stop the arbiter from disabling all memory decode for the iGPU via PCI_COMMAND (and thus breaking everything) whenever some other GPU wants to own the VGA memory accesses. For IO we can disable all IO decode via the PCI_COMMAND register, except around the few VGA register accesses that we need to do in intel_vga_disable(). Unfortunately we can't disable IO decode permanently as it makes some laptops (eg. Dell Latitude E5400) hang during reboot/shutdown. One option would be to re-enable IO decode from the poweroff hooks, but that won't help the sysrq emergency reboot/shutdown since it won't call said hooks. So let's try to keep IO decode in its original setting unless we really need to disable it to exclude the GPU from VGA arbitration. I suppose we could keep frobbing GMCH_CTRL on pre-ILK, but it seems better to not do it since it has other side effects such as changing the class code of the PCI device. For discrete GPUs we'll rely on the bridge control instead. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20251208182637.334-9-ville.syrjala@linux.intel.com Acked-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions