Skip to content

kernel: Decode HEVC in hardware on the A9 and A10 iPads - #121

Merged
henrikklee merged 2 commits into
OrchardLinux:mainfrom
brkosebay:j71t/vxd-hevc
Nov 12, 2026
Merged

henrikklee merged 2 commits into
OrchardLinux:mainfrom
brkosebay:j71t/vxd-hevc

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

Part 15 of 23 of the iPad 5 (J71t) series in this repository; merge after #120.

Problem

The VXD decoder only exposed H.264, so HEVC video was decoded on the CPU.

Change

Prepare the driver for a second coded format, add the HEVC command-stream builder and the stateless HEVC decoder, enable it on the S8000 and T8010 variants, and require a proven firmware stop before kexec. Adds the video_decode_hevc feature (working on J71t, untested on the other boards that have the driver, missing elsewhere).

Testing

  • Hardware: iPad 5 Wi-Fi (J71t). Hands-on testing on 2026-11-11 with an integrated build of this series, made before the final failure-path fixes, covered HEVC and H.264 decoding, bit-exact against software decoding.
  • 2026-11-12: HEVC decoding was tested by hand on J71t with the release build and works.
  • Host: the Linux test suite passes at this branch's head, and the kernel and m1n1 patch series apply on apple-16k and apple-4k. At the top of the series the applied kernel tree is identical to the one in the built release image.
  • Other boards that share these drivers or compatibles have not been tested.

Dependencies

Depends on #120.

This branch is stacked on the PRs it depends on and carries their commits; the change of this PR is its last commit, "media: apple-vxd: Stateless HEVC decoding on S8000 and T8010".

🤖 Generated with Claude Code

The VXD video decoder of the S8000/S8003 (A9) and T8010 (A10) also
decodes HEVC (H.265). Add a stateless HEVC decoder beside the H.264
one, with the per-SoC values Apple's driver uses. H.264 stays the
first and default format; HEVC shows up as a second one.

From orchard PR OrchardLinux#121 (commit 4016f5e): patches 0008-0011 there, the
last two adapted to main, which does not carry the VXD sleep changes of
PR OrchardLinux#117. The kexec firmware-stop patch (0012 there) belongs to the warm
restart topic and is not part of this one.
J71t decodes HEVC bit-exact against software decoding (tested by hand
on 2026-11-11 and 2026-11-12). The other iPads with the decoder enabled
(J71s, J72s, J72t, and the iPad 6 J71b/J72b) are untested; every other
board has no decoder node and is missing it.

From orchard PR OrchardLinux#121 (commit 4016f5e), device data part.
@henrikklee henrikklee changed the title media: apple-vxd: Stateless HEVC decoding on S8000 and T8010 kernel: Decode HEVC in hardware on the A9 and A10 iPads Nov 12, 2026
@henrikklee

Copy link
Copy Markdown
Contributor

Landing this as your commits. Patches 0008-0011 are in, the last two adapted to main (it does not carry the VXD sleep changes of #117, so the S8000 variant has no sleep_stop). The kexec firmware-stop patch (0012) is not part of this topic; it goes with warm restart. The device data is yours unchanged: HEVC working on J71t, untested on the other iPads with the decoder, missing elsewhere. Your previous head is kept as tag contrib/brkosebay-j71t-vxd-hevc. Please check HEVC decoding on the next nightly.

@henrikklee
henrikklee merged commit 18f78d7 into OrchardLinux:main Nov 12, 2026
1 of 3 checks passed
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in drivers/usb are renumbered to follow
main's.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, drivers/base and drivers/usb
are renumbered to follow main's.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, drivers/base and drivers/usb
are renumbered to follow main's.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, drivers/base,
drivers/pmdomain and drivers/usb are renumbered to follow main's.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, drivers/base,
drivers/pmdomain and drivers/usb are renumbered to follow main's.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, devices/t8010, drivers/base,
drivers/media, drivers/pmdomain, drivers/power and drivers/usb are
renumbered to follow main's.

Main's versions apply first now, so 0011 in drivers/media keep their
change with a diff regenerated for the new context.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
From OrchardLinux#121, the patch main did not take with HEVC. It uses the VXD
sleep stop and sleep gate this branch adds, so it sits here rather
than with the earlier warm restart branch: a failed firmware stop keeps
the firmware, command buffers and power, and kexec takes the cold-reset
path before those pages become the next kernel's RAM.

Assisted-by: LLM
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, devices/s8003,
devices/t8010, drivers/base, drivers/media, drivers/pmdomain,
drivers/power and drivers/usb are renumbered to follow main's.

Main's versions apply first now, so 0011 in drivers/media keep their
change with a diff regenerated for the new context.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, devices/s8003,
devices/t8010, drivers/base, drivers/media, drivers/pmdomain,
drivers/power and drivers/usb are renumbered to follow main's.

Main's versions apply first now, so 0011 in drivers/media keep their
change with a diff regenerated for the new context.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, devices/s8003,
devices/t8010, drivers/base, drivers/media, drivers/pmdomain,
drivers/power, drivers/soc-apple and drivers/usb are renumbered to
follow main's.

Main's versions apply first now, so 0011 in drivers/media keep their
change with a diff regenerated for the new context.
brkosebay added a commit to brkosebay/hardware that referenced this pull request Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122,
OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or
reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic,
main's version is kept; the left-out parts that warm restart and
suspend need come back in OrchardLinux#107 and OrchardLinux#117.

This branch's own patches in devices/s8000, devices/s8003,
devices/t8010, drivers/base, drivers/media, drivers/pmdomain,
drivers/power, drivers/soc-apple and drivers/usb are renumbered to
follow main's.

Main's versions apply first now, so 0011 in drivers/media keep their
change with a diff regenerated for the new context.
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.

2 participants