Skip to content

media: apple: jpeg: T8142 (M5) JPEG engines, enabled on J815 - #1880

Merged
RyanTheTide merged 4 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-jpeg
Nov 15, 2026
Merged

RyanTheTide merged 4 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-jpeg

Conversation

@m0d16l14n1

Copy link
Copy Markdown
Contributor

The M5 (T8142) JPEG engines, programmed as on T6050, and enabled on J815.

  1. dt-bindings: apple,t8142-jpeg, with T6050's layout.
  2. media: apple: jpeg: apple,t8142-jpeg takes apple_jpeg_t6050. Traced under aura's hypervisor on a J815 running macOS 27.2.1 (26B131), VideoToolbox encodes and hardware decodes: AppleJPEGDriver writes T6050's 124-write reset image unchanged, the same twelve DMA identifiers and T6050's encode job (CODEC/PX_MODE 3, tiles 2/16 and 2/8, ENC_CTRL 0x35, MODE 0x74f, IO flags 0xb2, Huffman 0x550, QTBL_SEL 0x14). The ADT's hw-type 0x110010 is the HWREV a J815 reads back.
  3. t8142.dtsi: the JPG power state (pmgr device 64, +0x2a0), dart-jpeg's power domain and range, jpeg0 (0x301000000, IRQ 1156, SID 0) and jpeg1 (0x301060000, IRQ 1159, SID 1), disabled.
  4. t8142-j815.dts: enable them.

Tested on J815 (7.3.0, this series on integration/aurora): NV12 to JPEG on both engines at 1280x720 and 1920x1080, 30 frames each, decoded by ffmpeg: worst luma PSNR 42.6 dB, interrupts rising on every run. The driver's KUnit suite passes (14/14). checkpatch --strict clean; CHECK_DTBS clean for J815, J813 and J704 on the touched schemas.

Part of the J815 (MacBook Air 15-inch, M5, T8142) bring-up: board results are summarised in discussion #135.

Assisted-by: Claude Opus 5.5

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. The driver change is a single match entry on the existing T6050 data, so the T6050 path is unchanged. The DT nodes are new and enabled on J815 only. Approving.

It now conflicts with #1883, which is merged: both append at the same places in t8142-j815.dts and t8142-peripherals.dtsi. Could you rebase it on integration/aurora? It merges once CI is green on the rebased head. #1881 has the same conflict, so rebasing this one first and #1881 after it merges avoids a second round.

The M5 (T8142) has two JPEG engines that the driver programs as on
T6050. Take the T8142 compatible beside T8132's and T6050's, with the
same register and interrupt layout.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
…T6050

The T8142 ADT describes jpeg0 and jpeg1 as "jpeg,t8101" with hw-type
0x110010, the HWREV a J815 reads back.

Traced under aura's hypervisor on a J815 running macOS 27.2.1 (26B131),
VideoToolbox JPEG encodes and hardware decodes: AppleJPEGDriver writes
T6050's 124-write reset image unchanged, the same twelve DMA
identifiers, and T6050's encode job: CODEC and PX_MODE 3, tiles 2/16 and
2/8, ENC_CTRL 0x35, the addresses low words first, prefetch, PRE_ENCODE
0, MODE 0x74f, IO flags 0xb2, 16-bit quantiser tables, Huffman 0x550 and
QTBL_SEL 0x14. (It also fills tables 2 and 3, which QTBL_SEL never
selects.) So apple,t8142-jpeg takes T6050's data, as T8132 takes
T6041's.

Tested on a J815 (7.3.0, integration/aurora): NV12 to JPEG on both
engines at 1280x720 and 1920x1080, 30 frames each, decoded by ffmpeg:
worst luma PSNR 42.6 dB, interrupts rising on each run; the driver's
KUnit suite passes (14/14).

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
jpeg0 (0x301000000, IRQ 1156) and jpeg1 (0x301060000, IRQ 1159) share
dart-jpeg as SIDs 0 and 1 (vm-base 0x100_0000_0000). Their power gates
JPG0-V/JPG1-V are virtual PMGR entries under JPG (pmgr device 64,
+0x2a0). Describe the JPG power state, the DART's power domain and
range, and both engines, disabled.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Rebased on integration/aurora 1f5037a. Head is now c3c1417.

The only conflicts were the ANE nodes from #1883, which sit in the same places in t8142-peripherals.dtsi and t8142-j815.dts. I kept both sets of nodes. git range-diff shows the binding and driver commits unchanged; the two DT commits differ only in context lines. CHECK_DTBS for J815, J813 and J704 with the jpeg, pmgr-pwrstate and dart schemas reports nothing new.

I'll rebase #1881 once this one lands.

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr this is approved, mergeable and green. It also passes on the macOS 27.2 stub now: J815 boot 9a636e2e, JPEG 4/4 (both engines, 720p/1080p, 42.6 dB). Could it be merged?

Assisted-by: Claude Opus 5.5

@RyanTheTide
RyanTheTide merged commit d962e93 into aurora-silicon:integration/aurora Nov 15, 2026
2 checks passed
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.

3 participants