]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix bug in reporting voltage for CIK
authorSandeep Raghuraman <sandy.8925@gmail.com>
Thu, 27 Aug 2020 13:13:37 +0000 (18:43 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Aug 2020 14:11:47 +0000 (10:11 -0400)
commitcb2be8081a9af2597317cb122e4ba4e75983ddd3
tree80bf7db7e5f31a39bd127ec7611c5e2da3fc1e98
parentf3954a85dddb04c76a4d191eca3417855d05ed6f
drm/amdgpu: Fix bug in reporting voltage for CIK

On my R9 390, the voltage was reported as a constant 1000 mV.
This was due to a bug in smu7_hwmgr.c, in the smu7_read_sensor()
function, where some magic constants were used in a condition,
to determine whether the voltage should be read from PLANE2_VID
or PLANE1_VID. The VDDC mask was incorrectly used, instead of
the VDDGFX mask.

This patch changes the code to use the correct defined constants
(and apply the correct bitshift), thus resulting in correct voltage reporting.

Signed-off-by: Sandeep Raghuraman <sandy.8925@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c