]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display: Add intel_legacy_aux_to_power_domain()
authorJosé Roberto de Souza <jose.souza@intel.com>
Tue, 14 Apr 2020 19:49:50 +0000 (12:49 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Fri, 17 Apr 2020 21:55:29 +0000 (14:55 -0700)
This is a similar function to intel_aux_power_domain() but it do not
care about TBT ports, this will be needed by ICL TC sequences.

v2:
- renamed to intel_legacy_aux_to_power_domain()

Cc: Imre Deak <imre.deak@intel.com>
Cc: Cooper Chiou <cooper.chiou@intel.com>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Tested-by: You-Sheng Yang <vicamo.yang@canonical.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200414194956.164323-2-jose.souza@intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display.h

index 5d44f828b15026f801845086abfbdb3dfe400e10..bae1d89875d6e7384cde4fbc2f12db8af77af78c 100644 (file)
@@ -7296,7 +7296,17 @@ intel_aux_power_domain(struct intel_digital_port *dig_port)
                }
        }
 
-       switch (dig_port->aux_ch) {
+       return intel_legacy_aux_to_power_domain(dig_port->aux_ch);
+}
+
+/*
+ * Converts aux_ch to power_domain without caring about TBT ports for that use
+ * intel_aux_power_domain()
+ */
+enum intel_display_power_domain
+intel_legacy_aux_to_power_domain(enum aux_ch aux_ch)
+{
+       switch (aux_ch) {
        case AUX_CH_A:
                return POWER_DOMAIN_AUX_A;
        case AUX_CH_B:
@@ -7312,7 +7322,7 @@ intel_aux_power_domain(struct intel_digital_port *dig_port)
        case AUX_CH_G:
                return POWER_DOMAIN_AUX_G;
        default:
-               MISSING_CASE(dig_port->aux_ch);
+               MISSING_CASE(aux_ch);
                return POWER_DOMAIN_AUX_A;
        }
 }
index cc7f287804d7c6f97db8fee12efcc2fbafd82f50..8d872ed0de36fbaf7c52ff7fb02e9740fc66165d 100644 (file)
@@ -583,6 +583,8 @@ void hsw_disable_ips(const struct intel_crtc_state *crtc_state);
 enum intel_display_power_domain intel_port_to_power_domain(enum port port);
 enum intel_display_power_domain
 intel_aux_power_domain(struct intel_digital_port *dig_port);
+enum intel_display_power_domain
+intel_legacy_aux_to_power_domain(enum aux_ch aux_ch);
 void intel_mode_from_pipe_config(struct drm_display_mode *mode,
                                 struct intel_crtc_state *pipe_config);
 void intel_crtc_arm_fifo_underrun(struct intel_crtc *crtc,