Skip to content

ARM: apple: Drive every 32-bit board's screen with simpledrm - #110

Merged
henrikklee merged 3 commits into
armv7from
armv7-simpledrm
Dec 2, 2026
Merged

henrikklee merged 3 commits into
armv7from
armv7-simpledrm

Conversation

@henrikklee

Copy link
Copy Markdown

Every 32-bit board now shows its screen through simpledrm, as the 64-bit boards do, instead of the old simplefb driver. For the iPad 3 this turns on the upright desktop from #103: simpledrm turns iBoot's sideways scanout as it copies it, so the console and the desktop both come up in portrait.

What each board family gets

Family Boards Screen Upright how
A5 iPad mini 1 (P105) 768 x 1024 portrait, as iBoot leaves it already upright
A5 iPad 2 (K93) 1024 x 768 landscape, as iBoot leaves it stays landscape (Home button on the left): this board's touch and motion sensors are set up for that screen, so a portrait turn would have to change them too
A5X iPad 3 (J1, J2, J2A) iBoot's 2048 x 1536, turned by simpledrm to 1536 x 2048 portrait rotation = <90> (from #103). fbcon=rotate:1 is dropped from the command line, or the console would be turned twice
A6 iPhone 5 (N41, N42) 640 x 1136 portrait already upright
A6X iPad 4 (P101, P102, P103) iBoot's 2048 x 1536, turned to portrait new: rotation = <90>. The iPad 4 has the iPad 3's panel and the same eDP block (its Apple device tree calls it "edp,s5l8945x" too). Not booted yet: if iBoot hands over a portrait size there, this is the one line to drop

On every board the boot console still shows: simpledrm's fbdev emulation gives fbcon /dev/fb0 (DRM_FBDEV_EMULATION and FRAMEBUFFER_CONSOLE stay on by default with FB=y). Every framebuffer node already has the simple-framebuffer compatible, a memory-region and width/height/stride/format. m1n1's 32-bit kboot (src/arm32/a32_kboot.c) writes the reservation and reg, width, height and stride from iBoot's boot arguments, keeps the format, and leaves rotation alone. So the nodes it hands over work with simpledrm, and simpledrm maps the memory region write-combined.

Things only the 32-bit path got from simplefb, and what happens to them now

  • iPad 3 early boot log (earlycon=j1fb, orchard#79): it stops drawing as soon as any framebuffer is registered, now simpledrm's, and hands the panel to fbcon. That works the same way; only its comments change.
  • apple-sgx (A5 GPU) fbcon acceleration (debugfs "fbcon", fbcon_gpu, off by default): it drew straight into the scanout that simplefb's fbdev used. simpledrm's fbdev draws into a shadow buffer in system memory, so the hook does not attach (it already checked smem_start) and now logs why. fbcon draws with the CPU, as it does by default anyway.
  • apple-sgx's KMS on the P105 and K93: those boards now have two display cards, simpledrm's and apple-sgx's, both on the same scanout memory. The desktop has to open apple-sgx's card only. Omarchy A's session picks it in a separate change (linked in the orchard pull request).

Half-size presentation (simpledrm.zoom)

It is not turned on anywhere. It only works on a turned scanout, so the boards that could set it are the iPad 3 and the iPad 4: simpledrm.zoom=2 on the command line presents their desktop at 768 x 1024, with a quarter of the pixels to draw without the GPU. Comments in the shared iPad 3 and A6X files say so.

Config

orchard_applearmv7_defconfig: DRM_SIMPLEDRM=y and FB_SIMPLE dropped (the two cannot both be built). Expanded with make orchard_applearmv7_defconfig, the config differs from orchard's current one in exactly those two lines.

Not booted: device trees compiled with dtc for all ten boards. CI builds the kernel.

…pledrm

Build simpledrm in and drop simplefb, as the 64-bit boards do.  FB_SIMPLE
depends on !DRM_SIMPLEDRM, so the two cannot both be built.  simpledrm
binds the same simple-framebuffer node, from its memory-region, and its
fbdev emulation (DRM_FBDEV_EMULATION, on by default with FB) still gives
fbcon a framebuffer, /dev/fb0, so the boot console keeps showing.

With simpledrm the iPad 3's scanout is presented upright by the driver
(the framebuffer node's rotation = <90>), and fbcon draws on that upright
framebuffer: drop fbcon=rotate:1 from the iPad 3 command line, or the
console would be turned twice.  earlycon=j1fb still stops drawing once a
framebuffer is registered, now simpledrm's.

Assisted-by: LLM
Signed-off-by: Henrik Klee <henrik@goat-code.com>
The iPad 4 has the iPad 3's 2048 x 1536 panel behind the same eDP block
(its ADT's edp node is "edp,s5l8955x", "edp,s5l8945x").  The iPad 3's
iBoot scans it out landscape and simpledrm presents it portrait with
rotation = <90>; set the same on the A6X's framebuffer node, so the iPad 4
comes up upright as well.

Assisted-by: LLM
Signed-off-by: Henrik Klee <henrik@goat-code.com>
Comments that named simplefb now name simpledrm.  The K93's framebuffer
node says why it has no rotation: its desktop is the landscape screen,
and its touch and motion sensors are described in that screen's axes.

apple-sgx's fbcon acceleration (debugfs "fbcon", fbcon_gpu, off by default)
drew fbcon's fills and copies straight into the boot framebuffer, which
simplefb's fbdev was.  simpledrm's fbdev draws into a shadow in system
memory instead; the hook already refused it (smem_start differs), and now
says so in the log.

Assisted-by: LLM
Signed-off-by: Henrik Klee <henrik@goat-code.com>
@henrikklee
henrikklee merged commit 7d3cec3 into armv7 Dec 2, 2026
3 checks passed
@henrikklee
henrikklee deleted the armv7-simpledrm branch December 2, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant