Skip to content

A8 (T7000) display pipe: KMS and display-DART scanout — iPod touch 6, testers wanted on iPhone 6 and iPad mini 4 - #204

Open
brkosebay wants to merge 13 commits into
OrchardLinux:mainfrom
brkosebay:a8-display-adbe
Open

brkosebay wants to merge 13 commits into
OrchardLinux:mainfrom
brkosebay:a8-display-adbe

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

Depends on #196 (the A8 GPU and devices/n102). This branch carries #196's commits, so review only the last 5 commits. It does not depend on #199–#202: the patches apply with or without them.

The A8 boards show their desktop on simpledrm, so every frame is copied into the boot framebuffer and no client buffer can be scanned out. This PR ports the A9/A10 display pipe driver (drm/adbe) and its display DART to the A8 (T7000). On the iPod touch 6 it takes the panel over from simpledrm and scans GPU buffers out directly through the DART.

Commits

  • kernel: drm/adbe: the A8 (T7000) display pipe
    • drivers/drm/0012: the binding gets apple,t7000-display-pipe, with the ADP and display DART windows only, as for the A10. It has no S8000 fallback, because the S8000 match reads the SPDS register.
    • drivers/drm/0013: per-SoC match data. In the A8's iOS 12 kernelcache, AppleH7ADBE0 drives the same AppleH7DisplayPipe as the A9's AppleH8ADBE0, with the same FIFO, layer, blend-CRC and format registers. The A8's kext never reads the SPDS version (0x1014), so the driver doesn't either. The connector is MIPI DSI. Every other adoption check is unchanged. A refused adoption now logs the registers it read.
  • kernel: t7000: the display pipe and its DART; enabled on the iPod touch 6
    • devices/t7000/0021 (renumbered below): disp0 (adbe0,t7000) and dart-disp0 from the ADT, with a deferred-attach scanout master as on the A9. Both disabled.
    • devices/t7000/0022: N102 enables disp0.
  • kernel: drm/adbe: eDP on the iPad mini 4, A8 panel sizes, system_dfl_wq
    • drivers/drm/0014: the T7000 binding allows an optional fourth dp window, the DisplayPort transmitter.
    • drivers/drm/0015: a pipe with a dp window registers an eDP connector; the A8 default stays MIPI DSI.
    • drivers/drm/0016: the panel-size table is per SoC, so the iPad mini 4's 1536x2048 7.9-inch panel isn't taken for the 9.7-inch iPad's. The iPhone 6, 6 Plus and iPad mini 4 panels are added.
    • drivers/drm/0017: the framebuffer hold work runs on system_dfl_wq; the iPod touch 6 warned that system_wq is deprecated.
  • kernel: t7000: the display pipe on the iPhone 6, 6 Plus and iPad mini 4 (devices/t7000/0023–0026), from each board's ADT in the iOS 12.4 (16G77) IPSW:
    • N61 and N56 have the iPod touch 6's disp0, dart-disp0 and two-lane MIPI DSI link; disp0 is enabled.
    • The iPad mini 4 (J96, J97) drives eDP: its pipe gets ps_dp and the transmitter's window (0x206700000), then disp0 is enabled. The panel supply (PMU GPIO 17) is not described yet.
  • kernel: t7000: the display pipe patches after the iPod touch 6 series. The device-tree patches move to 0021–0026, because iPod touch 6 (N102): internal storage on ANS1, installable #199–iPod touch 6 (N102): battery status from the D2186 PMIC #202 use devices/t7000/0013–0020. The pipe and its DART sit after the GPU node in t7000.dtsi, where iPod touch 6 (N102): internal storage on ANS1, installable #199's ASP nodes don't change the context. No node changes.

CONFIG_DRM_APPLE_ADBE is already =y on apple-4k. dart-disp0 stays disabled in every device tree; the display driver enables it once it has mapped the live scanout.

Tested (iPod touch 6)

Build and patch checks for this head:

