[PATCH] Add some debug data around colorimetry in vsc sdp

Jouni Högander jouni.hogander at intel.com
Tue Nov 28 12:45:48 UTC 2023


Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c  | 10 ++++++++++
 drivers/gpu/drm/i915/display/intel_psr.c |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index c6e3fe8b75d3..4c143798a7f2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2599,6 +2599,9 @@ static void intel_dp_compute_vsc_colorimetry(const struct intel_crtc_state *crtc
 
 	vsc->bpc = crtc_state->pipe_bpp / 3;
 
+	drm_dbg_kms(&dev_priv->drm, "XXX VSC: revision = %x, colorimetry = %x, bpc = %x\n",
+		    vsc->revision, vsc->colorimetry, vsc->bpc);
+
 	/* only RGB pixelformat supports 6 bpc */
 	drm_WARN_ON(&dev_priv->drm,
 		    vsc->bpc == 6 && vsc->pixelformat != DP_PIXELFORMAT_RGB);
@@ -2623,6 +2626,9 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
 
 	crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_VSC);
 	vsc->sdp_type = DP_SDP_VSC;
+
+	drm_dbg_kms(dp_to_dig_port(intel_dp)->base.base.dev,
+				    "XXX Adding colorimetry data\n");
 	intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
 					 &crtc_state->infoframes.vsc);
 }
@@ -2646,6 +2652,8 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp,
 			 * Prepare VSC Header for SU as per eDP 1.4 spec, Table 6-11
 			 * 3D stereo + PSR/PSR2 + Y-coordinate.
 			 */
+			drm_dbg_kms(dp_to_dig_port(intel_dp)->base.base.dev,
+				    "XXX No colorimetry data\n");
 			vsc->revision = 0x4;
 			vsc->length = 0xe;
 		}
@@ -2671,6 +2679,8 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp,
 		 * VSC SDP supporting 3D stereo + PSR (applies to eDP v1.3 or
 		 * higher).
 		 */
+		drm_dbg_kms(dp_to_dig_port(intel_dp)->base.base.dev,
+				    "XXX No colorimetry data\n");
 		vsc->revision = 0x2;
 		vsc->length = 0x8;
 	}
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 36e4a1e9b98f..a83f68b49433 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -563,6 +563,9 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
 	if (intel_dp->psr.sink_psr2_support) {
 		intel_dp->psr.colorimetry_support =
 			intel_dp_get_colorimetry_status(intel_dp);
+		drm_dbg_kms(dp_to_dig_port(intel_dp)->base.base.dev,
+			    "XXX colorimetry %ssupported\n",
+			    intel_dp->psr.colorimetry_support ? "" : "not ");
 		intel_dp_get_su_granularity(intel_dp);
 	}
 }
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list