]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Program VSC SDP colorimetry for all DP sinks >= 1.4
authorHarry Wentland <harry.wentland@amd.com>
Tue, 12 Mar 2024 15:55:52 +0000 (11:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:19:38 +0000 (11:19 +0200)
commit 9e61ef8d219877202d4ee51d0d2ad9072c99a262 upstream.

In order for display colorimetry to work correctly on DP displays
we need to send the VSC SDP packet. We should only do so for
panels with DPCD revision greater or equal to 1.4 as older
receivers might have problems with it.

Cc: stable@vger.kernel.org
Cc: Joshua Ashton <joshua@froggi.es>
Cc: Xaver Hugl <xaver.hugl@gmail.com>
Cc: Melissa Wen <mwen@igalia.com>
Cc: Agustin Gutierrez <Agustin.Gutierrez@amd.com>
Reviewed-by: Agustin Gutierrez <agustin.gutierrez@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 9f4e4a01010f5e9420ec6dbe3398f65a6ba72db4..4a1aea1d4b4eaf8d131b3df55a2b3c381c043f46 100644 (file)
@@ -6122,7 +6122,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
@@ -6132,7 +6134,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)