[PATCH] drm/amdgpu: drop compute ring timeout setting for non-sriov only (v2)
Quan, Evan
Evan.Quan at amd.com
Tue Mar 27 08:26:21 UTC 2018
Thanks! Will correct it on patch submit.
Regards,
Evan
> -----Original Message-----
> From: Christian König [mailto:ckoenig.leichtzumerken at gmail.com]
> Sent: Tuesday, March 27, 2018 4:20 PM
> To: Quan, Evan <Evan.Quan at amd.com>; amd-gfx at lists.freedesktop.org
> Cc: Koenig, Christian <Christian.Koenig at amd.com>
> Subject: Re: [PATCH] drm/amdgpu: drop compute ring timeout setting for
> non-sriov only (v2)
>
> Am 27.03.2018 um 10:15 schrieb Evan Quan:
> > Sriov still wants these error messags on timeout. So, for sriov use
> > case, the timeout setting on compute rings is kept.
> >
> > -v2: clean the code
> >
> > Change-Id: Id0af6959a8023c8d683ff680de7c583f84cfeab3
> > Signed-off-by: Evan Quan <evan.quan at amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 12 +++++++++---
> > 1 file changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > index 455a81e..0000569 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > @@ -411,6 +411,7 @@ int amdgpu_fence_driver_init_ring(struct
> amdgpu_ring *ring,
> > unsigned num_hw_submission)
> > {
> > int r;
> > + long timeout;
>
> Minor nit pick, common coding style would be:
>
> long timeout;
> int r;
>
> Anyway the patch is Reviewed-by: Christian König
> <christian.koenig at amd.com>
>
> >
> > /* Check that num_hw_submission is a power of two */
> > if ((num_hw_submission & (num_hw_submission - 1)) != 0) @@ -
> 433,11
> > +434,16 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
> >
> > /* No need to setup the GPU scheduler for KIQ ring */
> > if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
> > + /* for non-sriov case, no timeout enforce on compute ring */
> > + if ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)
> > + && !amdgpu_sriov_vf(ring->adev))
> > + timeout = MAX_SCHEDULE_TIMEOUT;
> > + else
> > + timeout =
> msecs_to_jiffies(amdgpu_lockup_timeout);
> > +
> > r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
> > num_hw_submission,
> amdgpu_job_hang_limit,
> > - (ring->funcs->type ==
> AMDGPU_RING_TYPE_COMPUTE) ?
> > - MAX_SCHEDULE_TIMEOUT :
> msecs_to_jiffies(amdgpu_lockup_timeout),
> > - ring->name);
> > + timeout, ring->name);
> > if (r) {
> > DRM_ERROR("Failed to create scheduler on
> ring %s.\n",
> > ring->name);
More information about the amd-gfx
mailing list