drm/i915: Use pw_idx to derive PHY for ICL_LANE_ENABLE_AUX override
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 29 Feb 2024 20:03:56 +0000 (22:03 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 7 Mar 2024 18:00:59 +0000 (20:00 +0200)
commit59b806d06f36410791b9dbfe11a602a680a2e5d2
treef034406660d3e9ec3c5513160f0e4ed263f29689
parenta9d32a4613082db444de623a513cb04809160e30
drm/i915: Use pw_idx to derive PHY for ICL_LANE_ENABLE_AUX override

We don't actually know whether we should be picking the PHY
simply based on the AUX_CH/power well, or based on the VBT
defined AUX_CH->DDI->PHY relationship. At the moment we are
doing the former for the ANAOVRD workaround, and the latter
for the ICL_LANE_ENABLE_AUX override. Windows seems to use the
first approach for everything. So let's unify this to follow
that same approach for both.

Eventually we should try to figure out  which is actually
correct, or whether any of this even matters (ie. whether there
are any real machines where the DDI and its AUX_CH do not match
1:1).

Note that this also changes the behaviour if we do end up
poking an AUX power well not associated with any port (as
per VBT). Previously we would have skipped the PHY register
write, but now we always write it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240229200357.7969-3-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/display/intel_display_power_well.c