drm/i915/display: Ignore only psr specific part of vsc sdp
authorJouni Högander <jouni.hogander@intel.com>
Wed, 20 Dec 2023 10:36:07 +0000 (12:36 +0200)
committerJouni Högander <jouni.hogander@intel.com>
Fri, 22 Dec 2023 06:15:06 +0000 (08:15 +0200)
Pipe config check is currently ignoring vsc sdp changes completely
if psr is enabled. We want to ignore only PSR part of it as there
might be changes in colorimetry data. Also read back vsc_sdp when psr is
used.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Shawn Lee <shawn.c.lee@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231220103609.1384523-6-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_dp.c

index 66b4c3f3ceb16222212974e5202be9d7d3d4a75c..9b9a30c11e1c6fbcc8c214ed558f4d636d346280 100644 (file)
@@ -4764,7 +4764,11 @@ static bool
 intel_compare_dp_vsc_sdp(const struct drm_dp_vsc_sdp *a,
                         const struct drm_dp_vsc_sdp *b)
 {
-       return memcmp(a, b, sizeof(*a)) == 0;
+       return a->pixelformat == b->pixelformat &&
+               a->colorimetry == b->colorimetry &&
+               a->bpc == b->bpc &&
+               a->dynamic_range == b->dynamic_range &&
+               a->content_type == b->content_type;
 }
 
 static bool
@@ -5045,8 +5049,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 } while (0)
 
 #define PIPE_CONF_CHECK_DP_VSC_SDP(name) do { \
-       if (!current_config->has_psr && !pipe_config->has_psr && \
-           !intel_compare_dp_vsc_sdp(&current_config->infoframes.name, \
+       if (!intel_compare_dp_vsc_sdp(&current_config->infoframes.name, \
                                      &pipe_config->infoframes.name)) { \
                pipe_config_dp_vsc_sdp_mismatch(dev_priv, fastset, __stringify(name), \
                                                &current_config->infoframes.name, \
index 173562f4ec457a0b3de7d9af90f974d9c0e68dfc..f4a22d40eec2762265142d6fc2624fbc3b0a43d0 100644 (file)
@@ -4425,10 +4425,6 @@ static void intel_read_dp_vsc_sdp(struct intel_encoder *encoder,
        struct dp_sdp sdp = {};
        int ret;
 
-       /* When PSR is enabled, VSC SDP is handled by PSR routine */
-       if (crtc_state->has_psr)
-               return;
-
        if ((crtc_state->infoframes.enable &
             intel_hdmi_infoframe_enable(type)) == 0)
                return;