Re: gnome-shell stuck because of amdgpu driver [5.3 RC5]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 30 Aug 2019 06:04:06 +0800 Mikhail Gavrilov wrote:
> On Sun, Aug 25, 2019 at 10:13:05PM +0800, Hillf Danton wrote:
> > Can we try to add the fallback timer manually?
> >
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > @@ -322,6 +322,10 @@ int amdgpu_fence_wait_empty(struct amdgp
> >         }
> >         rcu_read_unlock();
> > 
> > +       if (!timer_pending(&ring->fence_drv.fallback_timer))
> > +               mod_timer(&ring->fence_drv.fallback_timer,
> > +                       jiffies + (AMDGPU_FENCE_JIFFIES_TIMEOUT << 1));
> > +
> >         r = dma_fence_wait(fence, false);
> >         dma_fence_put(fence);
> >         return r;
> > --
> >
> > Or simply wait with an ear on signal and timeout if adding timer
> > seems to go a bit too far?
> >
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> > @@ -322,7 +322,12 @@ int amdgpu_fence_wait_empty(struct amdgp
> >         }
> >         rcu_read_unlock();
> > 
> > -       r = dma_fence_wait(fence, false);
> > +       if (0 < dma_fence_wait_timeout(fence, true,
> > +                               AMDGPU_FENCE_JIFFIES_TIMEOUT +
> > +                               (AMDGPU_FENCE_JIFFIES_TIMEOUT >> 3)))
> > +               r = 0;
> > +       else
> > +               r = -EINVAL;
> >         dma_fence_put(fence);

		WARN(r, "gnome shell stuck warning\n");

> >         return r;
> >  }
> 
> I tested both patches on top of 5.3 RC6. Each patch I was tested more
> than 24 hours and I don't seen any regressions or problems with them.
> 
Add a warning to show if it makes sense in field: neither regression nor
problem will have been observed with the warning printed.

Thanks
Hillf

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux