drm/amd/display: Fix PSR-SU not support but still call the amdgpu_dm_psr_enable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tom Chung <chiahsuan.chung@xxxxxxx>

commit b0a3e840ad287c33a86b5515d606451b7df86ad4 upstream.

[Why]
The enum DC_PSR_VERSION_SU_1 of psr_version is 1 and
DC_PSR_VERSION_UNSUPPORTED is 0xFFFFFFFF.

The original code may has chance trigger the amdgpu_dm_psr_enable()
while psr version is set to DC_PSR_VERSION_UNSUPPORTED.

[How]
Modify the condition to psr->psr_version == DC_PSR_VERSION_SU_1

Reviewed-by: Sun peng Li <sunpeng.li@xxxxxxx>
Signed-off-by: Tom Chung <chiahsuan.chung@xxxxxxx>
Signed-off-by: Roman Li <roman.li@xxxxxxx>
Tested-by: Daniel Wheeler <daniel.wheeler@xxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
(cherry picked from commit f765e7ce0417f8dc38479b4b495047c397c16902)
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8922,7 +8922,7 @@ static void amdgpu_dm_enable_self_refres
 		    (current_ts - psr->psr_dirty_rects_change_timestamp_ns) > 500000000) {
 			if (pr->replay_feature_enabled && !pr->replay_allow_active)
 				amdgpu_dm_replay_enable(acrtc_state->stream, true);
-			if (psr->psr_version >= DC_PSR_VERSION_SU_1 &&
+			if (psr->psr_version == DC_PSR_VERSION_SU_1 &&
 			    !psr->psr_allow_active && !aconn->disallow_edp_enter_psr)
 				amdgpu_dm_psr_enable(acrtc_state->stream);
 		}


Patches currently in stable-queue which might be from chiahsuan.chung@xxxxxxx are

queue-6.12/drm-amd-display-do-not-wait-for-psr-disable-on-vbl-enable.patch
queue-6.12/drm-amd-display-disable-replay-and-psr-while-vrr-is-enabled.patch
queue-6.12/revert-drm-amd-display-enable-urgent-latency-adjustments-for-dcn35.patch
queue-6.12/drm-amd-display-validate-mdoe-under-mst-lct-1-case-as-well.patch
queue-6.12/drm-amd-display-fix-psr-su-not-support-but-still-call-the-amdgpu_dm_psr_enable.patch
queue-6.12/drm-amd-display-do-not-elevate-mem_type-change-to-full-update.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux