Re: [PATCH 1/1] AMDGPU : Fix bug in reporting voltage for CIK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Applied with some minor whitespace fixes.  Thanks!

Alex

On Thu, Aug 27, 2020 at 9:13 AM Sandeep Raghuraman <sandy.8925@xxxxxxxxx> wrote:
>
> 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@xxxxxxxxx>
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> index 753cb2cf6b77..2be006dd2eb3 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> @@ -3587,7 +3587,7 @@ static int smu7_read_sensor(struct pp_hwmgr *hwmgr, int idx,
>         case AMDGPU_PP_SENSOR_GPU_POWER:
>                 return smu7_get_gpu_power(hwmgr, (uint32_t *)value);
>         case AMDGPU_PP_SENSOR_VDDGFX:
> -               if ((data->vr_config & 0xff) == 0x2)
> +               if ((data->vr_config & VRCONF_VDDGFX_MASK) == VR_SVI2_PLANE_2<<VRCONF_VDDGFX_SHIFT)
>                         val_vid = PHM_READ_INDIRECT_FIELD(hwmgr->device,
>                                         CGS_IND_REG__SMC, PWR_SVI2_STATUS, PLANE2_VID);
>                 else
> --
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux