* [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow issue
@ 2017-04-11 7:31 Xiangliang Yu
[not found] ` <1491895867-6031-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Xiangliang Yu @ 2017-04-11 7:31 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Frank Min, Xiangliang Yu
Add VCE ring test slow workaround for SRIOV.
Signed-off-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index e43c83f..cdff938 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -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 {
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow issue
[not found] ` <1491895867-6031-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-11 14:03 ` Deucher, Alexander
[not found] ` <BN6PR12MB1652C2404BD43635D46D1393F7000-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Deucher, Alexander @ 2017-04-11 14:03 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Yu, Xiangliang, Min, Frank
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Xiangliang Yu
> Sent: Tuesday, April 11, 2017 3:31 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Min, Frank; Yu, Xiangliang
> Subject: [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow
> issue
>
> Add VCE ring test slow workaround for SRIOV.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index e43c83f..cdff938 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -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
> +
> + /* 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 {
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow issue
[not found] ` <BN6PR12MB1652C2404BD43635D46D1393F7000-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-04-12 2:17 ` Yu, Xiangliang
0 siblings, 0 replies; 3+ messages in thread
From: Yu, Xiangliang @ 2017-04-12 2:17 UTC (permalink / raw)
To: Deucher, Alexander, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Min, Frank
> > -----Original Message-----
> > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> > Of Xiangliang Yu
> > Sent: Tuesday, April 11, 2017 3:31 AM
> > To: amd-gfx@lists.freedesktop.org
> > Cc: Min, Frank; Yu, Xiangliang
> > Subject: [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow
> > issue
> >
> > Add VCE ring test slow workaround for SRIOV.
> >
> > Signed-off-by: Frank Min <Frank.Min@amd.com>
> > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> > index e43c83f..cdff938 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> > @@ -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.
No, just this case for temporarily.
>
> > +
> > + /* 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 {
> > --
> > 2.7.4
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-12 2:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 7:31 [PATCH 2/3] drm/amdgpu/vce4: workaround VCE ring test slow issue Xiangliang Yu
[not found] ` <1491895867-6031-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2017-04-11 14:03 ` Deucher, Alexander
[not found] ` <BN6PR12MB1652C2404BD43635D46D1393F7000-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-04-12 2:17 ` Yu, Xiangliang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.