[PATCH] drm/amdgpu: print warning when input address is invalid
Nirmoy
nirmodas at amd.com
Fri May 22 10:03:54 UTC 2020
LGTM
Acked-by: Nirmoy Das <nirmoy.das at amd.com>
On 5/22/20 12:00 PM, Guchun Chen wrote:
> This will assist debug in error injection case.
>
> Signed-off-by: Guchun Chen <guchun.chen at amd.com>
> Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 50fe08bf2f72..9475891ee989 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -318,6 +318,9 @@ static ssize_t amdgpu_ras_debugfs_ctrl_write(struct file *f, const char __user *
> case 2:
> if ((data.inject.address >= adev->gmc.mc_vram_size) ||
> (data.inject.address >= RAS_UMC_INJECT_ADDR_LIMIT)) {
> + dev_warn(adev->dev, "RAS WARN: input address "
> + "0x%llx is invalid.",
> + data.inject.address);
> ret = -EINVAL;
> break;
> }
More information about the amd-gfx
mailing list