diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3213-drm-amdgpu-add-check-for-ras-error-type.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3213-drm-amdgpu-add-check-for-ras-error-type.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3213-drm-amdgpu-add-check-for-ras-error-type.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3213-drm-amdgpu-add-check-for-ras-error-type.patch new file mode 100644 index 00000000..61c39d80 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3213-drm-amdgpu-add-check-for-ras-error-type.patch @@ -0,0 +1,39 @@ +From 2cbf422191513218b6b0108ef5441ff1272b6618 Mon Sep 17 00:00:00 2001 +From: Tao Zhou <tao.zhou1@amd.com> +Date: Tue, 23 Jul 2019 13:07:24 +0800 +Subject: [PATCH 3213/4256] drm/amdgpu: add check for ras error type + +only ue and ce errors are supported + +Signed-off-by: Tao Zhou <tao.zhou1@amd.com> +Reviewed-by: Dennis Li <dennis.li@amd.com> +Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +index 0eeb85d8399d..a87deb7be414 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +@@ -153,9 +153,14 @@ static int amdgpu_ras_debugfs_ctrl_parse_data(struct file *f, + return -EINVAL; + + data->head.block = block_id; +- data->head.type = memcmp("ue", err, 2) == 0 ? +- AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE : +- AMDGPU_RAS_ERROR__SINGLE_CORRECTABLE; ++ /* only ue and ce errors are supported */ ++ if (!memcmp("ue", err, 2)) ++ data->head.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE; ++ else if (!memcmp("ce", err, 2)) ++ data->head.type = AMDGPU_RAS_ERROR__SINGLE_CORRECTABLE; ++ else ++ return -EINVAL; ++ + data->op = op; + + if (op == 2) { +-- +2.17.1 + |