From 2fc479aaa0b194110f821315fcb494f2de5c0cfd Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 14 Apr 2022 08:37:17 +0000 Subject: [PATCH] drm/amd/display: Use PSR version selected during set_psr_caps From Nicholas Kazlauskas 6040c99cb1a18c8da3f84e5051db12b6353a2576 in linux 5.15.y/5.15.34 b80ddeb29d9df449f875f0b6f5de08d7537c02b8 in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c index 70a554f1e72..7072fb2ec07 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c @@ -74,10 +74,8 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream) link = stream->link; - psr_config.psr_version = link->dpcd_caps.psr_caps.psr_version; - - if (psr_config.psr_version > 0) { - psr_config.psr_exit_link_training_required = 0x1; + if (link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED) { + psr_config.psr_version = link->psr_settings.psr_version; psr_config.psr_frame_capture_indication_req = 0; psr_config.psr_rfb_setup_time = 0x37; psr_config.psr_sdp_transmit_line_num_deadline = 0x20; -- 2.20.1