A systematic and deep-dive exploration of the Linux DRM/KMS subsystem on the Rockchip RK3588 (VOP2) platform. This project documents a professional display bring-up journey, transitioning from low-level register verification to modern, high-performance atomic synchronization.
- Architectural Mastery: Bridging the mental model between Linux ASoC (Audio) and DRM (Display), treating pixels as a specialized DMA stream.
- Modern API Transition: Complete migration from Legacy KMS (SetCrtc) to Atomic KMS (Property-based commits).
- Zero-Copy Pipelines: Implementation of DMA-BUF (PRIME) for efficient cross-device memory sharing without CPU intervention.
- Performance Optimization: Inner-loop branchless rendering and Fence-based hardware synchronization to eliminate UI jitter and tearing.
I have structured the bring-up process into 11 progressive experiments:
- KMS Pipeline Mapping: Analyzing internal VOP2 resources (VP0-VP3) and Plane constraints.
- Modetest Mastery: Hands-on with atomic modesetting and troubleshooting object IDs.
- DSI Panel Bring-up: Calculating Video Timings and verifying PCLK/DPHY registers.
- DRM Master Concepts: Navigating ownership conflicts between
fbconand userspace clients.
- Composition & Sync: Understanding hardware layering (Z-order) and GEM/Fence roles.
- VBlank & Page Flip: Real-time monitoring of VOP interrupts to verify the display "heartbeat."
- Userspace KMS C-API: Implementing the first framebuffer renderer using
libdrm. - Double Buffering & Branchless: Scaling to multi-buffer architectures and CPU pipeline optimization.
- VBlank Sync vs. Tearing: Analyzing the scanout race condition and the physics of screen tearing.
- Atomic KMS Mastery: Fully migrating to the Atomic property model and
TEST_ONLYvalidation. - DMA-BUF & Fence Sync: Simulating cross-device pipelines with PRIME and explicit fences (
IN_FENCE_FD).
- Target Hardware: LubanCat 5 (Rockchip RK3588, VOP2)
- Software Stack: Ubuntu Lite (Minimal CLI),
libdrm,linux-libc-dev. - Analysis Tools:
modetest,debugfs(KMS status),GICv3interrupt analysis.
- Unified Memory Coherency: Deep understanding of
DMA_BUF_IOCTL_SYNCfor cache maintenance on ARM SoCs. - Proprietary Driver Strategies: Successfully simulated cross-namespace GEM sharing on platforms with proprietary Mali stacks.
- Fixed-Point Precision: Handling 16.16 fixed-point source coordinates required by modern display hardware.
Signed-off-by: TomHsieh300 hungen3108@gmail.com