Skip to content

Commit 05af800

Browse files
Alex Hungalexdeucher
authored andcommitted
drm/amd/display: Add HDR workaround for specific eDP
[WHY & HOW] Some eDP panels suffer from flicking when HDR is enabled in KDE. This quirk works around it by skipping VSC that is incompatible with eDP panels. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3151 Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Hung <[email protected]> Signed-off-by: Aurabindo Pillai <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 4d42572) Cc: [email protected]
1 parent c36df0f commit 05af800

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6735,12 +6735,21 @@ create_stream_for_sink(struct drm_connector *connector,
67356735
if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT ||
67366736
stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST ||
67376737
stream->signal == SIGNAL_TYPE_EDP) {
6738+
const struct dc_edid_caps *edid_caps;
6739+
unsigned int disable_colorimetry = 0;
6740+
6741+
if (aconnector->dc_sink) {
6742+
edid_caps = &aconnector->dc_sink->edid_caps;
6743+
disable_colorimetry = edid_caps->panel_patch.disable_colorimetry;
6744+
}
6745+
67386746
//
67396747
// should decide stream support vsc sdp colorimetry capability
67406748
// before building vsc info packet
67416749
//
67426750
stream->use_vsc_sdp_for_colorimetry = stream->link->dpcd_caps.dpcd_rev.raw >= 0x14 &&
6743-
stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED;
6751+
stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED &&
6752+
!disable_colorimetry;
67446753

67456754
if (stream->out_transfer_func.tf == TRANSFER_FUNCTION_GAMMA22)
67466755
tf = TRANSFER_FUNC_GAMMA_22;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ static void apply_edid_quirks(struct edid *edid, struct dc_edid_caps *edid_caps)
7373
DRM_DEBUG_DRIVER("Clearing DPCD 0x317 on monitor with panel id %X\n", panel_id);
7474
edid_caps->panel_patch.remove_sink_ext_caps = true;
7575
break;
76+
case drm_edid_encode_panel_id('S', 'D', 'C', 0x4154):
77+
DRM_DEBUG_DRIVER("Disabling VSC on monitor with panel id %X\n", panel_id);
78+
edid_caps->panel_patch.disable_colorimetry = true;
79+
break;
7680
default:
7781
return;
7882
}

drivers/gpu/drm/amd/display/dc/dc_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ struct dc_panel_patch {
178178
unsigned int skip_avmute;
179179
unsigned int mst_start_top_delay;
180180
unsigned int remove_sink_ext_caps;
181+
unsigned int disable_colorimetry;
181182
};
182183

183184
struct dc_edid_caps {

0 commit comments

Comments
 (0)