Re: frame-buffer driver question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



1) To start with I am a little confused about the device itself. According
to my understanding a frame buffer is a graphical chip which contains the
neccessary information about a particular frame to be displayed. But what is
the role of virtual frame buffer ?

Normally, video hardware has a region of memory (i.e., the frame
buffer) that you can write to to affect the image on a screen. Instead of using an actual piece of hardware's frame buffer, vfb.c
just vmallocs a chunk of memory to write to.  If an actual application
such as X or Qt were to use this frame buffer, the output images would
be drawn in this memory instead of to a screen.

2) How are the operations defined in "vfb.c" requested. Because there dosent
seem to be any ioctl's which can be requested to invoke these operations? So
basically what is the entry point into the driver ?

You define the operations as functions and then set up a struct fb_ops
to point to them.  In vfb.c this struct is called vfb_ops.  vfb_ops is
passed to register_framebuffer in the struct fb_info that is returned
by framebuffer_alloc.  All of this business happens in the probe
routine vfb_probe. This routine is called by the driver subsystem. The driver subsystem learns about this and other routines from the
driver_register call in the init function.  Note that the framebuffer
subsystem will choose which /dev/fbX is associated with your driver.

Beyond this, I found the Qt tutorial on the Linux Framebuffer userful:

http://doc.trolltech.com/3.1/emb-framebuffer-howto.html

Hope this helps,
Brian

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux