Sonoff NSPanel Pro 120: Linux Display Subsystem [Part 1]

Sonoff NSPanel Pro 120: Linux Display Subsystem [Part 1]

The first thing we would like to get working in our fresh Linux build is, of course, the LCD screen, as it is essential for running any kind of desktop environment.

The graphics stack on Linux can be a bit complicated. The following diagram illustrates the full relationship between the components.

I want you to take a look at the Display Server , libDRM , and the Linux kernel block . Let’s simplify it a bit by removing 3D acceleration and 3D graphics APIs , as we won’t cover them in this topic. The simplified diagram for 2D Graphics that we will reference is as follows:

Awesome! Now we see a userspace layer that creates all the graphics, and the libDRM library is used for communication between kernel space and userspace. Our goal is to focus on the DRM driver in the kernel space. Let’s check the terminology and find out what all the names in the green block mean in the context of Rockchip:

  • CRTC (aka Display Controller, VOP, LCDC) :
    In the Rockchip RK3326 platform, the CRTC is a display controller that transmits images from the Plane layer to the Encoder . On the RK3326 device its referenced as VOP (Video Output Processor)
  • Plane (aka Layer, Win) :
    In the Rockchip platform, a Plane is an abstraction of the win layer within the CRTC module inside the SoC. Win layers are used to represent layers that can be stacked on top of each other (e.g., a video playing on top of another window). There is also a dedicated Win layer for the cursor.
  • Encoder (Output Converter) :
    An Encoder is responsible for converting the pixel data from the display controller (CRTC) into a format suitable for transmission over a specific display interface. It acts as a bridge between the CRTC and the Connector . Examples of display interfaces include RGB , LVDS , DSI , eDP , DP , HDMI , CVBS , and VGA .
  • Connector :
    A Connector represents the physical interface between Encoder and the external display panel or monitor. It is the point where the display signal leaves the system and connects to the actual display device.
  • Bridge (Bridging Device) :
    Typically used to register additional conversion chips connected after the encoder, such as a DSI-to-HDMI conversion chip.
  • Panel (aka Display device, Monitor, Display panel):
    A general term for screens, representing an abstraction of various LCD display devices.
  • GEM (Graphics Execution Manager) :
    Buffer management and allocation under DRM, similar to ION or DMA BUFFER.

Still, there are a lot of new terms, but we are slowly reaching our core interest: the Display Subsystem (DSS) . It is a general term for the software and hardware systems related to display output on the Rockchip platform. It includes the VOP, as well as the Connector, Encoder , and Panel.


Let’s finally review the path that an image in the Frame Buffer should take in order to be displayed on the panel:


Awesome! In the next article, we will map the abstractions we recently learned about (Display Subsystem, VOP, Encoder, Connector, Panel ) to the DTS (Device Tree) and configure them to display a Linux desktop. Stay Tuned!