]> 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, 3 Sep 2020 04:37:14 +0000 (00:37 -0400)
commit5158df0b27760cc867d9e783e467fcf4aa09e6dc
tree401a7e068fa1861a38922470feaa4ef3c9ee598c
parent8b5eb71a0f82a419aa441e8302fc4168e135c3ca
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/powerplay/hwmgr/smu7_hwmgr.c