RE: [PATCH] drm/amdgpu: sysfs node disable query error count during gpu reset

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

 



[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Stanley.Yang <Stanley.Yang@xxxxxxx>

Regards,
Stanley
> -----Original Message-----
> From: Chai, Thomas <YiPeng.Chai@xxxxxxx>
> Sent: Monday, July 1, 2024 4:11 PM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Zhang, Hawking <Hawking.Zhang@xxxxxxx>; Zhou1, Tao
> <Tao.Zhou1@xxxxxxx>; Li, Candice <Candice.Li@xxxxxxx>; Wang, Yang(Kevin)
> <KevinYang.Wang@xxxxxxx>; Yang, Stanley <Stanley.Yang@xxxxxxx>; Chai,
> Thomas <YiPeng.Chai@xxxxxxx>
> Subject: [PATCH] drm/amdgpu: sysfs node disable query error count during gpu
> reset
>
> Sysfs node disable query error count during gpu reset.
>
> Signed-off-by: YiPeng Chai <YiPeng.Chai@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/aldebaran.c     | 2 --
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c    | 3 +++
>  3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/aldebaran.c
> b/drivers/gpu/drm/amd/amdgpu/aldebaran.c
> index d0a8da67dc2a..b0f95a7649bf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/aldebaran.c
> +++ b/drivers/gpu/drm/amd/amdgpu/aldebaran.c
> @@ -316,8 +316,6 @@ static int aldebaran_mode2_restore_ip(struct
> amdgpu_device *adev)
>               adev->ip_blocks[i].status.late_initialized = true;
>       }
>
> -     amdgpu_ras_set_error_query_ready(adev, true);
> -
>       amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE);
>       amdgpu_device_set_pg_state(adev, AMD_PG_STATE_GATE);
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index e133a9982a77..41689aa24e67 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3157,7 +3157,8 @@ static int amdgpu_device_ip_late_init(struct
> amdgpu_device *adev)
>               return r;
>       }
>
> -     amdgpu_ras_set_error_query_ready(adev, true);
> +     if (!amdgpu_in_reset(adev))
> +             amdgpu_ras_set_error_query_ready(adev, true);
>
>       amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE);
>       amdgpu_device_set_pg_state(adev, AMD_PG_STATE_GATE); diff --git
> a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index ac7ded01dad0..e2abc04112d2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1295,6 +1295,9 @@ ssize_t amdgpu_ras_aca_sysfs_read(struct device
> *dev, struct device_attribute *a
>               .head = obj->head,
>       };
>
> +     if (!amdgpu_ras_get_error_query_ready(obj->adev))
> +             return sysfs_emit(buf, "Query currently inaccessible\n");
> +
>       if (amdgpu_ras_query_error_status(obj->adev, &info))
>               return -EINVAL;
>
> --
> 2.34.1





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux