Skip to content

arm64: dts: apple: t604x-j614-j616: scale the 720p camera preset - #1005

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
jgoyvaerts:j616-camera-720p
Nov 6, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
jgoyvaerts:j616-camera-720p

Conversation

@jgoyvaerts

Copy link
Copy Markdown
Contributor

The J614/J616 1280x720 sensor preset cropped <0 0 1280 720> out of the 1920x1080 window that firmware configuration 5 delivers, without scaling. A 720p stream, which browsers and video calls often ask for, showed the top-left corner of the picture: an off-centre view about two thirds as wide as 1080p.

This crops the whole 1920x1080 window and lets the scaler bring it down to 1280x720, as the driver already does for the sizes it derives itself (640x480 from the 1080p crop).

With only the DT change, the 720p preset loses P010: isp_ch_cache_sensor_configs accepted a preset for P010 only when its crop equalled its output, so a 1280x720 P010 request fell back to 1280x960. The P010 test now accepts a crop at the origin with the output's aspect ratio that is no smaller than the output. Only CH_CROP_SCL1_SET uses the crop; the buffers are sized from the output.

Tested on a J616s (M4 Pro, IMX958), on our tree with the same diff:

  • 1280x720 NV12 and 1280x720 P010 both stream, VIDIOC_S_FMT keeps 1280/720 for both, and no ISP errors show in the log.
  • Frames at 1920x1080 NV12, 1280x720 NV12 and 1280x720 P010 show the same framing.
  • Without the isp-cam.c hunk, a 1280x720 P010 request came back as 1280x960.

The 1280x720 preset cropped the top-left 1280x720 corner of the 1920x1080
window that firmware configuration 5 delivers, without scaling. A 720p
stream, which video calls often ask for, therefore showed an off-centre
view about two thirds as wide as the 1080p one.

Crop the whole 1920x1080 window and let the scaler bring it down to
1280x720, as the driver already does for the sizes it derives itself
(such as 640x480 from the 1080p crop).

The driver offered P010 only for presets whose crop equals their output,
so the scaled preset would lose it and a 1280x720 P010 request would fall
back to 1280x960. Accept a crop at the origin with the output's aspect
ratio that is no smaller than the output instead.

Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
Assisted-by: LLM
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge train (MTR, 06/11): merging. I reviewed it. The DT change only touches the J614/J616 IMX958 720p preset, and the new P010 test still requires a crop at the origin with the output's aspect ratio. On the J616s the 720p stream is now the whole 1080p window scaled down, and P010 720p still streams (above). The IMX558 and IMX364 presets on M1/M2 have the same shape, but P010 there stays behind preview || reported, which only T6040/IMX958 sets.

Gates: test merge 2d3579ef = integration/aurora 11eccbe + #1005 #994 #930 #658 #992 #1006 #1007 #1008 #531 (#992 has since landed on its own); base 11eccbe.

  • KUnit: drm/apple 112/113 (1 skip); Rust (asahi, incl. asahi_g17_validation_pages) 200/201 (1 skip); arm64 apple-isp-*, apple-pmc, apple-pmgr-pwrstate and thunderbolt 137/138 (1 skip).
  • W=1 on drm/apple, media/apple/isp, pmdomain/apple, thunderbolt and nvmem/apple-spmi-nvmem: 0 new warnings.
  • dt_binding_check (apple,dcp, apple,dart, apple,t8132-isp, apple,spmi-nvmem, apple,pmc): 0 new.
  • Host tests run-host-tests.py 185/185; apple-dcp selftests 86/86.

Hardware (7.3.0-aurora-mtr1106a, one-shot boots, fleet recipe):

  • J616s (M4 Pro) vs fleet17: 0 kernel errors, 0 AVC, 0 failed units; eDP + DP-2, Wi-Fi, Vulkan G16S. Camera NV12 1080p and 720p, and P010 720p, streamed 30 frames each, with no ISP errors. vkcube OK; glmark2 6617/6738/6683 vs fleet17 6646/6555/6664.
  • Neo (A18 Pro), two boots vs fleet16: 0 kernel errors, 0 AVC, os_uuid pin present; eDP, Wi-Fi, Vulkan G17P. Camera NV12 1080p and 720p, no ISP errors. vkcube OK; glmark2 2718/2729/2726/2725 vs fleet16 2043–2108; 0 GPU faults.
  • Both Macs were restored to their default kernels afterwards.

@RyanTheTide
RyanTheTide merged commit 32fc073 into aurora-silicon:integration/aurora Nov 6, 2026
AxxzyWasTaken added a commit to AxxzyWasTaken/linux that referenced this pull request Nov 7, 2026
The 720p preset cropped 1280x720 out of the top left of the 1920x1080
frame instead of scaling the whole frame, as aurora-silicon#1005 fixed for the other
boards.

Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
RyanTheTide pushed a commit that referenced this pull request Nov 10, 2026
iBoot places the ISP firmware differently on each boot here, so the J616s
placement does not hold. The loader fills the firmware regions from the
ADT, so add them as placeholders with the J616s addresses and enable the
ISP: its alias, which aura needs to open the DAPF, the firmware regions
and heap, the node with its platform ID, camera connection scheme and two
IMX958 presets (the 720p one keeps the full frame, as #1005 did for the
other boards), and the three DARTs.

This goes in the J616c board file, not in t6041-j614c-j616c.dtsi: there
is no J614c ADT yet, so its camera setup is unchecked.

Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
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