Skip to content

media: apple: scaler: scale on the MMIO engines - #4165

Merged
RyanTheTide merged 3 commits into
mainfrom
media-parity/mmio-scale
Dec 3, 2026
Merged

RyanTheTide merged 3 commits into
mainfrom
media-parity/mmio-scale

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

The MMIO scaler engines (M1 to M4 generations, A18 Pro) now scale. Until now they only converted: a CAPTURE format of another size came back at the source size, and GStreamer's V4L2 converter passed a top-left crop of the source off as a resized picture.

Closes #4102
Refs #3614

Problem: on MSR hardware-version 10-22 the driver forced CAPTURE to the OUTPUT size and ran every job with the polyphase filters off. NV12 1920x1080 -> 1280x720 returned 1920x1080 on the M4 Pro and the A18 Pro.

Change: program the scaler. Each axis gets its steps, a centred initial phase and a generated filter in both banks. The filters use the same Kaiser windowed-sinc kernels and ratio bins as the MSR23 table, generated by tools/media/apple-scaler/mmio_filters.py. CAPTURE keeps its own size within 4x either way per axis. The lossless layout stays at 1:1. Jobs at 1:1 program the same values as before.

Tested: 7.3.0-aurora-fleet94 with this module (W=1 clean, checkpatch --strict clean, KUnit arm64 29/29 including 3 new cases) on the M4 Pro (J616s, MSR21). Every scaled job ran at the requested size with no kernel messages. PSNR-Y against swscale lanczos (frame 0 detail / frame 1 bars):

  • NV12 1080p -> 720p: 49.8/56.1 dB
  • -> 960x540: 55.3/57.5 dB
  • 720p -> 1080p: 40.5/46.2 dB (43.4/48.8 dB against bicubic)
  • 4K -> 1080p: 54.1/60.5 dB
  • P010 1080p -> NV12 720p: 47.6/48.8 dB

Against the old top-left crop the same rows score about 10 dB. All 9 same-size conversions (including NV12 -> BX24 640x480) are byte-identical to the stock driver. GStreamer 1.28.9 v4l2convert resizing to 1280x720, 960x540 and 1080p gives byte-identical pixels to those jobs.

Risk: two-way door. It changes the driver only (no DT or UAPI). Applications that asked for another CAPTURE size and relied on getting the source size back now get the size they asked for.

Tested at 5c61925c7e10: J773g (T8132) and J700 (T8140) both passed same-size conversion, CAPTURE-first downscale to 256×128, and lossless OUTPUT TRY_FMT/S_FMT parity. Both runs kept the same boot, restored stock modules and reported zero new matching kernel errors. J773g receipt · J700 receipt.

Still to run: current-head J616s coverage and an M1/M2/M3 row (hardware-version 10–17, same register layout per the public m1n1 map). #2804 changes the same asc_fill() area.

How the register values were chosen
  • Bank layout from the public m1n1 scaler map: V 9 taps, H 15 taps, 32 phase slots per tap. Slot s is the phase s/32 right of the centre tap for s < 16, and (32-s)/32 left of it otherwise. Bank 0 holds one Q12 coefficient per word in both halves, bank 1 two consecutive coefficients per word. The 9-tap kernel sits on the centre taps of the 15-tap bank.
  • Flags (0x1e1/0x1e3 downscaling, 0x61/0x63 upscaling), steps, inverse steps and chroma up/down-sampling come from our own macOS register trace of scaled jobs. The filter coefficients and de-ringing values are not used; the filters are generated.
  • Initial phase: macOS starts downscales on the first source pixel. Centring, (step-1)/2 like swscale and GStreamer, gains 10 dB or more. The field is signed Q1.22 (23 bits; wider values wrap), so from 3x down the phase is held just under one pixel. 4x scores 39.0 dB, against 32.8 dB with phase 0.
  • The +0x08 word is the chroma phase of a subsampled source. Between two 4:2:0 pictures twice the luma phase matches best; for Y'CbCr -> RGB the luma phase does. It has no effect for an RGB source.
  • Pseudo-linear mode (0x480) stays off. macOS sets it for RGB sources, but it moves the result 9 dB away from gamma-space swscale.
  • Phase sign checked by mirroring the banks: mirrored, the 1.5x row drops from 38.3 to 32.0 dB.