Not tested

  • J96, J97, N61, N56: enabled from their ADTs only; nothing has run there. Testers are wanted: the tester kit (https://github.com/brkosebay/hardware/releases/tag/a8-gpu-tester-kit-4) has a display step. Please report the board, dmesg | grep -iE 'adbe|dart|simpledrm' and the display step's output. If adbe refuses the pipe, it logs why and simpledrm stays bound.
  • iPad mini 4: the eDP connector is untested. Its panel supply is not described, and the driver's sleep retrain uses the A9's DPTX offsets, which haven't been compared with the A8's.
  • System sleep: the A8 panel stays on, because there is no panel power-off path for MIPI DSI yet.
  • Shared code: drivers/drm/0013 and 0016 move per-SoC data into the driver's match table. The A9 and A10 entries keep their values and paths, but were not retested on those boards.
  • dt_binding_check and dtbs_check were not run.

Proposed changelog line: "A8 boards: KMS display pipe with direct scanout through the display DART (iPod touch 6; iPhone 6, 6 Plus and iPad mini 4 untested)."

🤖 Generated with Claude Code

The A8's GX6450 runs the same family of firmware as the A9's, so it
becomes a variant of the S8003 chip file rather than a new driver
(drivers/gpu/0063-0073):

- 0063-0064: the S8003 chip described in a variant table, and chip
  hooks for its own GPU ID read and heap table. These touch the A9 and
  A10 paths; their values and functions are unchanged.
- 0065: dt-bindings for apple,t7000-gpu.
- 0066: a GPU node without power domains, and the failing probe step
  named (shared powervr code; nodes with power domains are unchanged).
- 0067-0069: the A8's firmware boot and power up and down in Apple's
  order, compute jobs, and TA/3D render jobs with the parameter-manager
  pool (a8_pm_blocks, a8_pm_grow) and the region-header ring kept in
  the HWRT data set.
- 0070: fault and hang reports and recovery.
- 0071: completion checks in the firmware interrupt's thread, the
  re-check after an early interrupt, a publish that cannot leave a
  failed job in the firmware's ring, Apple's doorbell.
- 0072: a fragment job submitted behind its geometry job, with two
  alternating 3D records (a8_joint, off by default).
- 0073: statistics and the A8's job timeline in debugfs apple_jobs,
  last. It also points the firmware's TA and 3D time words at the
  channel's times; the series without it has not run on the device.

Config: CONFIG_DRM_POWERVR_APPLE goes from unset to =y on apple-4k, as
on apple-16k, so the A8 gets powervr's Apple glue. It builds into the
powervr module on every A7, A8 and A8X kernel; only boards whose device
tree enables an apple,t7000-gpu node bind it.

Assisted-by: LLM
The iPod touch 6 RAM-boots through checkm8, PongoOS and m1n1 to the USB
serial shell. Its descriptor, boot assets and firmware recipe pin the
public iOS 12.5.8 IPSW.

devices/t7000/0011 describes the A8's GPU in t7000.dtsi (the Rogue core,
Fender, the power manager and GPU bridge registers, five interrupts,
the firmware name) and enables it on the N102, where powervr's A8
variant runs Vulkan and OpenGL ES (through Zink) jobs.

Orchard's feature list has no GPU entry and the chip's [gpu] table
records dEQP results, which the A8 does not have yet, so the GPU state
is in devices/n102/README.md. docs/compatibility.md is regenerated.

Assisted-by: LLM
The iPad mini 4 (J96, J97) and the iPhone 6 and 6 Plus (N61, N56) have
the iPod touch 6's A8 GPU. devices/t7000/0012 enables the GPU node in
their shared board files (t7000-mini4.dtsi, t7000-6.dtsi) so people with
these boards can test it; the driver has run only on the iPod touch 6.
Each board's README asks for the probe and ladder results. The A8X
(T7001) has a different GPU and is unchanged.

Assisted-by: LLM
minimal-boot with a constant USB serial number, the kernel's modules,
the GPU firmware and a8-gpu-drm-test, which loads powervr and checks the
probe, Mesa's Vulkan path and two DRM-level replays, each step under a
hardware watchdog with its kernel lines saved. It builds for every A8
board (n102, j96, j97, n61, n56).

tools/extract-fw.py writes the GPU firmware and its border colour table
from Apple's public iPod touch 6 iOS 12.4 IPSW, read over HTTP ranges
with orchard's own IPSW and kernelcache code, or from another IPSW or
kernelcache. Nothing from Apple is in the repository, and everything
build.sh stages is git-ignored.

Assisted-by: LLM
a8-vk-smoke (Vulkan probe, compute, a triangle) and a8-vk-ladder, a set
of Vulkan tests from one clear to vkmark's scenes with every pixel or
value checked on the CPU, both MIT. vk/make-bundle.sh builds them with a
Mesa build of the A8 branch into the self-contained /opt/a8vk bundle
that build.sh's A8_VK_DIR stages, with vkmark when it is installed.

Assisted-by: LLM
The iPod touch 6's display pipe is the A9's: in its iOS 12 kernelcache,
AppleH7ADBE0 drives the same AppleH7DisplayPipe as the A9's AppleH8ADBE0,
with the same ADP control, parameter FIFO, layer and blend CRC registers.
Its kext has no SPDS version check, so the driver reads no SPDS register
there either, and its panel link is MIPI DSI.

- drm/0012: the binding gets "apple,t7000-display-pipe", without the S8000
  fallback (whose driver reads the SPDS register), described as the A10
  is: the ADP and display DART windows only.
- drm/0013: per-SoC match data (SPDS check, connector type), the iPod
  touch 6 panel's physical size, and a refused adoption logs the
  registers it read.

Assisted-by: LLM
…ch 6

- t7000/0013: disp0 ("adbe0,t7000") and dart-disp0 from the ADT, with a
  deferred-attach scanout master as on the A9, both disabled.
- t7000/0014: n102 enables disp0, which takes the panel over from
  simpledrm and scans client buffers out through the display DART once
  its self-check passes.

The iPhone 6 and 6 Plus and the iPad mini 4 stay on simpledrm until their
device trees are compared with this one.

Assisted-by: LLM
- drm/0014: the binding lets "apple,t7000-display-pipe" carry the
  DisplayPort transmitter's window as an optional fourth "dp" region.
- drm/0015: a pipe with a "dp" window registers an eDP connector; the A8
  default stays MIPI DSI.
- drm/0016: the table of panel sizes is per SoC, so the iPad mini 4's
  1536x2048 7.9-inch panel is not taken for the 9.7-inch iPad's; the
  iPhone 6, 6 Plus and iPad mini 4 panels join the iPod touch 6's.
- drm/0017: the framebuffer hold work runs on system_dfl_wq; the iPod
  touch 6 warned that system_wq is deprecated.

Assisted-by: LLM
From each board's Apple device tree (iOS 12.4, 16G77):

- t7000/0015, 0016: the iPhone 6 and 6 Plus have the iPod touch 6's
  disp0, dart-disp0 and two-lane MIPI DSI link; disp0 is enabled.
- t7000/0017: the iPad mini 4 drives eDP: its pipe holds ps_dp instead
  of ps_mipi_dsi and gets the transmitter's window (0x206700000). The
  panel supply (PMU GPIO 17) is not described yet.
- t7000/0018: disp0 is enabled on J96 and J97.

dart-disp0 stays disabled on every board; the display driver enables it.
Only the iPod touch 6 has run this pipe so far.

Assisted-by: LLM
The iPod touch 6's storage, touch, Wi-Fi and battery series uses
devices/t7000/0013-0020. The display pipe patches move to 0021-0026, so
the two series don't interleave when both are in the tree, and the
pipe and its DART go after the GPU node in t7000.dtsi, where the ASP
nodes don't change the context. The patches then apply on either base,
with or without that series. No node changes.

Assisted-by: LLM
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