drm/amdgpu/vce4: workaround VCE ring test slow issue
Subsystems (2)
PATCH 2/3 drm/amdgpu/vce4: workaround VCE ring test slow issue
Add VCE ring test slow workaround for SRIOV.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +7 -3
@@ -955,7 +955,11 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)struct amdgpu_device *adev = ring->adev;uint32_t rptr =amdgpu_ring_get_rptr (ring);unsigned i; -int r; +int r, timeout = adev->usec_timeout; + +/* workaround VCE ring test slow issue for sriov*/ +if (amdgpu_sriov_vf (adev)) + timeout *=10 ;/* TODO: remove it if VCE can work for sriov */ if (amdgpu_sriov_vf (adev))
@@ -970,13 +974,13 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)amdgpu_ring_write (ring,VCE_CMD_END );amdgpu_ring_commit (ring); -for (i =0 ; i < adev->usec_timeout; i++) { +for (i =0 ; i < timeout; i++) {if (amdgpu_ring_get_rptr (ring) != rptr)break ;DRM_UDELAY (1 ); } -if (i < adev->usec_timeout) { +if (i < timeout) {DRM_INFO ("ring test on %d succeeded in %d usecs\n" , ring->idx, i); }else {
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1491895867-6031-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org
Quoted 23 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Xiangliang Yu
Sent: Tuesday, April 11, 2017 3:31 AM
To: [email protected]
Cc: Min, Frank; Yu, Xiangliang
Subject: [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow issueAdd VCE ring test slow workaround for SRIOV.
Signed-off-by Frank Min <[email protected]>Signed-off-by Xiangliang Yu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c int amdgpu_vce_ring_test_ring(struct amdgpu_ring · line 959
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +1
-1@@ -955,7 +955,11 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)struct amdgpu_device *adev = ring->adev;uint32_t rptr =amdgpu_ring_get_rptr (ring);unsigned i; -int r; +int r, timeout = adev->usec_timeout;
Do you need longer timeouts elsewhere as well? If so, it might make more sense to just change the default setting for adev->usec_timeout for SR-IOV.
Alex
Quoted 27 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +4
-0+ +/* workaround VCE ring test slow issue for sriov*/ +if (amdgpu_sriov_vf (adev)) + timeout *=10 ;/* TODO: remove it if VCE can work for sriov */ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2
-2if (amdgpu_sriov_vf (adev))@@ -970,13 +974,13 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)amdgpu_ring_write (ring ,VCE_CMD_END );amdgpu_ring_commit (ring); -for (i =0 ; i < adev->usec_timeout; i++) { +for (i =0 ; i < timeout; i++) {if (amdgpu_ring_get_rptr (ring) != rptr)break ;DRM_UDELAY (1 ); } -if (i < adev->usec_timeout) { +if (i < timeout) {DRM_INFO ("ring test on %d succeeded in %d usecs\n" , ring->idx, i);} else {
--
2.7.4
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
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1652C2404BD43635D46D1393F7000-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 24 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c int amdgpu_vce_ring_test_ring(struct
Quoted 23 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Xiangliang Yu
Sent: Tuesday, April 11, 2017 3:31 AM
To: [email protected]
Cc: Min, Frank; Yu, Xiangliang
Subject: [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow issueAdd VCE ring test slow workaround for SRIOV.
Signed-off-by Frank Min <[email protected]>Signed-off-by Xiangliang Yu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +0
-0@@ -955,7 +955,11 @@ int amdgpu_vce_ring_test_ring(struct
amdgpu_ring
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring) · line 958
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +1
-1*ring)struct amdgpu_device *adev = ring->adev;uint32_t rptr =amdgpu_ring_get_rptr (ring);unsigned i; -int r; +int r, timeout = adev->usec_timeout;Do you need longer timeouts elsewhere as well? If so, it might make more sense to just change the default setting for
adev->usec_timeoutfor SR-IOV.
No, just this case for temporarily.
Quoted 29 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c int amdgpu_vce_ring_test_ring(struct
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +4
-0+ +/* workaround VCE ring test slow issue for sriov*/ +if (amdgpu_sriov_vf (adev)) + timeout *=10 ;/* TODO: remove it if VCE can work for sriov */ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +0
-0if (amdgpu_sriov_vf (adev))@@ -970,13 +974,13 @@ int amdgpu_vce_ring_test_ring(struct
amdgpu_ringQuoted 19 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2
-2*ring)amdgpu_ring_write (ring,VCE_CMD_END );amdgpu_ring_commit (ring); -for (i =0 ; i < adev->usec_timeout; i++) { +for (i =0 ; i < timeout; i++) {if (amdgpu_ring_get_rptr (ring) != rptr)break ;DRM_UDELAY (1 ); } -if (i < adev->usec_timeout) { +if (i < timeout) {DRM_INFO ("ring test on %d succeeded in %d usecs\n" , ring->idx, i);} else {
--
2.7.4
Quoted 4 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