CSC rows (scale-only reference)

The engine's own 1:1 colour conversion differs from swscale's (stock BGRA -> NV12 at 1:1 scores 28 dB, NV12 -> BGRA 32 dB). So these rows are also compared with swscale applied to the engine's 1:1 output:

  • NV12 1080p -> BGRA 720p: 47.6/51.6 dB RGB
  • BGRA 1080p -> NV12 720p: luma 48.4/54.4 dB
  • BGRA -> BGRA 720p (no CSC): 44.8/52.0 dB against plain swscale lanczos.

Chroma of RGB -> 4:2:0 is limited by the existing 1:1 downsampler, not by scaling.

The MMIO engines (MSR hardware-version 10 to 22) forced the CAPTURE
size to the OUTPUT size and ran every job with the polyphase filters
off. A CAPTURE format of another size came back at the source size, and
GStreamer's V4L2 converter then took a top-left crop of the source as a
resized picture.

Program the scaler. Each axis gets its step and inverse step in Q22,
an initial phase and a generated polyphase filter in both of its banks.
The filters use the kernels and ratio bins of the MSR23 table (a Kaiser
windowed sinc low-pass when downscaling, an interpolating 4-tap kernel
when upscaling), generated by tools/media/apple-scaler/mmio_filters.py.
The bank layout (32 phase slots per tap, signed phases, one or two
coefficients per word) follows the public m1n1 scaler register map; the
flags, steps and chroma resampling follow our own macOS register trace.

The initial phase centres output on source, as swscale and GStreamer
do: (step - 1) / 2, limited to the signed Q1.22 field. The chroma phase
is twice that between two 4:2:0 pictures. The pseudo-linear mode stays
off. Each of these was measured against swscale on the M4 Pro.

CAPTURE now keeps its own size within 4x of the OUTPUT size per axis
(the lossless layout stays at 1:1), and a scaled job grows to about
1400 register writes. Jobs at 1:1 program the same values as before.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team as code owners December 3, 2026 08:29
@github-actions github-actions Bot added area:media Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) blast:m2 Macs affected, from Merge risk (bot) blast:m3 Macs affected, from Merge risk (bot) blast:neo Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at 5c61925c: ready to merge

Check Detail
CI at head ok 10 checks passed
Review ok approved by satchlj
Requested changes ok none
Hardware row at head ok in the PR body at 5c61925c
Conflicts ok none
PR text ok Risk: two-way · . It changes the driver only (no DT or UAPI). Applications that asked for another CAPTURE size and relied on getting the source size back now get the size they asked for. Tested at 5c61925c7e10: J773g (T8132) and J700 (T8140) both passed same-size conversion, CAPTURE-first downscale to 256×128, and lossless OUTPUT TRY_FMT/S_FMT parity. Both runs kept the same boot, restored stock modules and reported zero new matching kernel errors. J773g receipt · J700 receipt. Still to run: current-head J616s coverage and an M1/M2/M3 row (hardware-version 10–17, same register layout per the public m1n1 map). #2804 changes the same asc_fill() area.

Areas: area:media
Merge: gh pr merge 4165 --merge (Owners and Core through the bypass: add --admin).

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Neo (J700, T8140, 7.3.0-aurora-fleet94) row at this head (e0100ffe), module built from the PR against the fleet94 tree. The camera denoise user service holds the scaler node, so it was stopped for the swap window and restarted afterwards.

  • Stock driver: every scaled request comes back at the source size (11/11).
  • This PR: 11/11 scaled rows at the requested size. PSNR-Y against swscale lanczos (frame 0 / frame 1) is the same as on the J616s: 1080p->720p 49.76 / 56.12 dB, ->960x540 55.34 / 57.53, 720p->1080p 40.49 / 46.18, 4K->1080p 54.09 / 60.45, P010->NV12 720p 47.59 / 48.76, 4x down 38.96 / 39.45. The old top-left crop scores ~9.9 dB on the same rows.
  • 9/9 same-size conversions are byte-identical (sha256) to the stock driver.
  • GStreamer 1.28.9 v4l2video12convert: 1080p->720p and 720p->1080p output is byte-identical to the v4l2-ctl jobs. BGRx caps are refused on stock and on this PR alike (the driver offers BGRA).
  • 0 kernel lines during the jobs, no new DART faults.

One thing to look at, not a blocker for the YUV paths: scaled RGB->NV12 (rgbdown, BGRA 1080p -> NV12 720p) has Y at 48.4 / 54.4 dB against the engine's own 1:1 conversion scaled by swscale, but UV only 29.9 / 32.0 dB (max diff 86 / 110). The NV12->NV12 rows have UV at 38-42 dB, so the chroma phase/step for a 4:4:4 RGB source going to 4:2:0 may be off.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 3, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: FINISH at e0100ff

Failure: The new lossless 1:1 path can negotiate a format that contradicts the advertised frame size steps. For example, an MMIO RGB OUTPUT width of 641 is valid, but asking for APPLE_L8V0 CAPTURE now copies 641 directly through asc_fill() at apple-scaler-drv.c:477–479. That format advertises an even-width step and the hardware job computes chroma width with integer division by two. The old format path aligned CAPTURE to its format's subsampling. Keep the lossless 1:1 constraint and reject an incompatible pair before accepting it.

Checked: The new resize path constrains each axis to the scale envelope, selects a generated filter from the step, and keeps unit-ratio programming on the existing path. I compared the new lossless branch with the base alignment path and traced the advertised size step and DMA plane-width calculation.

@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.

Request changes at e0100ffe: one behaviour break, small fix. The rest of the scaling path looks right.

CAPTURE set before OUTPUT gives the wrong size. asc_s_fmt_out() (apple-scaler-drv.c:653-655) refills CAPTURE from its already clamped size. v4l2-ctl sets CAPTURE first, against the open-time 1920x1080 source. So 320x240 -> 320x240 is clamped to 480x270 by the CAPTURE call, and OUTPUT 320x240 then keeps 480x270. On main the same calls give 320x240. This hits every same-size job below 480x270 or above 7680x4320 set in that order. An application that sets only OUTPUT also gets 1920x1080 now instead of its source size. The colorimetry already has this fix (dst_ycbcr_req); do the same for the size:

/* struct apple_scaler_ctx: the CAPTURE size asked for, 0 until then */
u32 dst_w_req, dst_h_req;

/* asc_s_fmt_cap(), next to dst_quant_req, before asc_fill() */
ctx->dst_w_req = f->fmt.pix_mp.width;
ctx->dst_h_req = f->fmt.pix_mp.height;

/* asc_s_fmt_out(), before asc_fill(ctx->asc, &ctx->dst, ...) */
if (!ctx->asc->variant->fw_fronted) {
	ctx->dst.width = ctx->dst_w_req ?: ctx->src.width;
	ctx->dst.height = ctx->dst_h_req ?: ctx->src.height;
}

Odd sizes into the lossless layout (also in the earlier review): asc_fill() lines 477-479 skip the ALIGN. Put the lossless case inside the last else (if (ref && lossless) {w = ref->width; ...} else if (ref) {clamp}), so the ALIGN and clamp below still run. Then 641x481 RGB -> L8V0 fails in asc_job_build() as on main.

I built both changes on the merge with main: W=1 and checkpatch clean, KUnit passes.

Small: the mmio_filters.py header names asc_emit_filter(), the function is asc_emit_axis().

