drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset
authorJosé Roberto de Souza <jose.souza@intel.com>
Fri, 8 Mar 2019 00:00:43 +0000 (16:00 -0800)
committerJosé Roberto de Souza <jose.souza@intel.com>
Fri, 8 Mar 2019 18:31:42 +0000 (10:31 -0800)
Forcing a specific CRTC to the eDP connector was causing the
intel_psr_fastset_force() to mark mode_chaged in the wrong and
disabled CRTC causing no update in the PSR state.

Looks like our internal state track do not clear output_types and
has_psr in the disabled CRTCs, not sure if this is the expected
behavior or not but in the mean time this fix the issue.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190308000050.6226-2-jose.souza@intel.com
drivers/gpu/drm/i915/intel_psr.c

index 8bed73914876da961b1a4528cdbdf27bb330f979..6175b1d2e0c8ba549471acd41e3724f90fba3ec0 100644 (file)
@@ -981,7 +981,8 @@ retry:
 
                intel_crtc_state = to_intel_crtc_state(crtc_state);
 
-               if (intel_crtc_has_type(intel_crtc_state, INTEL_OUTPUT_EDP) &&
+               if (crtc_state->active &&
+                   intel_crtc_has_type(intel_crtc_state, INTEL_OUTPUT_EDP) &&
                    intel_crtc_state->has_psr) {
                        /* Mark mode as changed to trigger a pipe->update() */
                        crtc_state->mode_changed = true;