]> www.infradead.org Git - users/hch/misc.git/commit
drm/amd/display: Fix PSR-SU not support but still call the amdgpu_dm_psr_enable
authorTom Chung <chiahsuan.chung@amd.com>
Thu, 5 Dec 2024 15:08:28 +0000 (23:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Jan 2025 19:21:03 +0000 (14:21 -0500)
commitb0a3e840ad287c33a86b5515d606451b7df86ad4
treed3422d20e60d39869418cc1b4d977ae51c9b9a8a
parent36b23e3baf9129d5b6c3a3a85b6b7ffb75ae287c
drm/amd/display: Fix PSR-SU not support but still call the amdgpu_dm_psr_enable

[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@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f765e7ce0417f8dc38479b4b495047c397c16902)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c