|
From: Antonino D. <ad...@po...> - 2003-02-01 17:03:54
|
On Sat, 2003-02-01 at 23:45, Michel D=E4nzer wrote: [snip] > >=20 > > 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. >=20 > I wonder if people will like having to build the DRM for a framebuffer > device... a solution where one component uses the other if it's there, > but works without it otherwise, might be better. >=20 Yes, your suggestion is better. I did browse the dri code, and my feeling is drm is coded for userspace clients without any usable hooks for clients residing in kernel space. I'm still wondering how to access DRM services from kernel space. =20 > > 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 > I'm not sure it would be that bad, but certainly suboptimal. :) >=20 It will be bad. The handler that gets loaded first will receive the interrupt signal first. It will, by necessity, clear the registers of the event it's watching for to reenable the interrupt. So when it's the second handler's turn, and if it is also watching for the same event, then it will falsely assume that the event never happened. At worst, the second handler will wait indefinitely for an event that will never arrive, at best it will time out and send false information. >=20 > > > Could it not be that the fbdev sort of minimally intialize the DRM wh= en > > > 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? I= s > > it not enough to just load the DRM module? >=20 > No. The DRM_INST_HANDLER ioctl needs to be called to make the IRQs work, > and I suspect more needs to be done before that. >=20 Yes, I also realized that. My feeling is if James or Geert do agree to add support for this, fbdev will just have to duplicate the code, taking care that another handler may exist, or DRM will be rewritten so the interrupt handling can be shared or made available to other modules, as you suggested. > > Also, we have fbdev drivers that are incompatible with DRM, so having > > fbdev load DRM is like telling it to commit suicide :-) >=20 > Out of curiosity, is that about i8xx? >=20 No, the i810fb driver is compatible with X and DRM. =20 Tony |