drm/amd/display: Program VSC SDP colorimetry for all DP sinks >= 1.4
authorjsg <jsg@openbsd.org>
Thu, 18 Apr 2024 01:10:52 +0000 (01:10 +0000)
committerjsg <jsg@openbsd.org>
Thu, 18 Apr 2024 01:10:52 +0000 (01:10 +0000)
From Harry Wentland
b12c3cfd8265f69d238b4a3200d8755f609e9e58 in linux-6.6.y/6.6.28
9e61ef8d219877202d4ee51d0d2ad9072c99a262 in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index c62bbcd..2ecd713 100644 (file)
@@ -6126,7 +6126,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
        if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A)
                mod_build_hf_vsif_infopacket(stream, &stream->vsp_infopacket);
 
-       if (stream->link->psr_settings.psr_feature_enabled || stream->link->replay_settings.replay_feature_enabled) {
+       if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT ||
+           stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST ||
+           stream->signal == SIGNAL_TYPE_EDP) {
                //
                // should decide stream support vsc sdp colorimetry capability
                // before building vsc info packet
@@ -6136,7 +6138,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
                        stream->use_vsc_sdp_for_colorimetry =
                                aconnector->dc_sink->is_vsc_sdp_colorimetry_supported;
                } else {
-                       if (stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED)
+                       if (stream->link->dpcd_caps.dpcd_rev.raw >= 0x14 &&
+                           stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED)
                                stream->use_vsc_sdp_for_colorimetry = true;
                }
                if (stream->out_transfer_func->tf == TRANSFER_FUNCTION_GAMMA22)