On 2007.05.17 10:45:08 +0000, 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 video driver to tell others it's smashing the state. With
> > below patch, rotation can work fine with DRI on G965.
> 
> It should not be necessary because the 2D driver should only touch the
> hardware state when it's holding the hardware lock, in which case the
> existing code should work fine. Maybe the real problem is that the 2D
> driver touches the hardware without taking the lock; I think somebody
> mentioned something like that on the xorg mailing list recently.
> 
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 to take the lock, which makes rotation with DRI run fine on my
915G SMP desktop. 

But on G965, I still encounter engine hang even after grabbing the lock
in SMP case, yeah UP or taskset to same CPU works fine, that made me take long
time on tracking drm lock code, but which finally looks fine to me.

Then I tried to always call intel->vtbl.lost_context() in LOCK_HARDWARE, which
fixed the problem. So that lead me to think about we might need to take care
of ctxOwner even withhold lightweight lock. 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to