Linus Torvalds wrote:
On Sun, 2 Mar 2003, Linus Torvalds wrote:

The _second_ DRI-enabled X startup caused problems, even if I had done
multiple non-DRI X sessions in between. This is what makes me think that
the DRI kernel modules keep some history around that they shouldn't.  And
maybe the problem is hidden if you actually unload and re-load the
modules (is that what most people do?)


Ok, I went in and looked for suspicious behaviour, and I found some.

Look at AGP and MTRR behaviour: both of them are initialized by drm_init() at module load time.

Both of them are _de-initialized_ by the "DRM(takedown)()" code, and never
re-initialized by the "DRM(setup)()" code.

So an example of badness would be:

- load DRM modules (in my case as part of kernel bootup, since they are compiled in):

- initialize MTRR and AGP mappings

- run X with DRI.

- Everything is happy.

- exit DRI X

- we are the "last close" case for DRI, so DRM(release)() calls DRM(takedown)(), which frees AGP and MTRR

- restart non-DRI X

- nothing happens

- kill non-DRI X

- nothing happens

- run X with DRI again

        - oops. We now have neither AGP nor MTRR's set up, even though
          the code looks like it is assuming it.

Yeah, maybe I'm missing where somebody else re-initializes AGP and MTRR, but my point is that these things do not seem to nest correctly. That mtrr_del() in particular seems to be wrong, and I do indeed get a

mtrr: MTRR 2 not used

when shutting down X normally.

Comments? I haven't really gone through the whole path of what happens at open()/release() time, and these are really nothing more than "that looks suspicious", maybe somebody who knows the code better than I can take a better look at it.

Linus,


Sounds like you may be on to something. Server recycles are common with display managers. An easy way to test (and debug) this scenario would be to bring up a raw X server (no window manager, display manager or clients), then run glxinfo, xdpyinfo or start and stop any X client (this will cause the server to recycle when they exit...if they are the only client), and then you should be in a state where you can try running gears or some other simple 3D application on an X server that has recycled.

--
                               /\
         Jens Owen            /  \/\ _
  [EMAIL PROTECTED]  /    \ \ \   Steamboat Springs, Colorado



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to