Skip to content

Commit 202260f

Browse files
misyltoadalexdeucher
authored andcommitted
drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR
The check for sending the vsc infopacket to the display was gated behind PSR (Panel Self Refresh) being enabled. The vsc infopacket also contains the colorimetry (specifically the container color gamut) information for the stream on modern DP. PSR is typically only supported on mobile phone eDP displays, thus this was not getting sent for typical desktop monitors or TV screens. This functionality is needed for proper HDR10 functionality on DP as it wants BT2020 RGB/YCbCr for the container color space. Cc: [email protected] Cc: Harry Wentland <[email protected]> Cc: Xaver Hugl <[email protected]> Cc: Melissa Wen <[email protected]> Fixes: 15f9dfd ("drm/amd/display: Register Colorspace property for DP and HDMI") Tested-by: Simon Berz <[email protected]> Tested-by: Xaver Hugl <[email protected]> Signed-off-by: Joshua Ashton <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 21f6137 commit 202260f

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6170,8 +6170,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
61706170

61716171
if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A)
61726172
mod_build_hf_vsif_infopacket(stream, &stream->vsp_infopacket);
6173-
6174-
if (stream->link->psr_settings.psr_feature_enabled || stream->link->replay_settings.replay_feature_enabled) {
6173+
else if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT ||
6174+
stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST ||
6175+
stream->signal == SIGNAL_TYPE_EDP) {
61756176
//
61766177
// should decide stream support vsc sdp colorimetry capability
61776178
// before building vsc info packet
@@ -6187,8 +6188,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
61876188
if (stream->out_transfer_func->tf == TRANSFER_FUNCTION_GAMMA22)
61886189
tf = TRANSFER_FUNC_GAMMA_22;
61896190
mod_build_vsc_infopacket(stream, &stream->vsc_infopacket, stream->output_color_space, tf);
6190-
aconnector->psr_skip_count = AMDGPU_DM_PSR_ENTRY_DELAY;
61916191

6192+
if (stream->link->psr_settings.psr_feature_enabled)
6193+
aconnector->psr_skip_count = AMDGPU_DM_PSR_ENTRY_DELAY;
61926194
}
61936195
finish:
61946196
dc_sink_release(sink);

drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,15 @@ void mod_build_vsc_infopacket(const struct dc_stream_state *stream,
147147
}
148148

149149
/* VSC packet set to 4 for PSR-SU, or 2 for PSR1 */
150-
if (stream->link->psr_settings.psr_version == DC_PSR_VERSION_SU_1)
151-
vsc_packet_revision = vsc_packet_rev4;
152-
else if (stream->link->replay_settings.config.replay_supported)
150+
if (stream->link->psr_settings.psr_feature_enabled) {
151+
if (stream->link->psr_settings.psr_version == DC_PSR_VERSION_SU_1)
152+
vsc_packet_revision = vsc_packet_rev4;
153+
else if (stream->link->psr_settings.psr_version == DC_PSR_VERSION_1)
154+
vsc_packet_revision = vsc_packet_rev2;
155+
}
156+
157+
if (stream->link->replay_settings.config.replay_supported)
153158
vsc_packet_revision = vsc_packet_rev4;
154-
else if (stream->link->psr_settings.psr_version == DC_PSR_VERSION_1)
155-
vsc_packet_revision = vsc_packet_rev2;
156159

157160
/* Update to revision 5 for extended colorimetry support */
158161
if (stream->use_vsc_sdp_for_colorimetry)

0 commit comments

Comments
 (0)