DirectFB - Home of the pragmatist Roadmap

[directfb-users] Re: adding a new device to directFB
Mailing List archive

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

[directfb-users] Re: adding a new device to directFB

Quoting Griffiths, RichardX A:
>    I'm looking into what it would take to support the Intel 830 graphics
>    under directFB.

A new driver from/for Intel would be great.

>    What is required to add a driver to directfb? Does a linux frame buffer
>    device (/dev/fb?) have to already exist for the device? Is the gfxdriver
>    code the only addition to directfb for a new device?

Yes, under Linux you need a frame buffer driver in the first place.

Make sure that the driver supports user space mapping of the MMIO regions
and that it reports a unique accelerator ID. The driver has to provide the
right values in fb_fix_screeninfo:

  mmio_start (physical address of MMIO),
  mmio_len   (size of the MMIO region) and
  accel      (the accelerator ID).

For a list of used accelerator IDs have a look at <linux/fb.h>. I'd suggest
taking an ID that's not close to the last ID of the header, otherwise it's
more likely that your ID collides with the ID of another unofficial driver.

You can check these values using "fbset -i":

Frame buffer device information:
    Name        : MATROX
    Address     : 0xe2000000
    Size        : 33554432
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 2560
*   MMIO Address: 0xe1000000
*   MMIO Size   : 16384
*   Accelerator : Matrox G400

Another common problem of frame buffer drivers is broken or missing
support for virtual resolutions. If the frame buffer driver doesn't
honor or at least reject the following settings from fb_var_screeninfo,
some DirectFB applications might look incorrect:

  xres_virtual, yres_virtual,
  xoffset and yoffset.

Apart from the gfxdriver there's nothing except an optional DRI driver.

Once the driver skeleton is ready, you can implement features one by one.

Best regards,
  Denis Oliver Kropp

| DirectFB - Hardware accelerated graphics |
|                 |

                            Convergence GmbH

Home | Main Index | Thread Index / Development / Old Archives