Repository navigation
media: apple: isp, arm64: dts: support 8-AMCC T6041 and NV12 LIM_RANGE - #2216
DjDeveloperr merged 3 commits into
Conversation
|
Added a second commit ( |
Enable camera support on full-die 8-AMCC T6041 parts (J616c) and fix NV12 quantization metadata: - Add AMCC 6 (0x22c004000..0x22c1d62fc) and AMCC 7 (0x22e004000..0x22e1d62fc) to &isp_dart0 in t6041.dtsi. - Add apple_isp_hw_t6041 in isp-drv.c. The driver counts active AMCC ranges on isp_dart0 and sizes fw_mmio and DSID broadcast-clear windows to match. This supports 6-AMCC binned and 8-AMCC full-die T6041 chips across >5 s runtime power-off reopen cycles. - Set V4L2_QUANTIZATION_LIM_RANGE on NV12 in isp-v4l2.c to match P010, and update isp-v4l2-test.c. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Expose a read-only 'sensor' sysfs attribute on the apple-isp platform device (/sys/class/video4linux/videoX/device/sensor) backed by canonical sensor module names in isp_setfiles[] (such as "imx958-uw" for the 12 MP Center Stage ultra-wide IMX958 module and "imx558" for IMX558). On hardware with deferred camera startup, sensor_show() returns -ENODATA until the first stream detects the camera, then emits the detected sensor identifier under video_lock so userspace services can select tuning and framing capabilities by sensor property rather than per-board lists. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
apple,t6041-isp is the ISP of both T6040 (M4 Pro) and T6041 (M4 Max): t604x.dtsi gives it that compatible for both. With the T6041 hardware description, apple_isp_select_hw() fell back to six AMCCs unless isp_dart0's apple,dapf-ranges listed six to eight. T6040's lists four, so the J614s and J616s would map AMCC 4 and 5 windows and have the firmware broadcast-clear two DSID windows the chip does not have. Accept four to eight described AMCCs and keep four without a description, as every apple,t6041-isp node used before. With four, the mapped windows and the DSID clear request are those of the T6040 description it replaces. Signed-off-by: Diljit Singh <hey@djdev.me>
b4018ae to
5f25058
Compare
|
Added 5f25058 ( |
[sensor:imx958-uw] replaced [apple,j616s], but the sensor key comes from the apple-isp sysfs attribute that only kernels with aurora-silicon/linux#2216 have, and those report it only once the camera has been detected. Until then the J616s matched no section and lost its low-light thresholds and framing capability. Keep [apple,j616s] with the same values as the compatible fallback, and test that the J616s without a sensor still gets it. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Review of 5f25058, from the angle of boards other than the J616c:
The rebase onto 6ae9c3c kept #2229's DT-driven T8132 address filter: |
|
Tested on a J616c with the 6-AMCC (binned) T6041, which complements your 8-AMCC result. It's a 14-core / 32-core-GPU M4 Max on 25G83.
I didn't test P010, other presets, or suspend-to-RAM with the camera open. Disclosure: prepared with an AI tool; tested as described. |
a26b265
into
aurora-silicon:integration/aurora
|
Merged as a26b265 under the same runner-outage rule as #1954. ISP host tests are identical to the base and all pass; the M5 test kernel ran this exact head. MacBook Neo (J700) A/B with the whole J616c set: no regression (work: display, G17P dEQP smoke, ANE, AOP, camera stream/runtime-PM/reopen, deep sleep). M5 Pro (J714s, T6050) A/B: PASS on every row. The NV12 change is metadata-only: V4L2 DEFAULT already maps to LIM_RANGE for Rec.709 Y'CbCr, and the frame data is unchanged on Neo and M5. The |
|
M4 Pro (J616s, T6040) row on 5f25058: pass. The camera works at the four AMCC windows. Booted with aura main + #373 + #265 + #304 as Stage 2.
Frames went to
Rows on every test boot
Each test boot: SELinux enforcing, 0 failed units, 0 AVC denials, 0 kernel lines at err level, s2idle 2/2 (rtcwake, Wi-Fi reconnects, gateway ping ok), 0 DART faults, NVMe/USB/Wi-Fi up, eDP connected with 6 modes, AVE H.264 and HEVC 120-frame encodes byte-identical to production, GL and Vulkan both report "Apple M4 Pro (G16S B1)", AOP RTKit up with 8 IIO devices, ANE bound. Aura ran as a one-shot ESP Stage 2 (Stage 1 unchanged); kernels were built from the exact PR heads with the fleet75 config. |
Merge order: Please merge after #1954.
This branch starts from
integration/auroraand merges cleanly on top of#1954with zero conflicts.Companion PRs:
aurora-silicon/aura): isp, dapf, kboot: make ISP placeholder handoff, DAPF sync, and power skip property-driven aura#304aurora-silicon/camera-denoise): config, main, data: key camera profiles on sysfs sensor name ([sensor:imx958-uw]) camera-denoise#14Summary
This series enables
apple-ispcamera streaming on 8-AMCCT6041(J616c, MacBook Pro 16" M4 Max), fixesNV12quantization metadata, and exposes the detected camera sensor module name in sysfs:media: apple: isp, arm64: dts: support 8-AMCC T6041 and NV12 LIM_RANGE(4749bc96f242):0x22c004000..0x22c1d62fc) and AMCC 7 (0x22e004000..0x22e1d62fc) filter ranges to&isp_dart0int6041.dtsi.apple_isp_hw_t6041: count active AMCC ranges onisp_dart0and sizefw_mmioand DSID broadcast-clear windows to match, supporting both 6-AMCC binned and 8-AMCC full-dieT6041chips across>5 sruntime power-off and reopen cycles.V4L2_QUANTIZATION_LIM_RANGEonNV12inisp-v4l2.cto matchP010, and updateisp-v4l2-test.c.media: apple: isp: expose detected camera sensor name in sysfs(b4018aeb078d):sensorattribute on theapple-ispplatform device (/sys/class/video4linux/videoX/device/sensor, documented inDocumentation/ABI/testing/sysfs-driver-apple-isp) backed by canonical sensor module names inisp_setfiles[](such as"imx958-uw"and"imx558").-ENODATAprior to deferred camera startup so userspace (aurora-silicon/camera-denoise#14) can key low-light thresholds and framing capabilities on sensor identity rather than board lists.Testing
./scripts/checkpatch.pl --strictreports0 errors, 0 warnings, 0 checks.tools/asahi/run-host-tests.py --only isp-:18 / 18suites passed (includingisp_test_sensor_namesandisp_test_sensor_sysfs).J616c(M4 Max, 8 AMCCs) verifiesNV12andP010capture at1920x1080@30, runtime power-down and reopen (>6 sidle), and zero DART faults.Still to do
aurora-installerextract the sensor tuning file (apple/isp_2224_01XX.datfrom/usr/libexec/appleh16camerad) into/lib/firmware/apple/on first boot.