NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Sitara Linux LCDC fbdev User Space
Sitara Linux Software Developer's Guide | → | Sitara Linux SDK | → | LCDC: fbdev User Space |
Contents
Usage and Verification[edit]
fbset is a utility that can be used to verify and set display parameters.
Here is an example output of fbset when run on the terminal of an AM335x General Purpose EVM:
/ # fbset mode "800x480-40" # D: 21.429 MHz, H: 21.956 kHz, V: 40.139 Hz geometry 800 480 800 960 32 timings 46666 64 64 32 32 48 3 accel false rgba 8/16,8/8,8/0,0/0 endmode / #
In 24bpp configuration, testing can be done by dumping bmp image (header stripped 800*480.bmp) on LCD
$cat 800*480.bmp > /dev/fb0
Framebuffer console blankes out after blanking interval. Framebuffer console blanking and unblanking can be set via below sysfs interfaces.
to unblank: $echo "0" > /sys/class/graphics/fb0/blank to blank: $echo "4" > /sys/class/graphics/fb0/blank
Application Interface[edit]
To configure and use a framebuffer device, the following interfaces are needed. Note that most of the configuration will occur via IOCTLs.
open ()
To open a framebuffer device
close ()
To close a framebuffer device
ioctl ()
To send ioctl commands to the framebuffer driver.
mmap ()
To obtain the framebuffer region as mmap'ed area in user space.
Supported Standard IOCTLs[edit]
FBIOGET_VSCREENINFO, FBIOPUT_VSCREENINFO
These I/O controls are used to query and set the so-called variable screen info. This allows an application to query or change the display mode, including the color depth, resolution, timing etc. These I/O controls accept a pointer to a struct fb_var_screeninfo structure. The video mode data supplied in the fb_var_screeninfo struct is translated to values loaded into the display controller registers.
FBIOGET_FSCREENINFO
This I/O control can be used by applications to get the fixed properties of the display, e.g. the start address of the framebuffer memory. This I/O control accepts a pointer to a struct fb_fix_screeninfo.
FBIOGETCMAP, FBIOPUTCMAP
These I/O controls are used to get and set the color-map for the framebuffer. These I/O controls accept a pointer to a struct fb_cmap structure.
FBIO_BLANK
This I/O control is used to blank or unblank the framebuffer console.