drm/i915/vga: Consolidate intel_vga_disable() calls
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 17 Apr 2025 11:44:54 +0000 (14:44 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 25 Apr 2025 15:48:33 +0000 (18:48 +0300)
commitfcd95af591e8cd5880c0c553641beb0e97ba92f6
tree0d0eb8bc18a580c714aaee53e951a07988596edf
parenta1b3a81bf7365bb2270756e906b4011faa9afbe5
drm/i915/vga: Consolidate intel_vga_disable() calls

Currently we disable the VGA plane from various places, sometimes
multiple times in the same init/resume sequence. Get rid of all this
mess and do it just once. The most correct place seems to be just
after intel_early_display_was() as that one applies various workarounds
that need to be in place before we touch any planes (including the
VGA plane).

Actually, we do still have a second caller in
vlv_display_power_well_init(). I think we still need that as the reset
value of VGACNTR is 0x0 and thus technically the VGA plane will be
(at least partially) enabled after the power well has been toggled.

In both cases we have the necessary power reference already held
(INIT power domain for load/resume case, and the display power well
itself being what we need for vlv_display_power_well_init()).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250417114454.12836-7-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_modeset_setup.c
drivers/gpu/drm/i915/display/intel_vga.c
drivers/gpu/drm/i915/display/intel_vga.h
drivers/gpu/drm/i915/i915_driver.c