aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1914-drm-amdgpu-gfx-support-ras-gpu-reset.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1914-drm-amdgpu-gfx-support-ras-gpu-reset.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1914-drm-amdgpu-gfx-support-ras-gpu-reset.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1914-drm-amdgpu-gfx-support-ras-gpu-reset.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1914-drm-amdgpu-gfx-support-ras-gpu-reset.patch
new file mode 100644
index 00000000..4af6ffd3
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1914-drm-amdgpu-gfx-support-ras-gpu-reset.patch
@@ -0,0 +1,46 @@
+From 2d23b713dbe39cf8d9f297b434f440afb34e5721 Mon Sep 17 00:00:00 2001
+From: xinhui pan <xinhui.pan@amd.com>
+Date: Wed, 8 May 2019 22:36:10 +0800
+Subject: [PATCH 1914/2940] drm/amdgpu: gfx support ras gpu reset
+
+request a gpu reset if ras return EAGAIN.
+we will run late init again so it is ok to do nothing this time.
+
+Signed-off-by: xinhui pan <xinhui.pan@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+index 701a43563f5d..382c8d3c82da 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+@@ -3829,8 +3829,14 @@ static int gfx_v9_0_ecc_late_init(void *handle)
+ **ras_if = ras_block;
+
+ r = amdgpu_ras_feature_enable_on_boot(adev, *ras_if, 1);
+- if (r)
++ if (r) {
++ if (r == -EAGAIN) {
++ amdgpu_ras_request_reset_on_boot(adev,
++ AMDGPU_RAS_BLOCK__GFX);
++ r = 0;
++ }
+ goto feature;
++ }
+
+ ih_info.head = **ras_if;
+ fs_info.head = **ras_if;
+@@ -3863,7 +3869,7 @@ static int gfx_v9_0_ecc_late_init(void *handle)
+ feature:
+ kfree(*ras_if);
+ *ras_if = NULL;
+- return -EINVAL;
++ return r;
+ }
+
+ static int gfx_v9_0_late_init(void *handle)
+--
+2.17.1
+