Documentation
On this page

Subsystems

Display

The panel, LK's framebuffer and the display pipe: hardware, driver, boot-args, status and known issues.

Hardware

A 1080 x 2412 panel, an ILI7807S driven in DSI video mode (the panel LK picks reports as ili7807s_fhdp_dsi_vdo_boe_boe), through MediaTek’s display pipe: OVL0 (0x14005000) reads the framebuffer, and the pipe has a resizer (RSZ0, between OVL0 and RDMA0) and a colour-correction block. LK leaves the pipe running with one overlay layer reading a framebuffer of 4320-byte rows at 0x771b0000 (it triple-buffers, 0xa18000 bytes a buffer). Nothing initialises the panel again: the driver takes over what LK left.

Driver

MappleFramebuffer.cpp is the display’s IOKit service (AppleCLCD‘s stand-in). It publishes the panel memory as an IOSurface and copies the layers’ surfaces in with the CPU, or, with direct scanout, points the overlay layer at a full-screen contiguous surface. It double-buffers (the layer switches at a frame end, found from the overlay’s frame-complete bit), runs a 60 Hz vsync timer locked to that, queues GPU-drawn frames until their jobs finish, and sets the backlight through the panel’s DCS command. The display is presented to iOS as the iPhone X’s 1125 x 2436, with the real panel’s centre shown; MappleLetterbox.h and the resizer put the whole picture under a black strip that holds the camera hole. MappleSurface.cpp allocates the IOSurfaces. The scaler (MTKScaler.cpp, MTKMDP.cpp, MTKJPEG.cpp in the MT6781 layer) is shared with the viva port.

Device tree

/arm-io/disp0 (mapple,display, the canvas size) and /mapple-fbcon (LK’s framebuffer: reg, width, height, stride); /chosen’s mapple-resize when resize 1. See Device tree.

Boot-arguments

mp_fb_* and mp_panel_* in the catalogue: mp_fb_native, mp_fb_rsz, mp_fb_letterbox, mp_fb_scanout, mp_fb_flip, mp_fb_noconsole, mp_fb_bloff, mp_fb_blmin, mp_fb_blcal and the rest. mp_fb_noconsole=1 is in the spaced line. mp_panel_hz, mp_panel_idle and mp_panel_seq are written for the viva phone’s 120 Hz Xiaomi panel; spaced stays at the default 60 Hz.

User space

The Mapple app’s Hide notch switch turns the resizer and the strip on or off; its Light UI switch is the root’s Reduce Motion presets (light_ui).

Status

device.conf: partial: the framebuffer LK leaves (1080 x 2412), the UI drawn through Metal on the GPU (mp_gpu=2) or in software; with resize 1 the whole picture at its own aspect under a black strip, scaled by the display pipe’s resizer at scanout.

Seen: the lock screen and SpringBoard drawn by the CPU (smoke run 3); the letterbox and the strip holding the hole (runs 35 and 36); the resizer on LK’s layer (runs 36 and 37); Hide notch on and off from the app (run 46); the brightness slider setting the backlight, kept across a wake and a reboot (run 47, on a development build).

Known issues

  • The lowest brightness levels were too dark in runs 45 and 46. mp_fb_blmin now sends iOS’s levels 1 to 2047 as N to 2047, and the first level iOS sets is ignored when it is 0; the fix is not proven on a release build.
  • Automatic brightness is not there (the light sensor’s reports are not used yet).
  • The release build’s boot screen text is changing; see Install guide.

Source files

iokit/Kernel/arm/MappleFramebuffer.cpp, MappleSurface.cpp, MappleLetterbox.h of the kernel at 76b737c; iokit/Kernel/arm/MTKScaler.cpp, MTKMDP.cpp, MTKJPEG.cpp of the MT6781 layer at 426b4f6; tools/mkadt.py of mapple_build at f7431bb.

Applies to realme 8i (spaced), release 1 · Updated 15 November 2026