[PATCH 077/207] drm/amdgpu: no need to set up GPU scheduler for mes ring

Alex Deucher alexdeucher at gmail.com
Tue Jun 2 18:51:12 UTC 2020


On Tue, Jun 2, 2020 at 5:30 AM Christian König <christian.koenig at amd.com> wrote:
>
> Am 01.06.20 um 20:00 schrieb Alex Deucher:
> > From: Jack Xiao <Jack.Xiao at amd.com>
> >
> > As mes ring directly submits to hardwared,
> > it's no need to set up GPU scheduler for mes ring.
> >
> > Signed-off-by: Jack Xiao <Jack.Xiao at amd.com>
> > Acked-by: Alex Deucher <alexander.deucher at amd.com>
> > Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
> > Reviewed-by: Christian König <christian.koenig at amd.com>
> > Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++--
> >   1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > index 3414e119f0cb..8712a2e1b869 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > @@ -469,8 +469,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
> >       if (!ring->fence_drv.fences)
> >               return -ENOMEM;
> >
> > -     /* No need to setup the GPU scheduler for KIQ ring */
> > -     if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
> > +     /* No need to setup the GPU scheduler for KIQ and MES ring */
> > +     if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ ||
> > +         ring->funcs->type != AMDGPU_RING_TYPE_MES) {
>
> BTW: Making this a flag in the ring->funcs struct would probably be
> cleaner than checking the two types here.
>
> But not a must have right now.

Already added a flag for this, just missed this case.

Alex

>
> Christian.
>
> >               switch (ring->funcs->type) {
> >               case AMDGPU_RING_TYPE_GFX:
> >                       timeout = adev->gfx_timeout;
>


More information about the amd-gfx mailing list