Skip to content

ZyoungInc/LVGL_RK_RGA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LVGL RGA + DRM Acceleration for Rockchip Linux

Hardware-accelerated LVGL patches for Rockchip Buildroot SDKs — tested on RK3506B, and compatible with most RK Linux platforms (e.g. RK3566, RK3568, RK3588, etc.).

This project provides LVGL v8.4.0 and v9.1.0, as well as lv_drivers enhancements, to enable RGA blit acceleration, DRM direct display, and improved performance on framebuffer-based systems.


🚀 Features

✅ General Enhancements

  • Fully integrated with Rockchip Buildroot SDK
  • Tested on RK3506B, theoretically applicable to all RK Linux platforms
  • Support for both LVGL 8.4 and LVGL 9.1 versions

🧩 LVGL 8.4

Includes:

  • Upstream LVGL fixes and stability patches (00010013)
  • CMake improvements and SDL/Freetype integration (0014, 0020, 0022)
  • New widgets (InputBox, Sticker Matrix)
  • GIF cache, snapshot fix, and LRU debug enhancements
  • Hardware-related patches for DRM and RGA integration (via drivers layer)
  • Build support for shared libraries and demos

⚠️ LVGL 8.4 still requires adapting the lv_drivers layer (see below).


🧱 LVGL 9.1

Key features:

  • Added RGA hardware blit acceleration
  • Updated DRM display driver (feat-drm-update-drm-display)
  • Added FreeType include path and DRM include support
  • Exported more configs to Buildroot (via Kconfig)
  • Added support for RKADK overlays and display margin tuning
  • Added pthread affinity, auto screen size detection, and text area support in msgbox

Compatible with LVGL 9.x new API — validated on RK3506B with RGA enabled.


🖥️ lv_drivers

Improvements:

  • Reconstructed DRM display driver (0006)
  • Added RGA copy acceleration (replacing memcpy)
  • Implemented ping-pong buffer for VOP output
  • Support for LV_COLOR_DEPTH=16
  • Added fps control, resolution via env, and OpenGL backend
  • Optional screen rotation via RGA
  • Added RKADK interface and transparency / encoding detection

This layer provides the core hardware acceleration logic used by both LVGL 8.4 and 9.1.


⚙️ Dependencies

  • Rockchip Buildroot SDK (e.g. atk_dlrk3506_linux_sdk)
  • DRM kernel driver enabled (/dev/dri/card0)
  • RGA kernel driver enabled (/dev/rga)
  • FreeType library for text rendering
  • pthreads, SDL2 (optional)

🧪 Verified Environment

Component Version
Platform RK3506
Kernel 6.10.x
LVGL 8.4.0 / 9.1.0
Buildroot 2024.02
RGA Driver rga2 / librga
Display DRM Dumb Buffer
Status ✅ Stable and Hardware Accelerated

📈 Performance

Compared with pure software rendering:

  • RGA copy replaces memcpy() → up to 3× faster full-screen refresh
  • DRM double-buffering reduces tearing
  • Frame sync stability improved (especially with LV_COLOR_DEPTH=32)

Tested on: RK3506B, should work with all RK SoCs supporting RGA + DRM


📜 License

All patches are based on LVGL (MIT license) and Rockchip SDK sources. Refer to individual patch headers for detailed copyright information.


🧭 Future Work

  • Port to LVGL 9.3+ (to support LVGL’s new internal DRM API)
  • Integrate RGA scaling/blend support
  • Optional G2D acceleration backend for non-RGA chips

💡 If you find this useful, consider contributing test results for other RK platforms or submitting merge requests for LVGL 9.4 integration.

About

LVGL RGA/DRM Acceleration Patches for Rockchip Linux (RK3506B / RK3588 / RK356x) Hardware-accelerated LVGL (8.4 / 9.1) rendering for Rockchip Buildroot SDKs — with RGA blit optimization, DRM driver improvements, and optional SDL/OpenGL support. Verified on RK3506B.

Resources

Stars

19 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors