IMX471: VIDIOC_STREAMON fails with EPIPE on the mainline imx471 driver, the HAL config fixes RGGB but the driver follows VFLIP
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp, linux
Hướng nghiên cứu
Start by reading config/linux/ipu7x/sensors/imx471-uf.json and the PipeManager.cpp section around lines 339–346, then compare the HAL behavior described for the two driver configurations. Determine whether the HAL reads Bayer order at runtime and whether the processing graph handles it; the issue asks for a support decision and documentation if RGGB under flips is required. Done means the supported behavior is established for IMX471 and documented as needed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The HAL cannot start an IMX471 camera with the mainline imx471 driver (kernel 7.3.3). VIDIOC_STREAMON returns EPIPE and no frame arrives. The sensor config fixes the Bayer order to RGGB and sets VFLIP=1. The mainline driver reports a Bayer order that follows the flips, so with VFLIP=1 it reports SGBRG10 and the pad formats do not match.
Environment
- ThinkPad X9 (Lenovo 21QACTO1WW), IMX471 front camera, HM1092 IR camera
- Kernel 7.3.3, mainline
imx471(drivers/media/i2c/imx471.c) intel_ipu7and the ISYS driver fromintel/ipu7-driversat 495acc90 (built out of tree)intel/ipu7-camera-haltag 20260629_1, built from the tag source with-DLINUX_PRIVACY_MODE=OFF, started withicamerasrc- Config:
config/linux/ipu7x/sensors/imx471-uf.json, unchanged
Symptom
Each camera start failed the same way in the journals of two boots (2026-11-08 and 2026-11-11):
CamHAL[ERR] V4l2_device_cc: GetControl: Device node /dev/v4l-subdev5 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
CamHAL[ERR] V4l2_video_node_cc: Start: Device node /dev/video2 IOCTL VIDIOC_STREAMON error: Broken pipe
CamHAL[ERR] CaptureUnit: Device:Generic stream on failed.
CamHAL[ERR] CaptureUnit: Devices stream on failed:-38
CamHAL[ERR] CameraDevice: Start capture unit failed with ret:-38.
CamHAL[ERR] CameraDevice: Camera device starts failed.
Cause
The config sets V4L2_MBUS_FMT_SRGGB10_1X10 on the sensor pad and on the CSI-2 pad, and iSysRawFormat to RGGB10. It also sets V4L2_CID_VFLIP to 1 (imx471-uf.json:28-36, :54, :187-189).
The mainline driver picks the media bus code from both flips: imx471_hv_flips_bayer_order[] is RGGB, GRBG, GBRG, BGGR, indexed by vflip << 1 | hflip (imx471.c:272-276, imx471_get_format_code()). With VFLIP=1 and HFLIP=0 the sensor code is SGBRG10, while the HAL sets SRGGB10 on the pads. By reading, STREAMON then fails the link validation of the CSI-2 pad, which returns EPIPE on a format mismatch. I did not trace the kernel call. The driver sets V4L2_CTRL_FLAG_MODIFY_LAYOUT on both flip controls (imx471.c:749-750), so the code follows the flips by design.
The out-of-tree imx471.c that I used before (Intel copyright header, 2025) does not behave like this. It always reports SRGGB10 and moves the end of the readout window by one row when VFLIP is on (it adds 1 to the low byte of Y_ADD_END, register 0x034b), so the first row stays red. I did not diff that file against intel/ipu7-drivers. The HAL config works with this behaviour. Users of the mainline driver do not get it.
What I tried
- HAL unchanged, mainline driver patched to keep RGGB under VFLIP (same row shift as the out-of-tree driver). The camera streams: 40 of 40 frames at 1280x720, correct orientation and colours, no EPIPE.
- Mainline driver unpatched, config changed to GBRG (
SGBRG10for the two pad formats,iSysRawFormatandsupportedISysFormat), and the workaround inPipeManager.cpp:339-346widened to also acceptV4L2_PIX_FMT_SGBRG10/12as external format. The camera streams, but the picture is blue. By reading, the cause is the comment atPipeManager.cpp:339-341: the processing graph takes GRBG as input and crops the real RGGB data to GRBG. GBRG data gives the wrong phase after that crop. I did not verify this in the graph.
The second experiment shows that accepting another order in the HAL needs a change in the processing graph, not only in the config.
Request
Please say which of these the HAL supports for IMX471 with a mainline sensor driver:
- The HAL reads the Bayer order from the sensor at runtime and the ISP graph handles the other orders. A fixed RGGB in the sensor JSON would then not be needed.
- The HAL requires a sensor driver that keeps RGGB under the flips. This would then be documented, for IMX471 and for any other sensor whose config sets a flip control.
I can test a change against this hardware. I have not tested other sensors, other kernel versions or the IPU7.5 configs.
Not verified
- Whether other sensor configs in this repo have the same dependency on the Bayer order. I only tested IMX471.
- Why the graph produces a blue picture with GBRG (see above). This is from reading the code.
- The failure with the unpatched mainline driver is from the journals of two earlier boots, not from a fresh run today.
- Ngôn ngữ chính
- C++
- Star
- 10
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của intel/ipu7-camera-hal
-
Request: SC200PC (module KAFC917) support on Panther Lake / IPU75XA — Samsung Galaxy Book6 UltraĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
intel/ipu7-camera-hal#74 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Regression on IPU7 / OV02C10 (Lunar Lake): camera works on HAL e4a08b1, black frames on b94eee8Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
intel/ipu7-camera-hal#52 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
intel/ipu7-camera-hal#48 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
intel/ipu7-camera-hal#45 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
intel/ipu7-camera-hal#38 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của intel/ipu7-camera-hal
Issue tương tự
-
VT: Backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
contour-terminal/contour#2314 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
alexxlevesque/logicbench#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
FloofyPlasma/smelt#27 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày