Half-complete kernel interface for waiting on CS completion

Dave Airlie airlied at gmail.com
Fri Feb 3 08:46:11 PST 2012


On Fri, Feb 3, 2012 at 4:30 PM, Simon Farnsworth
<simon.farnsworth at onelan.co.uk> wrote:
> Hello,
>
> I've run out of time to work on this, as I have a fix (the unused BO trick)
> that's good enough for my needs. I've taken Christian's patches (1 and 2 of
> this series) and added the obvious ioctl interface on top, enabling
> userspace to wait for a kernel fence *if* the kernel gives it some opaque
> tokens (currently the kernel ring and sequence number).
>
> I got stuck trying to work out how to pass those tokens back out of the CS
> ioctl. Return value isn't enough, as I have 96 bits of information in my
> token (32-bit ring number, 64-bit seqno), so I experimented with adding an
> extra chunk that the CS ioctl writes. However, I hit pain trying to work out
> what to do when writing to that extra chunk fails - the CS has already been
> submitted to hardware here, so returning an error is unfriendly.
>
> 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.

Dave.


More information about the dri-devel mailing list