1======================== 2Linux Framebuffer Driver 3======================== 4 5Overview 6-------- 7 8The Linux framebuffer (fbdev) is a linux subsystem used to display graphics. It is a hardware-independent API that gives user space software 9access to the framebuffer (the part of a computer's video memory containing a current video frame) using only the Linux kernel's own basic 10facilities and its device file system interface, avoiding the need for libraries that implement video drivers in user space. 11 12Prerequisites 13------------- 14 15Your system has a framebuffer device configured (usually under ``/dev/fb0``). 16 17Configuring the driver 18---------------------- 19 20Enable the framebuffer driver support in lv_conf.h, by cmake compiler define or by KConfig. Additionally you may configure the rendering 21mode. 22 23.. code-block:: c 24 25 #define LV_USE_LINUX_FBDEV 1 26 #define LV_LINUX_FBDEV_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL 27 28Usage 29----- 30 31To set up a framebuffer-based display, first create a display with ``lv_linux_fbdev_create``. Afterwards set the framebuffer device 32node on the display (usually this is ``/dev/fb0``). 33 34.. code-block:: c 35 36 lv_display_t *disp = lv_linux_fbdev_create(); 37 lv_linux_fbdev_set_file(disp, "/dev/fb0"); 38 39If your screen stays black or only draws partially, you can try enabling direct rendering via ``LV_DISPLAY_RENDER_MODE_DIRECT``. Additionally, 40you can activate a force refresh mode with ``lv_linux_fbdev_set_force_refresh(true)``. This usually has a performance impact though and shouldn't 41be enabled unless really needed. 42