|
From: Antonino D. <ad...@po...> - 2003-01-31 23:47:54
|
On Sat, 2003-02-01 at 05:32, Sven Luther wrote: > On Fri, Jan 31, 2003 at 08:12:16PM +0100, Michel D=E4nzer wrote: > > On Fre, 2003-01-31 at 19:35, Antonino Daplas wrote: > > > On Fri, 2003-01-31 at 19:24, Michel D=E4nzer wrote: > > > >=20 > > > > You don't need X to use the DRM, just some privileged client to > > > > initialize it. > > >=20 > > > You're right. I just realized that since DRM already has an interrup= t > > > handler, it is unwise for fbdev to install its own interrupt handler > > > too, as this will fatally lock up the machine when DRM and fbdev are > > > loaded simultaneously. > > >=20 > > > So, how about this? Let fbdev have its own vblank ioctl, but for fbd= ev > > > drivers with a DRM counterpart, fbdev will just call the DRM > > > wait_vblank() and send_vbl_signals() functions. Do you think this i= s > > > doable, I haven't examined the code thoroughly? =20 > > >=20 > > > The main goal is too avoid having 2 independent interrupt handlers fo= r > > > one device. > >=20 > > A noble goal, but the framebuffer device would still need its own code > > when the DRM isn't active, so I'm afraid there's no way around code > > duplication, unless we could somehow factor out the common code for the > > two to share? The fbdev driver will automatically load the DRM module when it refers to any exportable symbol of DRM. We can also make the fbdev drivers specifically depend on DRM in Kconfig so users don't accidentally compile fbdev without its DRM counterpart. The aim is not to avoid code duplication, although that is a plus, it's two independent handlers clashing and locking up the machine. >=20 > Could it not be that the fbdev sort of minimally intialize the DRM when > it is not already active ? After all, the fbdev knows as much, if not > more, than the X driver about the graphic chips state, especially if the > X driver is using the fbdev. >=20 I was wondering about this to. How much initialization is required? Is it not enough to just load the DRM module? Also, we have fbdev drivers that are incompatible with DRM, so having fbdev load DRM is like telling it to commit suicide :-) Tony |