Skip to contentSkip to conversation

framebuffer driver as a module

DISCUSSION Nikhil Jagtiani 2 participants 2 messages Aug 16, 2002 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

Hi,

I am running linux on an ipaq with framebuffer support. I need to enable support for an external graphics card through a pcmcia slot - the driver for which does not exist.

As this is my first in terms of device driver writing, I would be grateful for some advice.

Is it possible to write this additional driver as a dynamic kernel module (along the lines of fbmem.c which is static), which however itself implements all device specific functions? Can this make use of the same ioctl functions that fbmem.c uses (defined in fb.h)? Would there be a conflict considering that fbmem would remain in the system?

Alternately if i am to write this as a static module (which loads onto fbmem.c) - is there any way i could test it out without having to recompile the kernel repeatedly?

Any other suggestions on how to proceed would be very welcome.

Many Thanks,

Nikhil Jagtiani

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

#1 lore raw
Quoted 6 lines · Nikhil Jagtiani

Hi,

I am running linux on an ipaq with framebuffer support. I need to enable support for an external graphics card through a pcmcia slot - the driver for which does not exist.

Quoted 8 lines

As this is my first in terms of device driver writing, I would be grateful for some advice.

Is it possible to write this additional driver as a dynamic kernel module (along the lines of fbmem.c which is static), which however itself implements all device specific functions? Can this make use of the same ioctl functions that fbmem.c uses (defined in fb.h)? Would there be a conflict considering that fbmem would remain in the system?

Couple of fbdevs can be compiled as a module, just look for tristate in drivers/video/Config.in... You can insmod/rmmod such driver as you want, only thing you must ensure is that there are no users of your fbdev when you do rmmod. If you have two fbdevs, just move VTs from "main" to "testing" and back by using con2fb/con2fbmap. If you'll have only "testing" fbdev in your ipaq, and you have kernel with support for virtual terminals, it is very tricky, usually impossible to unload such module - it will have usecount 64 or 128 or another multiple of 64 as soon as you'll see 'Console: switching to ...' on your screen.
Petr Vandrovec [email protected]

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390