drm/i915/dp: set VSC_SDP MSA delegation only for capable sinks

Per DP 1.4a section 2.2.4.3, the MSA MISC1 VSC_SDP bit signals that
the sink should defer colorimetry to the VSC SDP. It should only be set
when the sink advertises DP_VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED and a
VSC SDP with pixel encoding/colorimetry payload will actually be sent.

Fold the colorimetry_support check into intel_dp_needs_vsc_colorimetry()
so both intel_ddi_set_dp_msa() and intel_dp_compute_vsc_sdp() share a
single consistent gate.

Assisted-by: GitHub_Copilot:claude-sonnet-4.6
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Pranay Samala <pranay.samala@intel.com>
Link: https://patch.msgid.link/20260709113951.3557968-3-chaitanya.kumar.borah@intel.com
This commit is contained in:
Chaitanya Kumar Borah
2026-07-09 17:09:51 +05:30
parent a0e6549031
commit 6d7efb5fbb
2 changed files with 12 additions and 4 deletions

View File

@@ -469,6 +469,8 @@ void intel_ddi_set_dp_msa(const struct intel_crtc_state *crtc_state,
* of Color Encoding Format and Content Color Gamut] while sending
* YCBCR 420, HDR BT.2020 signals we should program MSA MISC1 fields
* which indicate VSC SDP for the Pixel Encoding/Colorimetry Format.
* Only set the delegation bit when the content needs it and
* the sink advertises support.
*/
if (intel_dp_needs_vsc_colorimetry(crtc_state, conn_state))
temp |= DP_MSA_MISC_COLOR_VSC_SDP;

View File

@@ -3122,8 +3122,7 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
{
struct drm_dp_vsc_sdp *vsc;
if ((!intel_dp->colorimetry_support ||
!intel_dp_needs_vsc_colorimetry(crtc_state, conn_state)) &&
if (!intel_dp_needs_vsc_colorimetry(crtc_state, conn_state) &&
!crtc_state->has_psr)
return;
@@ -3132,7 +3131,6 @@ 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;
/* Needs colorimetry */
if (intel_dp_needs_vsc_colorimetry(crtc_state, conn_state)) {
intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
vsc);
@@ -5069,11 +5067,19 @@ bool
intel_dp_needs_vsc_colorimetry(const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{
struct intel_dp *intel_dp =
enc_to_intel_dp(to_intel_encoder(conn_state->best_encoder));
/*
* As per DP 1.4a spec section 2.2.4.3 [MSA Field for Indication
* of Color Encoding Format and Content Color Gamut], in order to
* sending YCBCR 420 or HDR BT.2020 signals we should use DP VSC SDP.
* send YCBCR 420 or HDR BT.2020 signals we should use DP VSC SDP.
* Only signal this when the sink advertises VSC SDP colorimetry
* support.
*/
if (!intel_dp->colorimetry_support)
return false;
if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
return true;