[PATCH 09/22 V2] drm/amd/pm: check specific index for smu13

Huang, Tim Tim.Huang at amd.com
Fri May 10 07:21:31 UTC 2024


[AMD Official Use Only - General]

This patch is,

Reviewed-by: Tim Huang <Tim.Huang at amd.com>



> -----Original Message-----
> From: Jesse Zhang <jesse.zhang at amd.com>
> Sent: Friday, May 10, 2024 3:07 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Koenig, Christian
> <Christian.Koenig at amd.com>; Huang, Tim <Tim.Huang at amd.com>; Zhang,
> Jesse(Jie) <Jesse.Zhang at amd.com>; Zhang, Jesse(Jie)
> <Jesse.Zhang at amd.com>
> Subject: [PATCH 09/22 V2] drm/amd/pm: check specific index for smu13
>
> Check for specific indexes that may be invalid values.
>
> Signed-off-by: Jesse Zhang <Jesse.Zhang at amd.com>
> Suggested-by: Tim Huang <Tim.Huang at amd.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
> index 051092f1b1b4..7c343dd12a7f 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
> @@ -2336,6 +2336,8 @@ static int smu_v13_0_6_mode2_reset(struct
> smu_context *smu)
>
>       index = smu_cmn_to_asic_specific_index(smu,
> CMN2ASIC_MAPPING_MSG,
>                                              SMU_MSG_GfxDeviceDriverReset);
> +     if (index < 0)
> +             return index;
>
>       mutex_lock(&smu->message_lock);
>
> --
> 2.25.1



More information about the amd-gfx mailing list