drm/i915/rkl: Don't try to read out DSI transcoders
authorAditya Swarup <aditya.swarup@intel.com>
Sat, 6 Jun 2020 02:57:37 +0000 (19:57 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Tue, 9 Jun 2020 17:25:56 +0000 (10:25 -0700)
RKL doesn't have DSI outputs, so we shouldn't try to read out the DSI
transcoder registers.

v2(MattR):
 - Just set the 'extra panel mask' to edp | dsi0 | dsi1 and then mask
   against the platform's cpu_transcoder_mask to filter out the ones
   that don't exist on a given platform.  (Ville)

v3(MattR):
 - Only include DSI transcoders on gen11+ again. (Ville)
 - Use for_each_cpu_transcoder_masked() for loop. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200606025740.3308880-5-matthew.d.roper@intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/display/intel_display.c

index 3e6ef5b..34d1b7f 100644 (file)
@@ -10897,7 +10897,7 @@ static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
        enum intel_display_power_domain power_domain;
-       unsigned long panel_transcoder_mask = 0;
+       unsigned long panel_transcoder_mask = BIT(TRANSCODER_EDP);
        unsigned long enabled_panel_transcoders = 0;
        enum transcoder panel_transcoder;
        intel_wakeref_t wf;
@@ -10907,9 +10907,6 @@ static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
                panel_transcoder_mask |=
                        BIT(TRANSCODER_DSI_0) | BIT(TRANSCODER_DSI_1);
 
-       if (HAS_TRANSCODER(dev_priv, TRANSCODER_EDP))
-               panel_transcoder_mask |= BIT(TRANSCODER_EDP);
-
        /*
         * The pipe->transcoder mapping is fixed with the exception of the eDP
         * and DSI transcoders handled below.
@@ -10920,9 +10917,8 @@ static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
         * XXX: Do intel_display_power_get_if_enabled before reading this (for
         * consistency and less surprising code; it's in always on power).
         */
-       for_each_set_bit(panel_transcoder,
-                        &panel_transcoder_mask,
-                        ARRAY_SIZE(INTEL_INFO(dev_priv)->trans_offsets)) {
+       for_each_cpu_transcoder_masked(dev_priv, panel_transcoder,
+                                      panel_transcoder_mask) {
                bool force_thru = false;
                enum pipe trans_pipe;