Half-complete kernel interface for waiting on CS completion

Simon Farnsworth simon.farnsworth at onelan.co.uk
Fri Feb 3 09:00:31 PST 2012


On Friday 3 February 2012, Dave Airlie <airlied at gmail.com> wrote:
> On Fri, Feb 3, 2012 at 4:30 PM, Simon Farnsworth
> <simon.farnsworth at onelan.co.uk> wrote:
> > As I've got the fix I need (Mesa-dev message "[PATCH] r600g: Use a fake
> > reloc to sleep for fences"), I can't really justify continuing to work on
> > this, so I'm putting out what I've got, complete with known problems, in
> > case someone else gets interested.
> >
> 
> I just noticed today we should backport to 8.0. If you get a GPU reset
> in the old model, the app can spin forever, at least it appears thats
> what gnome-shell is doing here.
>
I didn't fix that - I simply used the fake reloc as an alternative to
busy-waiting, as I didn't want to churn the code too much.

r600g cannot cope with a GPU reset that occurs before the EVENT_WRITE_EOP
changes a dword in the fence BO from 0 to 1. Without the fake reloc, it will
busy-wait indefinitely if that happens, using sched_yield to relinquish CPU
time - with the fake reloc, it will keep calling the
DRM_RADEON_GEM_WAIT_IDLE ioctl in an infinite loop.

It would be fairly trivial to not loop if you went down the fake reloc path
(and I can code that if requested, for a v3 Mesa patch); thinking about it,
I can also code it so that we break from the loop if the fake reloc stops
being busy at any time.

Taking these patches further is the "obvious" correct thing, though.
-- 
Simon Farnsworth
Software Engineer
ONELAN Limited
http://www.onelan.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20120203/f8d28b91/attachment-0001.pgp>


More information about the dri-devel mailing list