On Fri, 2003-06-27 at 01:35, Ian Romanick wrote:
> Doug Buxton wrote:
> > I'm a new to the XFree86 sources, so I was hoping someone could give 
> > some suggestions as to where to start looking.  Is there an existing 
> > mechanism for changing drm drivers, or restarting drm without 
> > restarting X entirely?  I'm trying to find a way to make X gracefully 
> > handle changing the drm module.  Right now when I disable the kernel 
> > module X either hangs (until I reactivate the module) or crashes, 
> > depending on whether I'm using the distrubution version of XFree86 or 
> > the one that I downloaded and compiled.

It shouldn't let you rmmod the DRM in the first place. Are you using
some kind of hack to force module unloading? If so, you're asking for
trouble. :)

> There was once (is still?) a patch around for the Radeon / R200 driver 
> that allowed this.  

It's still available at
http://penguinppc.org/~daenzer/DRI/radeon-reinit.diff . I don't know if
it applies cleanly to any tree right now though. :)

> The mechanism was that the user could switch to a virtual terminal, 
> rmmod the kernel driver, copy an different driver /lib/modules/..., 
> insmod the new driver (this step may not have been required), and return 
> back to X.  

No need to copy any files around, just load whichever DRM you want, or
the X server will load the default one when you switch back.

> Like I said, the Radeon & R200 were the *only* drivers that supported this.
> 
> In principle, it should be possible to do this with most of the drivers, 
> but there are a few corner cases where you have to be careful.  

In particular, the 2D acceleration functions must cope with direct
rendering getting disabled or enabled during a server generation,
because enabling it can fail when switching back to X.

> As 3D on XFree86 becomes more ubiquitous, having drivers that can do 
> this will be a better and better idea.

Indeed, most people will probably care less about changing the DRM on
the fly but more about running several servers with DRI enabled though.
Unfortunately, weird things will happen if you run several servers with
DRI enabled at different depths, that would need to be investigated.

Also, this patch has no effect while clients are using the DRM. Things
like the Qt library and OpenOffice.org are particularly bad as they keep
the DRM open permanently, even when they aren't using any OpenGL
contexts. Might actually be a libGL issue though.


-- 
Earthling Michel D�nzer   \  Debian (powerpc), XFree86 and DRI developer
Software libre enthusiast  \     http://svcs.affero.net/rm.php?r=daenzer

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to