aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
diff options
context:
space:
mode:
authorxinhui pan <xinhui.pan@amd.com>2019-05-08 22:36:10 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-05-24 12:20:50 -0500
commit70ab8c6125d6649f73a46118f8660c2ddeefa1e1 (patch)
tree9f6aceb037b4711ed1d754e8122c2065c631352a /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
parentdrm/amdgpu: gmc support ras gpu reset (diff)
downloadlinux-dev-70ab8c6125d6649f73a46118f8660c2ddeefa1e1.tar.xz
linux-dev-70ab8c6125d6649f73a46118f8660c2ddeefa1e1.zip
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> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c10
1 files 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 14e671d3f079..f88101f18409 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3825,8 +3825,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;
@@ -3859,7 +3865,7 @@ interrupt:
feature:
kfree(*ras_if);
*ras_if = NULL;
- return -EINVAL;
+ return r;
}
static int gfx_v9_0_late_init(void *handle)