[BUG] imx471: Hardware rotation/flip breaks Bayer phase (Software ISP) on Lenovo ThinkPad X9 15
- Dominant language
- C
- Stars
- 251
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
Environment:
- Hardware: Lenovo ThinkPad X9 15
- Sensor: Sony IMX471 (via Intel IPU6 Bridge)
- OS: Arch Linux
- Kernel: 7.1.3-arch1-3
- Driver Version: ipu6-drivers (r273.c09fa9a6e)
- Pipeline: libcamera Software ISP
Description of the Problem:
On the Lenovo ThinkPad X9 15 the camera image is inverted by default in the all aplications (I use qcam to test).
When attempting to fix the orientation at the hardware/driver level (change `props.rotatation=180`) the physical rotation successfully occurs, but image was currepted: wrong pixels colors, defects as a grid of small blacks squares.
What I have tried:
- change props.rotation to 180. Didn't help, apears squares and changed color(I can't describe it in detail, it looks as picture become more dark-purple and dark-green)
- in `imx471_set_ctrl` add without if-construction add `imx471_set_ctrl_hflip` and `imx471_set_ctrl_vflip`. In `imx471_set_ctrl_vflip` delete two lines with `imx471_read_reg` and `imx471_write_reg` with `IMX471_REG_V_WIN_OFFSET`
Didn't help as I wan't, didn't apears squares, but change color (red and blue change swapped). And when I reopened qcam one more time, All changes were disapered, And image became just inverted: inverted in orientaion, but colors were normal
- change `IMX471_REG_ORIENTATION` to `0xffff` `0x0103` `0x0000` `0x0100` `0x0102`. Didn't help, I didn't see any differences. Picture was just inverted.
To change driver I use:
`sudo dkms remove ipu6-drivers/r273.c09fa9a6e --all`
`sudo dkms build ipu6-drivers/r273.c09fa9a6e -k $(uname -r)`
`sudo dkms install ipu6-drivers/r273.c09fa9a6e -k $(uname -r)`
`sudo modprobe -r imx471 && sudo modprobe imx471`
Contributor guide
Research direction
Reproduce the inverted image and Bayer corruption in qcam using the Lenovo ThinkPad X9 15 and IMX471 setup. Start with imx471_set_ctrl, imx471_set_ctrl_hflip, imx471_set_ctrl_vflip, and IMX471_REG_ORIENTATION, then compare each rotation or flip path. Done means the image has the correct physical orientation with normal colors and no grid artifacts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, c, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100