[PATCH] drm/amd/pp: fix typecast error in powerplay.

Alex Deucher alexdeucher at gmail.com
Fri Nov 17 14:58:10 UTC 2017


On Fri, Nov 17, 2017 at 3:59 AM, Rex Zhu <Rex.Zhu at amd.com> wrote:
> resulted in data truncation
>
> Change-Id: I110011ba402a85fade89bb797adcf7318c0f0eb0
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
> index d1af148..a651ebc 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
> @@ -830,9 +830,9 @@ static int init_over_drive_limits(
>                 const ATOM_Tonga_POWERPLAYTABLE *powerplay_table)
>  {
>         hwmgr->platform_descriptor.overdriveLimit.engineClock =
> -               le16_to_cpu(powerplay_table->ulMaxODEngineClock);
> +               le32_to_cpu(powerplay_table->ulMaxODEngineClock);
>         hwmgr->platform_descriptor.overdriveLimit.memoryClock =
> -               le16_to_cpu(powerplay_table->ulMaxODMemoryClock);
> +               le32_to_cpu(powerplay_table->ulMaxODMemoryClock);
>
>         hwmgr->platform_descriptor.minOverdriveVDDC = 0;
>         hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list