drm/i915: Sanitize the port -> DDI/AUX power domain mapping for each platform
authorImre Deak <imre.deak@intel.com>
Thu, 14 Apr 2022 21:06:53 +0000 (00:06 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 20 Apr 2022 17:42:12 +0000 (20:42 +0300)
commit979e1b32e0e202197f182ec0abfadecbdd53b1ec
tree6e1619c960caef1e2f23adb717b7a850ecc41726
parenteb6dedcc194a5bdbe7e47ad111771abb4ebdd2b8
drm/i915: Sanitize the port -> DDI/AUX power domain mapping for each platform

Atm the port -> DDI and AUX power domain mapping is specified by relying
on the aliasing of the platform specific intel_display_power_domain enum
values. For instance D12+ platforms refer to the 'D' port and power
domain instances, which doesn't match the bspec terminology, on these
platforms the corresponding port is TC1. To make it clear what
port/domain the code refers to add a mapping between them which matches
the bspec terms on different display versions.

This also allows for removing the aliasing in enum values in a follow-up
patch.

v2: Add the functions to intel_display_power.c, use
    intel_display_power_ prefix.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220414210657.1785773-14-imre.deak@intel.com
drivers/gpu/drm/i915/display/g4x_dp.c
drivers/gpu/drm/i915/display/g4x_hdmi.c
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display.h
drivers/gpu/drm/i915/display/intel_display_power.c
drivers/gpu/drm/i915/display/intel_display_power.h
drivers/gpu/drm/i915/display/intel_tc.c