Checked on the merge of this head with main dc4d6f06:

  • W=1 arm64 objects clean, checkpatch --strict clean (one MAINTAINERS note for the new file), KUnit (UML) 29/29, mmio_filters.py --check matches the table, apple-scaler-recovery-tests.py passes.
  • Ratio and phase: no null filter set inside the 4x range, the phase cannot overflow, the write list and bank offsets fit the aperture and ASC_JOB_MAX_WRITES. At 1:1 every register gets the same value as before.
  • CAPTURE size cannot change under queued buffers, so the engine does not get a picture larger than the buffer. MSR23 (M5) formats are unchanged. T602x, T603x and T8122 do not bind this driver, so nothing changes there.

Rows: after the push, one row at the new head (J700 again, or our J773g/T8132, MSR20) that includes a 256x128 same-size job with CAPTURE set first. J616s is the second generation. An M1 or M2 row (MSR 10, 12 or 13) is wanted but does not block, since 1:1 is unchanged there. The RGB -> NV12 chroma level you noted can be a follow-up.

@github-actions github-actions Bot added the changes-requested A reviewer requested changes (bot) label Dec 3, 2026
Reapply the requested CAPTURE size when OUTPUT changes so the old source bounds do not constrain the new pair. Use the new source size until the application sets CAPTURE explicitly.

Reject a lossless format pair when its 1:1 geometry violates CAPTURE subsampling. Commit formats and rectangles only after both queues have been validated.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Pushed 87c6f8b7affd. Setting CAPTURE first now preserves the requested size when OUTPUT changes. An incompatible lossless 1:1 pair returns EINVAL before changing either queue's format or rectangle.

Both arm64 scaler objects built with W=1. Strict checkpatch, the filter-table check and all seven scaler recovery cases passed. A host test of the production format functions passed CAPTURE-first and OUTPUT-only sizing, an aligned lossless pair, rejection without state changes and the existing MSR23 sizing. The CAPTURE-first case failed on the previous head.

The remaining hardware rows are a CAPTURE-first 256×128 job and the scaling matrix on J700 or J773g, plus the same checks on J616s. The fix also needs a fresh independent review.

@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Dec 3, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: FINISH at 87c6f8b.

Failure: With an idle MMIO scaler configured for 320×240 ARGB32 OUTPUT and L8V0 CAPTURE, ask to change OUTPUT to ARGB32 641×480. The exact asc_try_fmt_out() returned 0 and advertised 641×480, while asc_s_fmt_out() returned -EINVAL for the same request on the same configured queues. The first path normalizes OUTPUT alone, while the second reaches the new lossless alignment rejection for CAPTURE. Keep the OUTPUT format probe and application consistent so userspace can negotiate the pair. V4L2 format ioctl contract

Checked: The earlier odd-width failure is now rejected by S_FMT without changing either configured format or rectangle. CAPTURE-first 320×240 also retains that size when OUTPUT changes from 1920×1080 to 320×240.

DjDeveloperr
DjDeveloperr previously approved these changes Dec 3, 2026

@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.

The CAPTURE sizing and lossless alignment findings are addressed at 87c6f8b7affd. I pushed the fix, so a separate maintainer still needs to approve. The J700 or J773g run and the J616s run are still due.

@github-actions github-actions Bot removed the changes-requested A reviewer requested changes (bot) label Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

J773g (Apple M4 Mac mini, T8132) JPEG + scaler module row receipt:

  • Result: PASS (VERDICT PASS J773g, exit 0)
  • Tested heads (combined candidate module build on 7.3.0-j773g-main3685+):
    • aurora-silicon/linux#4160 @ 90babf764ad0
    • aurora-silicon/linux#4165 @ 87c6f8b7affd
  • Boot: 7.3.0-j773g-main3685+, boot_id=d0d3b57e-600d-47ea-b29d-55a6f8a39963 (zero reboot, zero sleep, stock modules restored and verified afterwards)
  • Kit: edge-jpeg-scaler-rows-20261203 (KIT.sha256 d1fb43d9ee0e, J773g/SHA256SUMS 3117d179eb53)
  • Arm results:
    • Stock: PASS encode 256x128, 1103 bytes, PASS scaler 256x128 to 256x128 CAPTURE-first, 131072 bytes, stock driver exposes encode only
    • Candidate: PASS encode 256x128, 1103 bytes, PASS decode START/LAST, 49152 captured bytes, 411648 untouched tail bytes, PASS scaler 256x128 to 256x128 CAPTURE-first, 131072 bytes, PASS scaler 640x480 to 256x128 CAPTURE-first, 131072 bytes, PASS lossless alignment, format negotiation only
  • Restore & kernel check: RESTORED stock modules, unchanged boot d0d3b57e-600d-47ea-b29d-55a6f8a39963, zero new matching kernel errors

An OUTPUT TRY_FMT can accept an odd RGB width while CAPTURE uses a
lossless format. S_FMT rejects the same request because the lossless
CAPTURE format must use the OUTPUT dimensions and requires alignment.

Use the same format pair preparation for both OUTPUT ioctls. Commit
the formats and rectangles only after S_FMT validates the pair.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Pushed 5c61925c7e10. OUTPUT TRY_FMT and S_FMT now validate the same OUTPUT/CAPTURE pair. With L8V0 CAPTURE, both reject 641×480 ARGB32 with EINVAL and leave the queued formats and rectangles intact. Both accept 642×480 and return the same OUTPUT format. The focused host fixture reproduced the mismatch at 87c6f8b7affd and passed with the fix. The arm64 scaler driver object built with W=1, strict checkpatch passed, and both scaler recovery jobs passed.

The J773g hardware receipt covers 87c6f8b7affd. This head still needs independent approval and current-head scaler results on J700 or J773g and on J616s.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 5c61925

Checked: Both OUTPUT ioctls now validate the same pair using the original CAPTURE request. With L8V0 CAPTURE and idle queues, both exact callbacks return -EINVAL for 641x480 ARGB32 and preserve the configured formats and rectangles. At 640x480 they agree and S_FMT updates the configuration. CAPTURE-first sizing and odd RGB widths with an RGB CAPTURE format still work. A busy queue still allows TRY_FMT and rejects S_FMT without mutating the configuration. The callback checks passed under GCC and Clang. Hosted checks are pending.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

J773g (Apple M4 Mac mini, T8132) scaler module row at exact head 5c61925c7e10:

  • Result: PASS (VERDICT PASS J773g, exit 0)
  • Kit: edge-scaler-5c61925-rows-20261203, KIT.sha256 e78deea3…3929, J773g SHA256SUMS 9d4a5b4f6b83; --check passed (sealed archive, stub SSH success and failure)
  • Kernel: 7.3.0-j773g-main3685+, boot d0d3b57e, no reboot
  • Stock arm: 256x128 -> 256x128 CAPTURE-first, 131072 bytes
  • Candidate arm: 256x128 -> 256x128 and 640x480 -> 256x128 CAPTURE-first, 131072 bytes each; lossless alignment and OUTPUT TRY_FMT/S_FMT parity pass
  • Stock modules restored, same boot, zero new matching kernel errors

The J700 row (#4160 90babf764ad0 + this head) runs on the Neo after its current sleep work.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

MacBook Neo (J700, T8140) row, 12-03 16:40Z, zero reboot, module swap on stock 7.3.0-41.fc44.aurora (boot a66a9547): VERDICT PASS. Heads: JPEG #4160 90babf764ad0, scaler #4165 5c61925c7e10 (kit e78deea3).

  • Stock arm: scaler 256x128 -> 256x128 (capture-first, 131,072 bytes) and JPEG encode 256x128 (1,103 bytes) pass; the stock driver exposes encode only.
  • Candidate arm: JPEG encode 256x128 (1,103 bytes, same as stock); decode START/LAST 49,152 captured bytes with the 411,648-byte tail untouched; scaler 256x128 -> 256x128 and 640x480 -> 256x128 (131,072 bytes each); lossless alignment and OUTPUT TRY_FMT/S_FMT parity.
  • Stock modules restored, same boot, 0 new matching kernel errors.

Not covered: other T8140 Macs, larger frames, long runs, and the display/camera users of these blocks.

@github-actions github-actions Bot added the blast:m4 Macs affected, from Merge risk (bot) label Dec 3, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J616s (16" MacBook Pro M4 Pro, T6040, MSR21 scaler, /dev/video10), stub firmware 26.6.2, full kernel at exact head 5c61925c7e10: PASS.

  • Kernel 7.3.0-mrp4165 built from the head (merge base 5339718530b6), no other patches. One-shot boot with its own t6040-j616s.dtb through aura-try (aura main 70d844e3, U-Boot 5c0d5fe1). The saved default was not changed. boot_id 14e4417b. apple_scaler is the in-tree module of this kernel (taint empty). Nothing else held the node.
  • Method: the MEDIA-PARITY kit (jobs.sh all, v4l2-ctl m2m, 2 frames per job: frame 0 detail, frame 1 bars). The inputs were regenerated by mkinputs.sh, and their sha256 is identical to that run's inputs-SHA256SUMS.
  • All 11 scaled jobs return the requested size, rc 0, 0 kernel lines:
    • 1080p→720p, 1080p→960x540, 720p→1080p, 4K→1080p, 1080p→480x270 (4x)
    • 1920x1080→1920x720 (vertical only)
    • NV12→BGRA down and up, P010→NV12 down, BGRA→NV12 down, BGRA→BGRA down
  • All 20 outputs are byte-identical (sha256) to the earlier candidate run that the PR body's PSNR table comes from, and the PSNR spot-check reproduces it:
    • NV12 1080p→720p: Y 49.76 / 56.12 dB against swscale lanczos (frame 0/1); the top-left-crop control scores 9.88 dB
    • 4K→1080p: Y 54.09 / 60.45 dB; crop control 9.83 dB
  • All 9 same-size conversions are byte-identical to the stock driver: NV12→BGRA/BGRX, BGRA→NV12, P010→NV12/BGRA, NV12→NV12, 720p NV12→BGRA, and 640x480 NV12→BX24/BA24.
  • CAPTURE sizing (the fix at 87c6f8b7affd):
    • OUTPUT 1920x1080 with CAPTURE 400x200 clamps to 480x270
    • OUTPUT 640x480 with S_FMT 7680x4320 clamps to 2560x1920, i.e. 4x per axis
    • 1:1 stays 1920x1080
  • 0 kernel err lines and 0 DART faults in the boot. GPU smoke (glmark2 22867) and the rest of the boot row are clean apart from the usual speakerguardd-v2-switchtest.service that every trial boot of this Mac shows.

Afterwards the Mac went back to its production default (fleet94, Enforcing, 0 failed units).

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed at head 5c61925c7e10.

  • Format negotiation (asc_fill, asc_try_fmt_pair) cleanly validates both sides before mutating context state, clamps scaled dimensions to [1/4, 4x] while keeping lossless layouts locked at 1:1 with subsampling alignment checked, and preserves dst_width_req/dst_height_req across OUTPUT updates.
  • Polyphase filter selection (asc_filter_for, asc_filter_coef), centred DDA initial phases (including 2x chroma phase for 4:2:0->4:2:0 and Q1.22 clamping), dual-bank writes within ASC_JOB_MAX_WRITES (device-owned asc->writes, no stack bloat), and 4:4:4 chroma resampling on scaled jobs are sound and well covered by KUnit (asc_test_filters, asc_test_job_scaled, asc_test_job_one_axis) and mmio_filters.py.
  • All checks green and exact-head hardware rows present.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@RyanTheTide
RyanTheTide merged commit eb0cfb4 into main Dec 3, 2026
14 of 15 checks passed
@RyanTheTide
RyanTheTide deleted the media-parity/mmio-scale branch December 3, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:media Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) blast:m2 Macs affected, from Merge risk (bot) blast:m3 Macs affected, from Merge risk (bot) blast:m4 Macs affected, from Merge risk (bot) blast:neo Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

media: apple: scaler: MMIO engines (v10-v22) never resize; CAPTURE forced to the source size

3 participants