]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amd/display: Fix bug in debugfs crc_win_update entry
authorWayne Lin <Wayne.Lin@amd.com>
Fri, 26 Nov 2021 07:19:57 +0000 (15:19 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:27 +0000 (10:59 +0100)
commit3fdc0b87ef52232526220e4b3c605000d3ed51d6
treefcd391235e155a75cdf15a974f85aede5bc7906e
parent2d996e2ecb8df913dde9675d23fc0278248f9a67
drm/amd/display: Fix bug in debugfs crc_win_update entry

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 4bef85d4c9491415b7931407b07f24841c1e0390 ]

[Why]
crc_rd_wrk shouldn't be null in crc_win_update_set(). Current programming
logic is inconsistent in crc_win_update_set().

[How]
Initially, return if crc_rd_wrk is NULL. Later on, we can use member of
crc_rd_wrk safely.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 9a65df193108 ("drm/amd/display: Use PSP TA to read out crc")
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Pavle Kotarac <Pavle.Kotarac@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c