input thread [was Re: [PATCH v2] input: constify valuators passed in by input drivers.]

Adam Jackson ajax at nwnk.net
Fri Aug 13 12:28:48 PDT 2010


On Fri, 2010-08-13 at 19:41 +0100, Michel Dänzer wrote:

> It's news to me that PutImage is always synchronous. Do you have any
> pointers to where this is enforced in the code?

By the time pGC->ops->PutImage returns, the bits argument belongs to the
caller again.  In the case of ProcPutImage that points into the request
buffer, which will get reused.  I don't know if you count that as
"enforced" but it certainly appears to be what's assumed.  Which means
you need to have finished touching the request buffer by the time the
PutImage hook returns.  If you do that by memcpy'ing to a bounce buffer
and handing that to DMA, that's a perfectly cromulent way of being done
with the request buffer.

Likewise in ProcShmPutImage we send the completion event to the client
immediately after the PutImage hook returns, so if you're not done
touching bits (the shm segment) when your hook returns then you're
racing with event delivery.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100813/adbbac90/attachment.pgp>


More information about the xorg-devel mailing list