Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Michel Dänzer
On Thu, 2007-05-17 at 15:12 +0800, Wang Zhenyu wrote: I've encountered problem when debugging rotation with DRI enabled. I965 dri driver only checks sarea-ctxOwner when holding heavy lock, but I think we also need to check it in light lock case, as ctxOwner is used by video driver to tell

Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Keith Whitwell
Michel Dänzer wrote: On Thu, 2007-05-17 at 15:12 +0800, Wang Zhenyu wrote: I've encountered problem when debugging rotation with DRI enabled. I965 dri driver only checks sarea-ctxOwner when holding heavy lock, but I think we also need to check it in light lock case, as ctxOwner is used by

Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Wang Zhenyu
On 2007.05.17 10:45:08 +, Michel Dänzer wrote: On Thu, 2007-05-17 at 15:12 +0800, Wang Zhenyu wrote: I've encountered problem when debugging rotation with DRI enabled. I965 dri driver only checks sarea-ctxOwner when holding heavy lock, but I think we also need to check it in light lock

Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Wang Zhenyu
On 2007.05.17 10:09:19 +, Keith Whitwell wrote: Michel Dänzer wrote: On Thu, 2007-05-17 at 15:12 +0800, Wang Zhenyu wrote: I've encountered problem when debugging rotation with DRI enabled. I965 dri driver only checks sarea-ctxOwner when holding heavy lock, but I think we also need to

Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Keith Packard
On Thu, 2007-05-17 at 17:12 +0800, Wang Zhenyu wrote: yeah, that's me actually. The problem in rotation is that xserver dri block handler will release the dri lock before rotate block handler running, thus xserver doesn't hold dri lock in rotation rendering. Current I fixed in driver code

Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Michel Dänzer
On Thu, 2007-05-17 at 08:47 -0700, Keith Packard wrote: On Thu, 2007-05-17 at 17:12 +0800, Wang Zhenyu wrote: yeah, that's me actually. The problem in rotation is that xserver dri block handler will release the dri lock before rotate block handler running, thus xserver doesn't hold

Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Keith Packard
On Thu, 2007-05-17 at 19:35 +0200, Michel Dänzer wrote: Yeah, that would probably be the best solution - might even just be a matter of initialization order in the driver? The rotation block/wakeup handlers are added dynamically after the server starts, so we may need some DIX help to reorder

Re: [Mesa3d-dev] [PATCH] i965: ensure ctxOwner check in LOCK_HARDWARE

2007-05-17 Thread Wang Zhenyu
On 2007.05.17 20:33:41 +, Keith Packard wrote: I fixed the X server so that the rotation redisplay occurs before the DRI lock is released. I did this by wrapping the screen block handler instead of using RegisterBlockAndWakeupHandler. Fine. Thanks. The change is on the master branch;