Half-complete kernel interface for waiting on CS completion

Simon Farnsworth simon.farnsworth at onelan.co.uk
Fri Feb 3 08:30:26 PST 2012


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.

Simon Farnsworth
Software Engineer
ONELAN Limited

More information about the dri-devel mailing list