I have little background on how these hardware actually works, but now I'm required to learn how to write a Linux frame buffer driver for Android devices.
I'm confused by Linux graphics stack. From what I understand, on a desktop computer the compositing window manager interacts with DRM
, which then sends data to specific video card driver. On the other hand there are some kind of controllers retrieving data from GPU's
memory through DMA
and send it to the monitor, as suggested by the answer here .
Also by diagram at page 29
of this book, I figured that a frame buffer driver is on top of actual graphic devices, so it must need to interact with specific video card driver, for example, an nVidia
driver.
But when I google writing a frame buffer driver for an embedded device, the results show that as if the driver is directly responsible for contacting with the LCD
, so it looks like it's even below a video card driver.
So is a frame buffer driver actually a video card driver?
A framebuffer is a memory-mapped buffer that represents all the pixels necessary to drive a video display.
The Linux framebuffer (fbdev) is a linux subsystem used to show graphics on a computer monitor, typically on the system console.
The frame buffer device provides an abstraction for the graphics hardware. It represents the frame buffer of some video hardware and allows application software to access the graphics hardware through a well-defined interface, so the software doesn't need to know anything about the low-level (hardware register) stuff.
Most Linux-based* distributions already include Intel® Graphics Drivers. These drivers are provided and maintained by the Linux* distribution vendors and not by Intel, we recommend contacting the Linux* Operating System Vendors.
A framebuffer driver provides an interface for
To provide this interface, the framebuffer driver generally talks to the hardware directly.
For example, the vesafb
framebuffer driver will use the VESA standard interface to talk to the video hardware. However, this standard is limited, so there isn't really much hardware acceleration going on and drawing is slow.
Another example is the intelfb
framebuffer driver. It talks to some intel hardware using a proprietary interface, that exposes more acceleration facilities, so it is faster.
Nowadays, KMS drivers are used instead for most hardware. They do both expose a framebuffer and also access to other GPU functionality, e.g. OpenGL, through DRM.
Your confusion seems to arise from the fact, that the framebuffer driver and the X11 GPU driver are in fact competing! This is why, if you have a KMS system, the switch between graphical and text consoles is instant, however, with a non-KMS system, it is slow, as both the fb driver and the X11 driver need to re-initialize the video hardware on console switch.
Find more information in the comprehensive talk Linux Graphics Demystified by Martin Fiedler: http://keyj.emphy.de/files/linuxgraphics_en.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With