Tilman Sauerbeck [2006-07-28 18:21]: > Tilman Sauerbeck [2006-07-28 14:42]: > > Michel Dänzer [2006-07-28 13:40]: > > > Are you familiar with the X server's function wrapping mechanism? > > > DRI(Do)BlockHandler() is the DRI module's wrapper of the X server's > > > BlockHandler screen hook, which it calls whenever it has run out of > > > requests and goes to sleep for a bit. For symmetry, there's a DRILock() > > > call in DRIDoWakeupHandler(), which is a wrapper for the hook the X > > > server calls before it starts processing new requests. The idea is for > > > the DRI module to automatically hold the lock whenever the X server > > > might need hardware access. > > > > I should have asked a more specific question. While DRIBlockHandler() > > was called all the time, DRIDoBlockHandler() was only called once, which > > led to the bad DRIUnlock() call. I wanted to know when > > DRI_Do_BlockHandler() is called :) > > > > Looking at the code again, it seems DRIDoWakeupHandler() and > > DRIDoBlockHandler() are the base functions for the job, which may be > > overridden by the DDX driver. MGA overrides both in MGADRIScreenInit(). > > So it seems like mga_dri.c's MGAWakeupHandler should always call > DRILock(). The attached patch implements this change - it makes glxinfo > work again. It's probably horribly wrong though... :)
A better approach is to teach glxdri.c about the driver-specific block/wakeuphandlers. See the attached patch. It makes glxinfo work as well, but glxgears is still hanging. It seems that DRILockTree() is being the bugger that causes the double-unlock: ... (II) MGA(0): MGABlockHandler: unlocking DRILockTree: unlocking DRIUnlock called when not locked ... Regards, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 6a10554..cfa9996 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -137,19 +137,13 @@ #define COPY_SUB_BUFFER_INTERNAL_VERSION static void __glXDRIleaveServer(void) { - int i; - - for (i = 0; i < screenInfo.numScreens; i++) - DRIDoBlockHandler(i, NULL, NULL, NULL); + DRIBlockHandler(NULL, NULL, NULL); } static void __glXDRIenterServer(void) { - int i; - - for (i = 0; i < screenInfo.numScreens; i++) - DRIDoWakeupHandler(i, NULL, 0, NULL); + DRIWakeupHandler(NULL, 0, NULL); } static void
pgpFDhHmih7At.pgp
Description: PGP signature
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel