summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm
diff options
context:
space:
mode:
authorFedor Pchelkin <pchelkin@ispras.ru>2025-06-30 23:26:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-15 12:08:46 +0200
commitdabe5fc2ee7a43c900a9e6a5de9424d6f7e0c87d (patch)
tree5712113285c1a1221938e4b114aa7f81da2e95b6 /drivers/gpu/drm/amd/pm
parent6e2f7903241c7afd520c82bdb1286f661368026f (diff)
downloadlinux-dabe5fc2ee7a43c900a9e6a5de9424d6f7e0c87d.tar.gz
linux-dabe5fc2ee7a43c900a9e6a5de9424d6f7e0c87d.tar.bz2
linux-dabe5fc2ee7a43c900a9e6a5de9424d6f7e0c87d.zip
drm/amd/pm/powerplay/hwmgr/smu_helper: fix order of mask and value
[ Upstream commit a54e4639c4ef37a0241bac7d2a77f2e6ffb57099 ] There is a small typo in phm_wait_on_indirect_register(). Swap mask and value arguments provided to phm_wait_on_register() so that they satisfy the function signature and actual usage scheme. Found by Linux Verification Center (linuxtesting.org) with Svace static analysis tool. In practice this doesn't fix any issues because the only place this function is used uses the same value for the value and mask. Fixes: 3bace3591493 ("drm/amd/powerplay: add hardware manager sub-component") Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/pm')
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
index 79a566f3564a..c305ea4ec17d 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
@@ -149,7 +149,7 @@ int phm_wait_on_indirect_register(struct pp_hwmgr *hwmgr,
}
cgs_write_register(hwmgr->device, indirect_port, index);
- return phm_wait_on_register(hwmgr, indirect_port + 1, mask, value);
+ return phm_wait_on_register(hwmgr, indirect_port + 1, value, mask);
}
int phm_wait_for_register_unequal(struct pp_hwmgr *hwmgr,