</>EmbeddedInterview
Topics / Display Driver

Display Driver Interview Questions and Answers

Display driver interview preparation for embedded Linux, Android, BSP and graphics engineers.

1 questionsLevel: Intermediate
01Explain the complete flow of a display driver in Linux.Medium✓

In Linux, modern display drivers are implemented using the DRM (Direct Rendering Manager) and KMS (Kernel Mode Setting) frameworks.

The display driver is responsible for configuring display hardware, managing framebuffers, processing pixels, and sending them to the physical display panel.

1. Complete Linux display architecture

ApplicationAndroid App / Linux ApplicationGraphics APIOpenGL ES / Vulkan / EGLDisplay CompositorSurfaceFlinger / Weston / X11DRM Userspace Interfacelibdrm / Hardware ComposerLinux DRM / KMS FrameworkAtomic commit / Mode settingSoC Display DriverMSM / Intel i915Display Controller (DPU)Planes / Mixer / Timing EnginePhysical Display PanelDSI / eDP / HDMI
Simplified userspace-to-hardware display architecture; rendering and scanout are separate operations.

2. Important DRM/KMS components

Component Responsibility
GEM Graphics buffer memory management
Framebuffer Describes pixel buffer, format, pitch and dimensions
Plane Reads framebuffer and performs scaling, cropping and rotation if supported
CRTC Controls composition, scanout and display timing
Encoder Represents the conversion of display output to an appropriate interface signal
Bridge Converts or processes display interface signals
Connector Represents the display output endpoint
Panel Represents the physical display panel
Framebuffers 0, 1, 2Separate pixel buffersPlanes 0, 1, 2Fetch, crop and scaleCRTC / Layer MixerCombine layers and control timingEncoder / BridgeDisplay linkConnector / PanelLogical output endpoint and physical display
Multiple hardware planes can be combined into a single display output. The connector is a logical KMS object.

3. Display driver initialization flow

During Linux kernel boot:

  1. Kernel reads the Device Tree or discovers hardware through ACPI/PCI.
  2. Display platform driver's probe() function is called.
  3. Driver initializes hardware resources: MMIO registers, clocks and regulators, interrupts, IOMMU, GPIOs and power domains.
  4. DRM device is allocated.
  5. Planes, CRTCs, encoders and connectors are initialized.
  6. Panel and bridge drivers are attached.
  7. DRM device is registered using drm_dev_register().
  8. Userspace gets access through /dev/dri/card0 (device number may vary).

4. Runtime display flow

Step 1: Frame rendering

The application uses OpenGL ES, Vulkan or CPU rendering to generate pixel data. The GPU or CPU writes the rendered frame into a graphics buffer in memory.

Step 2: Framebuffer creation

Userspace creates or imports a graphics buffer and registers a framebuffer using DRM APIs.

drmModeAddFB2();

The framebuffer contains metadata such as width, height, pixel format, pitch and buffer handles.

Step 3: Atomic commit

The compositor configures display properties and submits an atomic commit.

drmModeAtomicAddProperty();
drmModeAtomicCommit();

The corresponding kernel flow is approximately:

DRM_IOCTL_MODE_ATOMIC
        |
drm_mode_atomic_ioctl()
        |
drm_atomic_check_only()
        |
Driver atomic_check()
        |
drm_atomic_commit()
        |
Driver atomic_commit()
        |
Hardware register programming

Exact call paths vary by driver and kernel version.

Step 4: Atomic check

The driver validates the requested configuration:

  • Resolution and refresh rate
  • Pixel format
  • Plane availability
  • Scaling limitations
  • Memory bandwidth
  • Clock requirements
  • Hardware resource availability

If validation fails, the commit is rejected.

Step 5: Hardware programming

The driver configures the display controller registers, including framebuffer IOVA (when an IOMMU is used), stride, source and destination dimensions, pixel format, layer mixer and timing parameters.

Step 6: Display controller fetches pixels

The display controller independently fetches framebuffer data from DDR memory using DMA.

GPU / CPUWrites rendered pixelsDDR MemoryFramebufferDMA / IOMMUDisplay controller reads pixels; IOMMU translates if enabledDisplay ControllerProcessing and scanoutDSI / HDMI / eDPPixel stream to panel
The CPU does not need to transfer every pixel manually.

Step 7: VSync and page flip

At the appropriate display synchronization point, the hardware switches to the new framebuffer. The display controller generates interrupts, and the driver handles vblank events, page-flip completion and fence signaling. This allows smooth rendering and helps prevent tearing.

5. MSM/DPU display driver example

SurfaceFlinger / HWCUserspaceMSM DRM DriverAtomic commitSSPP (Source Surface Pixel Processor)Fetch, scaling and format conversionLayer Mixer (LM)Blending and compositionPing Pong / Timing / InterfaceDisplay synchronizationDSI Controller + PHYMIPI DSI transmissionDisplay PanelPhysical pixel output
Simplified Android display control and pixel pipeline.
Block Function
SSPP Fetches framebuffer data from memory
LM Blends multiple layers
CTL Controls configuration and hardware flush
DSPP Color correction and post-processing
Ping Pong Display synchronization
INTF Display interface and timing control
DSI PHY Physical transmission of display data

6. Panel power-on sequence

A typical panel initialization sequence is:

drm_panel_prepare()
    |
Enable regulators
    |
Perform GPIO reset sequence
    |
Send DSI / I2C initialization commands
    |
Configure display link and timing
    |
drm_panel_enable()
    |
Enable backlight (if applicable)

The exact ordering depends on the hardware and panel driver. Panel initialization commands and actual pixel transmission are separate operations.

7. Interview-ready answer (60 seconds)

Linux display drivers use the DRM/KMS framework. During boot, the driver initializes hardware resources and registers DRM objects such as planes, CRTCs, encoders and connectors.

During runtime, the application renders frames into graphics buffers using the GPU or CPU. The compositor creates framebuffers and submits an atomic commit through the DRM interface.

The kernel validates the configuration and programs the display controller registers. The display controller fetches pixel data from DDR using DMA, performs scaling and layer blending, and generates display timing. The pixel stream is then transmitted to the physical panel through DSI, HDMI or eDP.

VSync interrupts, page flips and synchronization fences ensure that frames are displayed correctly and help prevent tearing.

The most important distinction: The GPU renders pixels, whereas the display controller fetches, processes, composes and scans out those pixels to the display.