Skip to content

[BUG] imx471: Hardware rotation/flip breaks Bayer phase (Software ISP) on Lenovo ThinkPad X9 15 #454

Description

@semyon0101

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions