drm/amdgpu: record error code when ring test failed
Subsystems (2)
PATCH 1/1 drm/amdgpu: record error code when ring test failed
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +3 -2
@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)int amdgpu_ib_ring_tests (struct amdgpu_device *adev) {unsigned i; -int r; +int r, ret =0 ;for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {struct amdgpu_ring *ring = adev->rings[i];
@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) }else {/* still not good, but we can live with it */ DRM_ERROR ("amdgpu: failed testing IB on ring %d (%d).\n" , i, r); + ret = r; } } } -return 0 ; +return ret; }/*
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1472551169-29801-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 30.08.2016 um 11:59 schrieb Chunming Zhou:
Quoted 2 lines
Change-Id I3a59f602a4d5ec42c8c184daa14eb8194b0dab9eSigned-off-by Chunming Zhou <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)int amdgpu_ib_ring_tests (struct amdgpu_device *adev) {unsigned i; -int r; +int r, ret =0 ;for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {struct amdgpu_ring *ring = adev->rings[i];@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) }else {/* still not good, but we can live with it */
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device *adev) · line 311
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2
-1DRM_ERROR ("amdgpu: failed testing IB on ring %d (%d).\n" , i, r); + ret = r; } } } -return 0 ; +return ret; }/*
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 30 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Chunming Zhou
Sent: Tuesday, August 30, 2016 5:59 AM
To: [email protected]
Cc: Zhou, David(ChunMing)
Subject: [PATCH] drm/amdgpu: record error code when ring test failedChange-Id I3a59f602a4d5ec42c8c184daa14eb8194b0dab9eSigned-off-by Chunming Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)int amdgpu_ib_ring_tests (struct amdgpu_device *adev) {unsigned i; -int r; +int r, ret =0 ;for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0struct amdgpu_ring *ring = adev->rings[i];
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device · line 306
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-0@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) }else {/* still not good, but we can live with it */ DRM_ERROR("amdgpu: failed testing IB on ring %d (%d).\n", i, r); + ret = r;
Hmm, I think that was intentional so as not to fail completely even if some of the engines aren't working.
Alex
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1} } } -return 0 ; +return ret; }
Quoted 8 lines
/*
--
1.9.1_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MWHPR12MB1694B57F7A0C9E4B37637C95F7E00-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Am 30.08.2016 um 16:24 schrieb Deucher, Alexander:
Quoted 27 lines
Quoted 27 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Chunming Zhou
Sent: Tuesday, August 30, 2016 5:59 AM
To: [email protected]
Cc: Zhou, David(ChunMing)
Subject: [PATCH] drm/amdgpu: record error code when ring test failedChange-Id I3a59f602a4d5ec42c8c184daa14eb8194b0dab9eSigned-off-by Chunming Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)int amdgpu_ib_ring_tests (struct amdgpu_device *adev) {unsigned i; -int r; +int r, ret =0 ;
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device · line 306
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {struct amdgpu_ring *ring = adev->rings[i];drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-0@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) }else {/* still not good, but we can live with it */ DRM_ERROR("amdgpu: failed testing IB on ring %d (%d).\n", i, r); + ret = r;Hmm, I think that was intentional so as not to fail completely even if some of the engines aren't working.
Yeah, I've had the same concern so I double checked it. The driver just prints an additional error message and continuous with the startup.
In general I think it makes sense to return an error here, cause then we can easily identify cases where we need to fallback to a full engine reset.
Christian.
Quoted 13 lines
Alex
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1} } } -return 0 ; +return ret; }/*
--
1.9.1
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 03ed1bf9-b4f8-be92-2653-f19109310103-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Alex Deucher
Reviewed-byQuoted 44 lines · Christian König
Am 30.08.2016 um 16:24 schrieb Deucher, Alexander:
Quoted 28 lines
Quoted 28 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Chunming Zhou
Sent: Tuesday, August 30, 2016 5:59 AM
To: [email protected]
Cc: Zhou, David(ChunMing)
Subject: [PATCH] drm/amdgpu: record error code when ring test failedChange-Id I3a59f602a4d5ec42c8c184daa14eb8194b0dab9eSigned-off-by Chunming Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)int amdgpu_ib_ring_tests (struct amdgpu_device *adev) {unsigned i; -int r; +int r, ret =0 ;Quoted 13 lines
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {struct amdgpu_ring *ring = adev->rings[i];drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) }else {/* still not good, but we can live with it */
DRM_ERROR("amdgpu: failed testing IB on
ring %d (%d).\n", i, r);
+ ret = r;Hmm, I think that was intentional so as not to fail completely even if some of the engines aren't working.
Quoted 6 lines
Yeah, I've had the same concern so I double checked it. The driver just prints an additional error message and continuous with the startup.
In general I think it makes sense to return an error here, cause then we can easily identify cases where we need to fallback to a full engine reset.
Thanks for checking.
Quoted 28 lines
Christian.
Quoted 18 lines
Alex
Quoted 11 lines
} } }drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-2-return 0 ; +return ret; }/* -- 1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfxQuoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 27 lines · Alexander
Quoted 27 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Chunming Zhou
Sent: Tuesday, August 30, 2016 5:59 AM
To: [email protected]
Cc: Zhou, David(ChunMing)
Subject: [PATCH] drm/amdgpu: record error code when ring test failedChange-Id I3a59f602a4d5ec42c8c184daa14eb8194b0dab9eSigned-off-by Chunming Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)int amdgpu_ib_ring_tests (struct amdgpu_device *adev) {unsigned i; -int r; +int r, ret =0 ;
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device · line 306
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {struct amdgpu_ring *ring = adev->rings[i];drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-0@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) }else {/* still not good, but we can live with it */ DRM_ERROR("amdgpu: failed testing IB on ring %d (%d).\n", i, r); + ret = r;Hmm, I think that was intentional so as not to fail completely even if some of the engines aren't working.
After gpu reset, sometimes this case will happen, then gpu could hang if ignoring error.
Regards,
David Zhou
Quoted 10 lines
Alex
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1
-1} } } -return 0 ; +return ret; }
Quoted 8 lines
Quoted 8 lines
/*
--
1.9.1_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx