GithubHelp home page GithubHelp logo

ipu6-drivers's Introduction

ipu6-drivers

This repository supports MIPI cameras through the IPU6 on Intel Tiger Lake, Alder Lake, Raptor Lake and Meteor Lake platforms. There are 4 repositories that provide the complete setup:

Content of this repository:

  • IPU6 kernel driver
  • Kernel patches needed
  • Drivers for HM11B1, OV01A1S, OV01A10, OV02C10, OV02E10, OV2740, HM2170, HM2172 and HI556 sensors

Dependencies

Build instructions:

Three ways are available:

  1. build with kernel source tree
  2. build out of kernel source tree
  3. and build with dkms

1. Build with kernel source tree

  • Tested with kernel v6.8

  • Check out kernel

  • Apply patches:

     # For Meteor Lake B stepping only
     patch/0002-iommu-Add-passthrough-for-MTL-IPU.patch
    
     # For v5.15 <= kernel version < v5.17 and using INT3472
     patch/int3472-v5.15/*.patch
    
     # For v5.17 <= kernel version < v6.1.7 and using INT3472
     patch/int3472-v5.17/*.patch
    
     # For kernel version >= 6.1.7 and using INT3472
     patch/int3472-v6.1.7/*.patch
    
     # For kernel version >= 6.3 and using ov13b10
     patch/ov13b10-v6.3/*.patch
    
     # For kernel version v6.8
     patch/v6.8/*.patch
  • For kernel v6.8. patch/v6.8/0002-media-Add-IPU6-and-supported-sensors-config.patch will change the related Kconfig & Makefile.

  • For latest linux-firmware repo, apply patch/linux-firmware/0001-Add-symbolic-link-for-Intel-IPU6-firmwares.patch to it to make driver work.

  • Copy drivers and include folders to kernel source (except Kconfig & Makefile at drivers/media/pci/intel and drivers/media/i2c as they are modified by patches in previous step. You can delete them before you copy folders.).

  • Enable the following settings in .config

     CONFIG_VIDEO_INTEL_IPU6=m
     CONFIG_IPU_ISYS_BRIDGE=y
     # For kernel >= v6.8 please use IPU_BRIDGE instead of IPU_ISYS_BRIDGE
     CONFIG_IPU_BRIDGE=m
     CONFIG_VIDEO_OV01A1S=m
     CONFIG_VIDEO_OV01A10=m
     CONFIG_VIDEO_HM11B1=m
     CONFIG_VIDEO_OV02C10=m
     CONFIG_VIDEO_OV02E10=m
     CONFIG_VIDEO_HM2170=m
     CONFIG_VIDEO_HM2172=m
     # Set this only if you use only 1 camera and don't want too many device nodes in media-ctl
     # CONFIG_IPU_SINGLE_BE_SOC_DEVICE=y
     # If your kernel < 5.15 or not set CONFIG_INTEL_SKL_INT3472, please set this
     # CONFIG_POWER_CTRL_LOGIC=m
    
  • LJCA and CVF part as below, please check details at https://github.com/intel/ivsc-driver/blob/main/README.md.

     CONFIG_MFD_LJCA=m
     CONFIG_I2C_LJCA=m
     CONFIG_SPI_LJCA=m
     CONFIG_GPIO_LJCA=m
     CONFIG_USB_LJCA=m
     CONFIG_INTEL_MEI_VSC=m
     CONFIG_INTEL_MEI_VSC_HW=m
     CONFIG_INTEL_VSC=m
     CONFIG_INTEL_VSC_CSI=m
     CONFIG_INTEL_VSC_ACE=m
     CONFIG_INTEL_VSC_PSE=m
     CONFIG_INTEL_VSC_ACE_DEBUG=m
    

2. Build outside kernel source tree

  • Requires kernel header installed on build machine

  • For kernel >= v6.8, still need to patch kernel by patch/v6.8/0004 & 0005 to make upstream iVSC driver work correctly. For kernel <= v6.6, requires iVSC out-of-tree driver be built together.

  • To prepare out-of-tree iVSC driver under kernel <= v6.6:

     cd ipu6-drivers
     git clone https://github.com/intel/ivsc-driver.git
     cp -r ivsc-driver/backport-include ivsc-driver/drivers ivsc-driver/include .
     rm -rf ivsc-driver
  • To build and install:

     make -j`nproc` && sudo make modules_install && sudo depmod -a

3. Build with dkms

  • Prepare out-of-tree iVSC driver under kernel <= v6.6:

     cd ipu6-drivers
     git clone https://github.com/intel/ivsc-driver.git
     cp -r ivsc-driver/backport-include ivsc-driver/drivers ivsc-driver/include .
     rm -rf ivsc-driver
  • Register, build and auto install:

     sudo dkms add .
     sudo dkms autoinstall ipu6-drivers/0.0.0

ipu6-drivers's People

Contributors

andy-shev avatar arter97 avatar ccgjimlai avatar cjechlitschek avatar hao-yao avatar ignaciohg avatar jwrdegoede avatar liang1wang avatar onceforall avatar rdower avatar serinyeh avatar vicamo avatar wentongwu avatar wytintel avatar xcyintel avatar zouxiaoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipu6-drivers's Issues

OV2740 camera/webcam sensor on X1 Nano Gen2

Hi all. Thank you for supporting this hardware on an open source OS. It's beyond appreciated. I've attempted to build your software/DKMS drivers on Arch linux for the Alder Lake IPU6 with the OV2740 sensor. Using the most recently available git packages, I'm unable to load the intel-ipu6-psys and intel-ipu6-isys modules. modprobe for intel-ipu6 itself loads the module and after this I'm able to load the ov2740 module but not with the psys/isys modules.

❯ sudo dmesg | grep -i -e 'ipu|mei|ov2|vsc|v4l' | egrep -v audit                            Tue 18 Oct 2022 12:36:55 PM MDT
egrep: warning: egrep is obsolescent; using grep -E
[    0.011252] ACPI: SSDT 0x000000008D828000 000150 (v02 LENOVO IpuSsdt  00001000 INTL 20200717)
[   10.671738] v4l2loopback driver version 0.12.7 loaded
[   11.812411] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
[   13.856510] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[   13.864941] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[ 4543.903121] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[ 4543.903288] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[ 4543.903317] intel-ipu6 intel-ipu: physical base address 0x603c000000
[ 4543.903318] intel-ipu6 intel-ipu: mapped as: 0x00000000abd82859
[ 4543.903365] intel-ipu6 intel-ipu: IPU in secure mode
[ 4543.903366] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[ 4543.903367] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[ 4543.921040] intel-ipu6 intel-ipu: IPC reset done
[ 4543.921042] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[ 4543.922677] intel-ipu6 intel-ipu: FW version: 20220510
[ 4543.922896] RIP: 0010:ipu_pci_probe.cold+0x3fc/0x930 [intel_ipu6]
[ 4543.923008]  ipu_init+0x3f/0x1000 [intel_ipu6 cb9a573451b991ba9515d26d3199af1054f2a906]
[ 4543.923070] Modules linked in: intel_ipu6(OE+) videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common uhid rfcomm cmac algif_hash algif_skcipher af_alg bnep snd_seq_dummy snd_hrtimer snd_seq snd_seq_device bridge stp llc wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel uinput snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common spi_ljca(OE) i2c_ljca(OE) snd_soc_hdac_hdmi snd_sof_probes gpio_ljca(OE) spi_nor snd_soc_dmic joydev mousedev mtd iTCO_wdt intel_pmc_bxt iTCO_vendor_support mei_pxp mei_hdcp mei_wdt pmt_telemetry pmt_class intel_rapl_msr intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel aesni_intel crypto_simd cryptd rapl intel_cstate intel_uncore psmouse pcspkr think_lmi firmware_attributes_class wmi_bmof btusb btrtl btbcm btintel
[ 4543.923140]  btmtk bluetooth ecdh_generic crc16 ljca(OE) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda iwlmvm snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda mac80211 snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_bus snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine libarc4 snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec iwlwifi snd_hda_core snd_hwdep snd_pcm cfg80211 spi_intel_pci i2c_i801 spi_intel intel_lpss_pci i2c_smbus snd_timer intel_lpss mei_me idma64 processor_thermal_device_pci processor_thermal_device thunderbolt processor_thermal_rfim ucsi_acpi processor_thermal_mbox typec_ucsi processor_thermal_rapl intel_vsec thinkpad_acpi intel_rapl_common typec igen6_edac roles ledtrig_audio platform_profile rfkill snd mei_vsc(OE) mei soundcore int3403_thermal soc_button_array
[ 4543.923188]  int340x_thermal_zone mac_hid ov2740(OE) v4l2_fwnode tpm_crb v4l2_async intel_skl_int3472_tps68470 tps68470_regulator tpm_tis tpm_tis_core clk_tps68470 tpm intel_skl_int3472_discrete intel_hid rng_core sparse_keymap int3400_thermal acpi_thermal_rel acpi_tad acpi_pad vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) v4l2loopback(OE) videodev mc dm_multipath dm_mod sg crypto_user fuse acpi_call(OE) bpf_preload ip_tables x_tables serio_raw atkbd xhci_pci xhci_pci_renesas libps2 wmi vivaldi_fmap i8042 serio zram i915 drm_buddy video drm_display_helper cec ttm intel_agp intel_gtt zfs(POE) zunicode(POE) zzstd(OE) zlua(OE) zavl(POE) icp(POE) zcommon(POE) znvpair(POE) spl(OE) nvme nvme_core nvme_common
[ 4543.923464] RIP: 0010:ipu_pci_probe.cold+0x3fc/0x930 [intel_ipu6]
[ 5370.637306] v4l2loopback driver version 0.12.7 loaded

I'm uncertain what other feedback to provide as with the module hang I've been unable to get further debug information. I would be very happy to provide any feedback you need to troubleshoot.

Also, are you able to comment on the "intel_iommu=off" kernel option? Is this necessary?

Take care.

Buil-in webcam HP TrueVision 5M does not work

Webcam: HP True Vision 5MP IR camera with camera shutter, temporal noise reduction and integrated dual array digital microphones

System:
Kernel: 5.15.0-67-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.6.7
tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
Type: Convertible System: HP product: HP Spectre x360 2-in-1 Laptop 16-f0xxx
v: Type1ProductConfigId serial: Chassis: type: 31
serial:
Mobo: HP model: 891A v: 92.45 serial: UEFI: Insyde v: F.14
date: 01/09/2023
Battery:
ID-1: BAT1 charge: 64.6 Wh (80.4%) condition: 80.3/83.0 Wh (96.7%) volts: 12.2 min: 11.6
model: Hewlett-Packard PABAS0241231 serial: status: Discharging
Device-1: hid-0018:04F3:2E0C.0001-battery model: ELAN2513:00 04F3:2E0C serial: N/A charge: N/A
status: N/A
CPU:
Info: quad core model: 11th Gen Intel Core i7-11390H bits: 64 type: MT MCP arch: Tiger Lake
rev: 2 cache: L1: 320 KiB L2: 5 MiB L3: 12 MiB
Speed (MHz): avg: 3297 high: 3703 min/max: 400/4800:5000 cores: 1: 2841 2: 2798 3: 3703
4: 3569 5: 2899 6: 3364 7: 3606 8: 3602 bogomips: 54681
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Hewlett-Packard driver: i915
v: kernel ports: active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 0000:00:02.0
chip-ID: 8086:9a49
Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting unloaded: fbdev,vesa
gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 3072x1920 s-dpi: 96
Monitor-1: eDP-1 model: AU Optronics res: 3072x1920 dpi: 227 diag: 406mm (16")
OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 22.2.5 direct render: Yes
Audio:
Device-1: Intel vendor: Hewlett-Packard driver: intel-ipu6 bus-ID: 0000:00:05.0
chip-ID: 8086:9a19
Device-2: Intel Tiger Lake-LP Smart Sound Audio vendor: Hewlett-Packard
driver: sof-audio-pci-intel-tgl bus-ID: 0000:00:1f.3 chip-ID: 8086:a0c8
Sound Server-1: ALSA v: k5.15.0-67-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 0000:00:14.3 chip-ID: 8086:a0f0
IF: wlo1 state: up mac:
IF-ID-1: br-cbe742b0b3e5 state: down mac:
IF-ID-2: docker0 state: down mac:
Bluetooth:
Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-10:3 chip-ID: 8087:0026
Report: hciconfig ID: hci0 rfk-id: 0 state: up address: bt-v: 3.0 lmp-v: 5.2
sub-v: 237e
RAID:
Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd v: 0.6
bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b
Drives:
Local Storage: total: 476.94 GiB used: 39.83 GiB (8.4%)
ID-1: /dev/nvme0n1 vendor: SK Hynix model: PC801 HFS512GEJ9X101N size: 476.94 GiB
speed: 63.2 Gb/s lanes: 4 serial: temp: 30.9 C
Partition:
ID-1: / size: 283.7 GiB used: 39.74 GiB (14.0%) fs: ext4 dev: /dev/nvme0n1p5
ID-2: /boot/efi size: 256 MiB used: 94.5 MiB (36.9%) fs: vfat dev: /dev/nvme0n1p1
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
USB:
Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 1 rev: 2.0 speed: 480 Mb/s
chip-ID: 1d6b:0002
Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0 speed: 480 Mb/s
chip-ID: 1d6b:0002
Device-1: 3-6:2 info: Synaptics type: driver: N/A rev: 2.0 speed: 12 Mb/s
chip-ID: 06cb:00ff
Device-2: 3-10:3 info: Intel AX201 Bluetooth type: Bluetooth driver: btusb rev: 2.0
speed: 12 Mb/s chip-ID: 8087:0026
Hub-4: 4-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
Sensors:
System Temperatures: cpu: 27.8 C mobo: 10.0 C
Fan Speeds (RPM): N/A
Repos:
Packages: 2285 apt: 2266 flatpak: 19
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
1: deb http: //packages.linuxmint.com vera main upstream import backport
2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
Processes: 314 Uptime: 5m Memory: 15.38 GiB used: 2.77 GiB (18.0%) Init: systemd v: 249
runlevel: 5 Compilers: gcc: 11.3.0 alt: 11/12 Client: Unknown python3.10 client inxi: 3.3.13

build failure: missing linux/vsc.h

$ make -j EXTERNAL_BUILD=1
make -C /lib/modules/`uname -r`/build M=/work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-25-generic'
  CC [M]  /work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers/drivers/media/i2c/ov01a10.o
  CC [M]  /work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers/drivers/media/i2c/ov02c10.o
/work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers/drivers/media/i2c/ov02c10.c:14:10: fatal error: linux/vsc.h: No such file or directory
   14 | #include <linux/vsc.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:285: /work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers/drivers/media/i2c/ov02c10.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers/drivers/media/i2c/ov01a10.c:14:10: fatal error: linux/vsc.h: No such file or directory
   14 | #include <linux/vsc.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:285: /work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers/drivers/media/i2c/ov01a10.o] Error 1
make[2]: *** [scripts/Makefile.build:548: /work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers/drivers/media/i2c] Error 2
make[1]: *** [Makefile:1875: /work/vicamo/canonical/dkms/ipu6-drivers/ipu6-drivers] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-25-generic'
make: *** [Makefile:22: all] Error 2

Can't load firmware

I installed ipu6 and ivsc from this PPA. Everything installs fine but it won't load the firmware.

https://launchpad.net/~vicamo/+archive/ubuntu/mipi-ipu6/+packages

$ sudo dmesg | grep ipu
[    3.949259] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[    3.949469] intel-ipu6 intel-ipu: Device 0x4e19 (rev: 0x0)
[    3.949499] intel-ipu6 intel-ipu: physical base address 0x6000000000
[    3.949501] intel-ipu6 intel-ipu: mapped as: 0x000000001158a7df
[    3.949732] intel-ipu6 intel-ipu: IPU in secure mode
[    3.951076] intel-ipu6 intel-ipu: IPC reset done
[    3.951083] intel-ipu6 intel-ipu: cpd file name: intel/ipu6se_fw.bin
[    3.955227] intel-ipu6 intel-ipu: Direct firmware load for intel/ipu6se_fw.bin failed with error -2
[    3.955238] intel-ipu6 intel-ipu: Requesting signed firmware failed
[    3.955263] intel-ipu6: probe of intel-ipu failed with error -2

OVTI02C1 sensor on Latiture 7440

I have a Dell laptop latitude 7440 with a Intel Raptor Lake-P GPU.
The sensor's camera is ov02c10 and lspci shows:

0000:00:05.0 Multimedia controller [0480]: Intel Corporation Device [8086:a75d] (rev 01)
Subsystem: Dell Device [1028:0c0c]
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at 6054000000 (64-bit, non-prefetchable) [size=16M]
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [d0] Power Management version 3
Kernel driver in use: intel-ipu6
Kernel modules: intel_ipu6, intel_ipu6_psys, intel_ipu6_isys

I have build/installed on openSuse Leap 15.5 with kernel 6.3.3
the ipu6/ivsc drivers/software/firmware.
dmesg shows:
[ 16.957479] intel_ipu6: module verification failed: signature and/or required key missing - tainting kernel
[ 16.959929] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[ 16.960186] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x1)
[ 16.960218] intel-ipu6 0000:00:05.0: physical base address 0x6054000000
[ 16.960219] intel-ipu6 0000:00:05.0: mapped as: 0x0000000079ddfb69
[ 16.963921] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 16.963924] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 16.963925] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[ 16.981113] intel-ipu6 0000:00:05.0: IPC reset done
[ 16.981117] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 16.982391] intel-ipu6 0000:00:05.0: FW version: 20220510
[ 16.995922] intel-ipu6 0000:00:05.0: Found supported sensor OVTI02C1:00
[ 16.996091] intel-ipu6 0000:00:05.0: Connected 1 cameras
[ 16.997245] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[ 17.006920] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[ 17.077161] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[ 17.077185] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[ 17.300282] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[ 17.300411] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[ 18.261754] intel vsc not ready
[ 18.271240] intel vsc not ready
[ 18.340328] intel vsc not ready
[ 18.357691] intel vsc not ready
[ 18.367011] intel vsc not ready
[ 18.389216] intel vsc not ready
[ 18.440657] intel vsc not ready
[ 27.217900] intel vsc not ready
[ 27.422660] intel-ipu6-isys intel-ipu6-isys0: bind ov02c10 15-0036 nlanes is 2 port is 1
[ 27.422982] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.

First question: is the message "intel vsc not ready" normal?

Anyway, at this point the camera is recognized, the firmware is found and loaded,
/dev/video0 and /dev/ipu-psys0 do exist.

But if I try to use the camera (cheese, ffplay) it doesn't work.
Googling around, it appears that I need to install:
gstreamer1.0-icamera, v4l2loopback and v4l2-relayd.
Is that correct?

But while I'm compiling icamerasrc_slim_api branch I get this error:

gstcamerasrc.cpp: In function ‘gboolean gst_camerasrc_start(GstCamBaseSrc*)’:
gstcamerasrc.cpp:2839:67: error: too many arguments to function ‘int icamera::camera_device_open(int)’
ret = camera_device_open(camerasrc->device_id, camerasrc->num_vc);
^
In file included from gstcamerasrc.cpp:62:0:
/usr/include/libcamhal/api/ICamera.h:210:5: note: declared here
int camera_device_open(int camera_id);

At this point some help is appreciated.

Ubuntu 23.04

Are these being updated for use with Ubuntu 23.04?

Kernel trap ov01a10 - kallsyms_lookup_name+0x4/0xf0

Hello, I am using Majaro Linux with 5.19.1-3-MANJARO kernel. I was able to compile this modules using https://aur.archlinux.org/packages/intel-ipu6-dkms-git AUR package. But get kernel trap during system boot.

[   15.831157] traps: Missing ENDBR: kallsyms_lookup_name+0x4/0xf0
[   15.831164] ------------[ cut here ]------------
[   15.831165] kernel BUG at arch/x86/kernel/traps.c:253!
[   15.831172] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[   15.831176] CPU: 8 PID: 444 Comm: systemd-udevd Tainted: G           OE     5.19.1-3-MANJARO #1 04cffc0a920d6f0accb28b85e9c8488dd72ba600
[   15.831180] Hardware name: Dell Inc. XPS 9320/0CW9KM, BIOS 1.4.0 05/13/2022
[   15.831181] RIP: 0010:exc_control_protection+0xc2/0xd0
[   15.831187] Code: 8b 93 80 00 00 00 be fa 00 00 00 48 c7 c7 b6 b5 88 92 e8 21 ad 4a ff e9 72 ff ff ff 48 c7 c7 9d b5 88 92 e8 a6 06 fb ff 0f 0b <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 90 66 0f 1f 00 55 53 48 89
[   15.831188] RSP: 0018:ffffbf3c823ff6b8 EFLAGS: 00010002
[   15.831191] RAX: 0000000000000033 RBX: ffffbf3c823ff6d8 RCX: 0000000000000000
[   15.831192] RDX: 0000000000000000 RSI: ffff98426f821660 RDI: ffff98426f821660
[   15.831194] RBP: 0000000000000003 R08: 0000000000000000 R09: ffffbf3c823ff550
[   15.831195] R10: 0000000000000003 R11: ffffffff930cb428 R12: 0000000000000000
[   15.831195] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[   15.831197] FS:  00007fa381137200(0000) GS:ffff98426f800000(0000) knlGS:0000000000000000
[   15.831199] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   15.831200] CR2: 000055cac07f2000 CR3: 000000010244e004 CR4: 0000000000f70ee0
[   15.831201] PKRU: 55555554
[   15.831209] Call Trace:
[   15.831212]  <TASK>
[   15.831214]  asm_exc_control_protection+0x26/0x30
[   15.831217] RIP: 0010:kallsyms_lookup_name+0x4/0xf0
[   15.831219] Code: ff 0f 1f 44 00 00 f3 0f 1e fa 0f 1f 44 00 00 45 31 c0 31 c9 31 d2 e9 3b fe ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 66 0f 1f 00 <0f> 1f 44 00 00 41 56 b9 10 00 00 00 41 55 49 89 fd 41 54 55 53 48
[   15.831221] RSP: 0018:ffffbf3c823ff788 EFLAGS: 00010246
[   15.831222] RAX: ffffffff9136a664 RBX: ffff983b44ef2020 RCX: 0000000000000002
[   15.831223] RDX: 0000000000000001 RSI: 0000000055555554 RDI: ffffffffc0ed70db
[   15.831224] RBP: ffffbf3c823ff810 R08: 0000000000032630 R09: 0000000000000000
[   15.831225] R10: 0000000000000001 R11: 0000000000000008 R12: ffff983b44ef2000
[   15.831226] R13: ffff983b44ef2000 R14: ffff983b44ef2020 R15: ffff983b02d4f030
[   15.831227]  ? kallsyms_lookup_name+0x4/0xf0
[   15.831231]  ov01a10_probe+0x438/0x490 [ov01a10 9de964567655b25584cd0978272930f272590611]
[   15.831236]  ? kmem_cache_alloc_trace+0x16b/0x310
[   15.831240]  ? i2c_device_probe+0x11f/0x2b0
[   15.831245]  i2c_device_probe+0x11f/0x2b0
[   15.831248]  really_probe+0x1bf/0x390
[   15.831251]  __driver_probe_device+0xff/0x170
[   15.831253]  driver_probe_device+0x1f/0x90
[   15.831254]  __device_attach_driver+0x76/0xe0
[   15.831256]  ? driver_allows_async_probing+0x70/0x70
[   15.831258]  bus_for_each_drv+0x8c/0xe0
[   15.831260]  __device_attach+0xb2/0x1e0
[   15.831261]  bus_probe_device+0x92/0xb0
[   15.831263]  device_add+0x422/0x9a0
[   15.831266]  i2c_new_client_device+0x19c/0x2c0
[   15.831268]  i2c_acpi_add_device+0x97/0xb0
[   15.831270]  acpi_ns_walk_namespace+0x16d/0x2db
[   15.831275]  ? i2c_acpi_resource_count+0x30/0x30
[   15.831276]  ? i2c_acpi_resource_count+0x30/0x30
[   15.831277]  acpi_walk_namespace+0xf5/0x141
[   15.831280]  i2c_acpi_register_devices+0x48/0x80
[   15.831281]  i2c_register_adapter+0x225/0x6a0
[   15.831284]  platform_probe+0x45/0x90
[   15.831286]  really_probe+0x1bf/0x390
[   15.831288]  __driver_probe_device+0xff/0x170
[   15.831289]  driver_probe_device+0x1f/0x90
[   15.831291]  __driver_attach+0xc2/0x1b0
[   15.831292]  ? __device_attach_driver+0xe0/0xe0
[   15.831294]  bus_for_each_dev+0x88/0xd0
[   15.831295]  bus_add_driver+0x164/0x220
[   15.831297]  driver_register+0x8d/0xe0
[   15.831299]  ? 0xffffffffc1075000
[   15.831300]  do_one_initcall+0x5a/0x220
[   15.831305]  do_init_module+0x4a/0x1e0
[   15.831307]  __do_sys_init_module+0x138/0x1b0
[   15.831309]  do_syscall_64+0x5c/0x90
[   15.831312]  ? vfs_read+0x148/0x190
[   15.831314]  ? syscall_exit_to_user_mode+0x1b/0x40
[   15.831316]  ? do_syscall_64+0x6b/0x90
[   15.831318]  ? do_user_addr_fault+0x1db/0x690
[   15.831320]  ? exc_page_fault+0x74/0x170
[   15.831322]  entry_SYSCALL_64_after_hwframe+0x63/0xcd

Failed to enable ov02c10 on Dell Latitude 7640(Oasis): int3472: No supply name defined

dmesg.Dell-Latitude7640.Oasis.ov02c10.no-supply-name-defined.txt

[    1.418430] intel_pmc_core INT33A1:00:  initialized
[    4.495069] int3472-discrete INT3472:01: INT3472 seems to have no dependents.
[    4.501975] int3472-discrete INT3472:06: sensor name: LM3643
[    4.502906] int3472-discrete INT3472:06: No supply name defined
[    4.502909] int3472-discrete INT3472:06: error -ENODEV: Failed to map regulator to sensor

An additional patch
patch is applied in advance to match sensor config.

UBSAN: invalid-load in /build/linux-oem-6.0-Q2lfmg/linux-oem-6.0-6.0.0/include/linux/iosys-map.h:254:9

UBSAN error found at activating camera sensor ov02c10:

[  152.748694] ================================================================================
[  152.748697] UBSAN: invalid-load in /build/linux-oem-6.0-Q2lfmg/linux-oem-6.0-6.0.0/include/linux/iosys-map.h:254:9
[  152.748699] load of value 149 is not a valid value for type '_Bool'
[  152.748701] CPU: 2 PID: 1116 Comm: camerasrc0:src Tainted: G           O       6.0.0-9005-oem #5+exp.12-Ubuntu
[  152.748703] Hardware name: Dell Inc. Latitude 7640/0KFH4R, BIOS 89.15.25 08/24/2022
[  152.748704] Call Trace:
[  152.748705]  <TASK>
[  152.748708]  show_stack+0x52/0x5c
[  152.748713]  dump_stack_lvl+0x49/0x63
[  152.748715]  dump_stack+0x10/0x16
[  152.748716]  ubsan_epilogue+0x9/0x3f
[  152.748717]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
[  152.748719]  dma_buf_vmap.cold+0x38/0x3d
[  152.748723]  ipu_psys_mapbuf_locked+0x16d/0x440 [intel_ipu6_psys]
[  152.748727]  ? _copy_to_user+0x25/0x40
[  152.748730]  ? ipu_psys_ioctl+0x2ef/0x520 [intel_ipu6_psys]
[  152.748733]  ipu_psys_ioctl+0x177/0x520 [intel_ipu6_psys]
[  152.748735]  ? __fget_light+0xa7/0x130
[  152.748738]  ? __fget_light+0xa7/0x130
[  152.748739]  __x64_sys_ioctl+0x92/0xd0
[  152.748741]  do_syscall_64+0x59/0x90
[  152.748744]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[  152.748746] RIP: 0033:0x7fbac031aaff
[  152.748748] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
[  152.748749] RSP: 002b:00007fbabd8af1c0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  152.748751] RAX: ffffffffffffffda RBX: 00007fbab4add990 RCX: 00007fbac031aaff
[  152.748752] RDX: 000000000000001f RSI: 00000000c0044102 RDI: 000000000000001c
[  152.748753] RBP: 00007fbab4adda20 R08: 0000000000000000 R09: 00007fbab4adda20
[  152.748753] R10: 00007fbab4adde40 R11: 0000000000000246 R12: 0000000000000000
[  152.748754] R13: 00007fbab4ad8e30 R14: 0000000000001ab4 R15: 00007fbab4add7c0
[  152.748755]  </TASK>
[  152.748756] ================================================================================

dmesg.6.0.0-9005-oem.Oasis16.ov02c10.ubsan-error.txt

Revision info:

GC5035 dkms

BUILT_MODULE_NAME[20]="gc5035"
BUILT_MODULE_LOCATION[20]="drivers/media/i2c"
DEST_MODULE_LOCATION[20]="/updates"

Needs to be added to dkms.conf

fail to build against v5.18-rc3 or newer

/tmp/kernel-vicamo-e13a43cb71e2d-jqLD/build/drivers/media/pci/intel/ipu6/../ipu.c: In function 'ipu_pci_probe':
/tmp/kernel-vicamo-e13a43cb71e2d-jqLD/build/drivers/media/pci/intel/ipu6/../ipu.c:442:16: error: implicit declaration of function 'pci_set_dma_mask' [-Werror=implicit-function-declaration]
  442 |         rval = pci_set_dma_mask(pdev, DMA_BIT_MASK(dma_mask));
      |                ^~~~~~~~~~~~~~~~
/tmp/kernel-vicamo-e13a43cb71e2d-jqLD/build/drivers/media/pci/intel/ipu6/../ipu.c:444:24: error: implicit declaration of function 'pci_set_consistent_dma_mask' [-Werror=implicit-function-declaration]
  444 |                 rval = pci_set_consistent_dma_mask(pdev,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:354:60: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
  354 | static int ipu_dma_buf_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
      |                                                            ^~~~~~~~~~~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function 'ipu_dma_buf_vmap':
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:369:12: error: invalid use of undefined type 'struct dma_buf_map'
  369 |         map->vaddr = vm_map_ram(ipu_attach->pages, ipu_attach->npages, 0);
      |            ^~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:370:12: error: invalid use of undefined type 'struct dma_buf_map'
  370 |         map->is_iomem = false;
      |            ^~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:371:17: error: invalid use of undefined type 'struct dma_buf_map'
  371 |         if (!map->vaddr)
      |                 ^~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c: At top level:
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:377:63: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
  377 | static void ipu_dma_buf_vunmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
      |                                                               ^~~~~~~~~~~
  CC [M]  drivers/media/test-drivers/vivid/vivid-vbi-out.o
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function 'ipu_dma_buf_vunmap':
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:392:25: error: invalid use of undefined type 'struct dma_buf_map'
  392 |         vm_unmap_ram(map->vaddr, ipu_attach->npages);
      |                         ^~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c: At top level:
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:403:17: error: initialization of 'int (*)(struct dma_buf *, struct iosys_map *)' from incompatible pointer type 'int (*)(struct dma_buf *, struct dma_buf_map *)' [-Werror=incompatible-pointer-types]
  403 |         .vmap = ipu_dma_buf_vmap,
      |                 ^~~~~~~~~~~~~~~~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:403:17: note: (near initialization for 'ipu_dma_buf_ops.vmap')
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:404:19: error: initialization of 'void (*)(struct dma_buf *, struct iosys_map *)' from incompatible pointer type 'void (*)(struct dma_buf *, struct dma_buf_map *)' [-Werror=incompatible-pointer-types]
  404 |         .vunmap = ipu_dma_buf_vunmap,
      |                   ^~~~~~~~~~~~~~~~~~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:404:19: note: (near initialization for 'ipu_dma_buf_ops.vunmap')
  CC      drivers/scsi/scsi_logging.o
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function 'ipu_psys_kbuf_unmap':
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:452:36: error: storage size of 'dmap' isn't known
  452 |                 struct dma_buf_map dmap;
      |                                    ^~~~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:454:17: error: implicit declaration of function 'dma_buf_map_set_vaddr'; did you mean 'iosys_map_set_vaddr'? [-Werror=implicit-function-declaration]
  454 |                 dma_buf_map_set_vaddr(&dmap, kbuf->kaddr);
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 iosys_map_set_vaddr
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:452:36: warning: unused variable 'dmap' [-Wunused-variable]
  452 |                 struct dma_buf_map dmap;
      |                                    ^~~~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function 'ipu_psys_mapbuf_locked':
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:578:28: error: storage size of 'dmap' isn't known
  578 |         struct dma_buf_map dmap;
      |                            ^~~~
/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:578:28: warning: unused variable 'dmap' [-Wunused-variable]
cc1: some warnings being treated as errors
make[7]: *** [/tmp/kernel-vicamo-b08ab6c1b36e4-60sn/build/scripts/Makefile.build:296: drivers/media/pci/intel/ipu6/../ipu-psys.o] Error 1
make[7]: *** Waiting for unfinished jobs....

probe of intel-ipu failed with error -12

Lenovo X1 Carbon Gen10
Kernel 6.0.9 with following patches:

(self built, OS: Arch Linux)

ipu6-drivers as of today, commit a1e6f04

I get the following error on boot:

kernel: intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
kernel: intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
kernel: intel-ipu6 intel-ipu: physical base address 0x603c000000
kernel: intel-ipu6 intel-ipu: mapped as: 0x000000007174b0a7
kernel: intel-ipu6 intel-ipu: IPU in secure mode
kernel: intel-ipu6 intel-ipu: IPU secure touch = 0x0
kernel: intel-ipu6 intel-ipu: IPU camera mask = 0xff
kernel: proc_thermal_pci 0000:00:04.0: enabling device (0000 -> 0002)
kernel: intel-ipu6 intel-ipu: IPC reset done
kernel: intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
kernel: intel_rapl_common: Found RAPL domain package
kernel: intel-ipu6 intel-ipu: FW version: 20220510
kernel: intel-ipu6: probe of intel-ipu failed with error -12

What am I missing?

Thanks for any suggestions.

Build fails on 6.1-rc5

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/media/media-entity.h?h=v6.1-rc5&id=ae219872834a32da88408a92a4b4745c11f5a7ce removed the pipe member from media_entity

make -C /lib/modules/6.1.0-rc5-1-mainline/build M=/home/twouters/src/ipu6-drivers modules
make[1]: Entering directory '/usr/lib/modules/6.1.0-rc5-1-mainline/build'
  CC [M]  /home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.o
In file included from ./include/linux/bits.h:22,
                 from ./include/linux/ratelimit_types.h:5,
                 from ./include/linux/ratelimit.h:5,
                 from ./include/linux/dev_printk.h:16,
                 from ./include/linux/device.h:15,
                 from /home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:4:
./include/linux/find.h: In function ‘find_first_bit’:
./include/linux/bits.h:25:36: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                    ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:25:17: note: in expansion of macro ‘__is_constexpr’
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:168:45: note: in expansion of macro ‘GENMASK’
  168 |                 unsigned long val = *addr & GENMASK(size - 1, 0);
      |                                             ^~~~~~~
./include/linux/bits.h:25:48: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                                ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:168:45: note: in expansion of macro ‘GENMASK’
  168 |                 unsigned long val = *addr & GENMASK(size - 1, 0);
      |                                             ^~~~~~~
./include/linux/find.h: In function ‘find_nth_bit’:
./include/linux/bits.h:25:36: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                    ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:25:17: note: in expansion of macro ‘__is_constexpr’
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:197:46: note: in expansion of macro ‘GENMASK’
  197 |                 unsigned long val =  *addr & GENMASK(size - 1, 0);
      |                                              ^~~~~~~
./include/linux/bits.h:25:48: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                                ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:197:46: note: in expansion of macro ‘GENMASK’
  197 |                 unsigned long val =  *addr & GENMASK(size - 1, 0);
      |                                              ^~~~~~~
./include/linux/find.h: In function ‘find_nth_and_bit’:
./include/linux/bits.h:25:36: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                    ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:25:17: note: in expansion of macro ‘__is_constexpr’
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:223:56: note: in expansion of macro ‘GENMASK’
  223 |                 unsigned long val =  *addr1 & *addr2 & GENMASK(size - 1, 0);
      |                                                        ^~~~~~~
./include/linux/bits.h:25:48: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                                ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:223:56: note: in expansion of macro ‘GENMASK’
  223 |                 unsigned long val =  *addr1 & *addr2 & GENMASK(size - 1, 0);
      |                                                        ^~~~~~~
./include/linux/find.h: In function ‘find_nth_andnot_bit’:
./include/linux/bits.h:25:36: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                    ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:25:17: note: in expansion of macro ‘__is_constexpr’
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:250:59: note: in expansion of macro ‘GENMASK’
  250 |                 unsigned long val =  *addr1 & (~*addr2) & GENMASK(size - 1, 0);
      |                                                           ^~~~~~~
./include/linux/bits.h:25:48: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                                ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:250:59: note: in expansion of macro ‘GENMASK’
  250 |                 unsigned long val =  *addr1 & (~*addr2) & GENMASK(size - 1, 0);
      |                                                           ^~~~~~~
./include/linux/find.h: In function ‘find_first_and_bit’:
./include/linux/bits.h:25:36: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                    ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:25:17: note: in expansion of macro ‘__is_constexpr’
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:274:55: note: in expansion of macro ‘GENMASK’
  274 |                 unsigned long val = *addr1 & *addr2 & GENMASK(size - 1, 0);
      |                                                       ^~~~~~~
./include/linux/bits.h:25:48: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                                ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:274:55: note: in expansion of macro ‘GENMASK’
  274 |                 unsigned long val = *addr1 & *addr2 & GENMASK(size - 1, 0);
      |                                                       ^~~~~~~
./include/linux/find.h: In function ‘find_first_zero_bit’:
./include/linux/bits.h:25:36: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                    ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:25:17: note: in expansion of macro ‘__is_constexpr’
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:296:46: note: in expansion of macro ‘GENMASK’
  296 |                 unsigned long val = *addr | ~GENMASK(size - 1, 0);
      |                                              ^~~~~~~
./include/linux/bits.h:25:48: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                                ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:296:46: note: in expansion of macro ‘GENMASK’
  296 |                 unsigned long val = *addr | ~GENMASK(size - 1, 0);
      |                                              ^~~~~~~
./include/linux/find.h: In function ‘find_last_bit’:
./include/linux/bits.h:25:36: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                    ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:25:17: note: in expansion of macro ‘__is_constexpr’
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:317:45: note: in expansion of macro ‘GENMASK’
  317 |                 unsigned long val = *addr & GENMASK(size - 1, 0);
      |                                             ^~~~~~~
./include/linux/bits.h:25:48: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                                                ^
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
./include/linux/bits.h:38:10: note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
./include/linux/find.h:317:45: note: in expansion of macro ‘GENMASK’
  317 |                 unsigned long val = *addr & GENMASK(size - 1, 0);
      |                                             ^~~~~~~
In file included from ./include/linux/kernel.h:21,
                 from ./arch/x86/include/asm/percpu.h:27,
                 from ./arch/x86/include/asm/current.h:6,
                 from ./include/linux/sched.h:12,
                 from ./include/linux/ratelimit.h:6:
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c: In function ‘ipu_isys_csi2_get_link_freq’:
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:79:74: error: ‘struct media_entity’ has no member named ‘pipe’
   79 |         struct ipu_isys_pipeline *pipe = container_of(csi2->asd.sd.entity.pipe,
      |                                                                          ^
./include/linux/container_of.h:18:33: note: in definition of macro ‘container_of’
   18 |         void *__mptr = (void *)(ptr);                                   \
      |                                 ^~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:79:74: error: ‘struct media_entity’ has no member named ‘pipe’
   79 |         struct ipu_isys_pipeline *pipe = container_of(csi2->asd.sd.entity.pipe,
      |                                                                          ^
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:79:42: note: in expansion of macro ‘container_of’
   79 |         struct ipu_isys_pipeline *pipe = container_of(csi2->asd.sd.entity.pipe,
      |                                          ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:79:74: error: ‘struct media_entity’ has no member named ‘pipe’
   79 |         struct ipu_isys_pipeline *pipe = container_of(csi2->asd.sd.entity.pipe,
      |                                                                          ^
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:20:23: note: in expansion of macro ‘__same_type’
   20 |                       __same_type(*(ptr), void),                        \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:79:42: note: in expansion of macro ‘container_of’
   79 |         struct ipu_isys_pipeline *pipe = container_of(csi2->asd.sd.entity.pipe,
      |                                          ^~~~~~~~~~~~
././include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
  298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:79:42: note: in expansion of macro ‘container_of’
   79 |         struct ipu_isys_pipeline *pipe = container_of(csi2->asd.sd.entity.pipe,
      |                                          ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c: In function ‘set_stream’:
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:260:63: error: ‘struct media_entity’ has no member named ‘pipe’
  260 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                                               ^
./include/linux/container_of.h:18:33: note: in definition of macro ‘container_of’
   18 |         void *__mptr = (void *)(ptr);                                   \
      |                                 ^~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:260:63: error: ‘struct media_entity’ has no member named ‘pipe’
  260 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                                               ^
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:260:40: note: in expansion of macro ‘container_of’
  260 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                        ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:260:63: error: ‘struct media_entity’ has no member named ‘pipe’
  260 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                                               ^
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:20:23: note: in expansion of macro ‘__same_type’
   20 |                       __same_type(*(ptr), void),                        \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:260:40: note: in expansion of macro ‘container_of’
  260 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                        ^~~~~~~~~~~~
././include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
  298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:260:40: note: in expansion of macro ‘container_of’
  260 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                        ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c: In function ‘csi2_link_validate’:
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:323:32: error: ‘struct media_entity’ has no member named ‘pipe’
  323 |             !link->sink->entity->pipe || !link->source->entity)
      |                                ^~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:327:53: error: ‘struct media_entity’ has no member named ‘pipe’
  327 |         ip = to_ipu_isys_pipeline(link->sink->entity->pipe);
      |                                                     ^~
./include/linux/container_of.h:18:33: note: in definition of macro ‘container_of’
   18 |         void *__mptr = (void *)(ptr);                                   \
      |                                 ^~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:327:14: note: in expansion of macro ‘to_ipu_isys_pipeline’
  327 |         ip = to_ipu_isys_pipeline(link->sink->entity->pipe);
      |              ^~~~~~~~~~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:327:53: error: ‘struct media_entity’ has no member named ‘pipe’
  327 |         ip = to_ipu_isys_pipeline(link->sink->entity->pipe);
      |                                                     ^~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-video.h:101:9: note: in expansion of macro ‘container_of’
  101 |         container_of((__pipe), struct ipu_isys_pipeline, pipe)
      |         ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:327:14: note: in expansion of macro ‘to_ipu_isys_pipeline’
  327 |         ip = to_ipu_isys_pipeline(link->sink->entity->pipe);
      |              ^~~~~~~~~~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:327:53: error: ‘struct media_entity’ has no member named ‘pipe’
  327 |         ip = to_ipu_isys_pipeline(link->sink->entity->pipe);
      |                                                     ^~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:20:23: note: in expansion of macro ‘__same_type’
   20 |                       __same_type(*(ptr), void),                        \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-video.h:101:9: note: in expansion of macro ‘container_of’
  101 |         container_of((__pipe), struct ipu_isys_pipeline, pipe)
      |         ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:327:14: note: in expansion of macro ‘to_ipu_isys_pipeline’
  327 |         ip = to_ipu_isys_pipeline(link->sink->entity->pipe);
      |              ^~~~~~~~~~~~~~~~~~~~
././include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
  298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-video.h:101:9: note: in expansion of macro ‘container_of’
  101 |         container_of((__pipe), struct ipu_isys_pipeline, pipe)
      |         ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:327:14: note: in expansion of macro ‘to_ipu_isys_pipeline’
  327 |         ip = to_ipu_isys_pipeline(link->sink->entity->pipe);
      |              ^~~~~~~~~~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:331:60: error: ‘struct media_entity’ has no member named ‘pipe’
  331 |                                         (link->sink->entity->pipe),
      |                                                            ^~
./include/linux/container_of.h:18:33: note: in definition of macro ‘container_of’
   18 |         void *__mptr = (void *)(ptr);                                   \
      |                                 ^~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:330:41: note: in expansion of macro ‘to_ipu_isys_pipeline’
  330 |         ipu_isys_video_add_capture_done(to_ipu_isys_pipeline
      |                                         ^~~~~~~~~~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:331:60: error: ‘struct media_entity’ has no member named ‘pipe’
  331 |                                         (link->sink->entity->pipe),
      |                                                            ^~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-video.h:101:9: note: in expansion of macro ‘container_of’
  101 |         container_of((__pipe), struct ipu_isys_pipeline, pipe)
      |         ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:330:41: note: in expansion of macro ‘to_ipu_isys_pipeline’
  330 |         ipu_isys_video_add_capture_done(to_ipu_isys_pipeline
      |                                         ^~~~~~~~~~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:331:60: error: ‘struct media_entity’ has no member named ‘pipe’
  331 |                                         (link->sink->entity->pipe),
      |                                                            ^~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:20:23: note: in expansion of macro ‘__same_type’
   20 |                       __same_type(*(ptr), void),                        \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-video.h:101:9: note: in expansion of macro ‘container_of’
  101 |         container_of((__pipe), struct ipu_isys_pipeline, pipe)
      |         ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:330:41: note: in expansion of macro ‘to_ipu_isys_pipeline’
  330 |         ipu_isys_video_add_capture_done(to_ipu_isys_pipeline
      |                                         ^~~~~~~~~~~~~~~~~~~~
././include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
  298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-video.h:101:9: note: in expansion of macro ‘container_of’
  101 |         container_of((__pipe), struct ipu_isys_pipeline, pipe)
      |         ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:330:41: note: in expansion of macro ‘to_ipu_isys_pipeline’
  330 |         ipu_isys_video_add_capture_done(to_ipu_isys_pipeline
      |                                         ^~~~~~~~~~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c: In function ‘__subdev_link_validate’:
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:399:63: error: ‘struct media_entity’ has no member named ‘pipe’
  399 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                                               ^
./include/linux/container_of.h:18:33: note: in definition of macro ‘container_of’
   18 |         void *__mptr = (void *)(ptr);                                   \
      |                                 ^~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:399:63: error: ‘struct media_entity’ has no member named ‘pipe’
  399 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                                               ^
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:399:40: note: in expansion of macro ‘container_of’
  399 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                        ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:399:63: error: ‘struct media_entity’ has no member named ‘pipe’
  399 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                                               ^
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:20:23: note: in expansion of macro ‘__same_type’
   20 |                       __same_type(*(ptr), void),                        \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:399:40: note: in expansion of macro ‘container_of’
  399 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                        ^~~~~~~~~~~~
././include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
  298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
./include/linux/container_of.h:19:9: note: in expansion of macro ‘static_assert’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
./include/linux/container_of.h:19:23: note: in expansion of macro ‘__same_type’
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:399:40: note: in expansion of macro ‘container_of’
  399 |         struct ipu_isys_pipeline *ip = container_of(sd->entity.pipe,
      |                                        ^~~~~~~~~~~~
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c: At top level:
/home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:471:1: warning: ‘csi2_try_fmt’ defined but not used [-Wunused-function]
  471 | csi2_try_fmt(struct ipu_isys_video *av,
      | ^~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:250: /home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.o] Error 1
make[3]: *** [scripts/Makefile.build:500: /home/twouters/src/ipu6-drivers/drivers/media/pci/intel/ipu6] Error 2
make[2]: *** [scripts/Makefile.build:500: /home/twouters/src/ipu6-drivers/drivers/media/pci/intel] Error 2
make[1]: *** [Makefile:1992: /home/twouters/src/ipu6-drivers] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.1.0-rc5-1-mainline/build'
make: *** [Makefile:71: all] Error 2

Add support for OV5678 sensor

In Dell Latitude 7320 Detachable (with Tiger Lake processor) the front camera is an OV5678 sensor. For this sensor no i2c driver seems to exist for Linux but a driver for OV01A1S exists (see https://github.com/intel/ipu6-drivers/blob/master/drivers/media/i2c/ov01a1s.c) which seems to have the same output format (Bayer 4x4 RGB-Ir) and I assume that adapting this driver should be doable.

Help would be very appreciated. I am a C/C++ software developer myself but with no knowledge about Linux kernel development. So what would have to be done in order to make this work?

Thank you,
Marcus

Fails to build against 6.3

ipu6-drivers>   CC [M]  /build/source/drivers/media/pci/intel/ipu6/../ipu-psys-compat32.o
ipu6-drivers>   LD [M]  /build/source/intel_vsc.o
ipu6-drivers>   LD [M]  /build/source/mei_ace.o
ipu6-drivers>   LD [M]  /build/source/mei_csi.o
ipu6-drivers>   LD [M]  /build/source/i2c-ljca.o
ipu6-drivers>   LD [M]  /build/source/gpio-ljca.o
ipu6-drivers>   LD [M]  /build/source/mei_ace_debug.o
ipu6-drivers>   LD [M]  /build/source/mei_pse.o
ipu6-drivers>   LD [M]  /build/source/spi-ljca.o
ipu6-drivers> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:473:1: warning: 'csi2_try_fmt' defined but not used [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-function-Wunused-function8;;]
ipu6-drivers>   473 | csi2_try_fmt(struct ipu_isys_video *av,
ipu6-drivers>       | ^~~~~~~~~~~~
ipu6-drivers> /build/source/drivers/media/pci/intel/ipu6/../cio2-bridge.c: In function 'cio2_bridge_unregister_sensors':
ipu6-drivers> /build/source/drivers/media/pci/intel/ipu6/../cio2-bridge.c:296:17: error: implicit declaration of function 'software_node_unregister_nodes'; did you mean 'software_node_unregister'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;]
ipu6-drivers>   296 |                 software_node_unregister_nodes(sensor->swnodes);
ipu6-drivers>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ipu6-drivers>       |                 software_node_unregister
ipu6-drivers> /build/source/drivers/media/pci/intel/ipu6/../cio2-bridge.c: In function 'cio2_bridge_connect_sensor':
ipu6-drivers> /build/source/drivers/media/pci/intel/ipu6/../cio2-bridge.c:355:23: error: implicit declaration of function 'software_node_register_nodes'; did you mean 'software_node_register'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;]
ipu6-drivers>   355 |                 ret = software_node_register_nodes(sensor->swnodes);
ipu6-drivers>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
ipu6-drivers>       |                       software_node_register
ipu6-drivers>   LD [M]  /build/source/ljca.o
ipu6-drivers> cc1: some warnings being treated as errors
ipu6-drivers> make[4]: *** [/nix/store/jzhmim38g62p5ji45fnmm7vk45in5nig-linux-6.3.1-dev/lib/modules/6.3.1/source/scripts/Makefile.build:252: /build/source/drivers/media/pci/intel/ipu6/../cio2-bridge.o] Error 1
ipu6-drivers> make[4]: *** Waiting for unfinished jobs....
ipu6-drivers>   LD [M]  /build/source/mei-vsc.o
ipu6-drivers> make[3]: *** [/nix/store/jzhmim38g62p5ji45fnmm7vk45in5nig-linux-6.3.1-dev/lib/modules/6.3.1/source/scripts/Makefile.build:494: /build/source/drivers/media/pci/intel/ipu6] Error 2
ipu6-drivers> make[2]: *** [/nix/store/jzhmim38g62p5ji45fnmm7vk45in5nig-linux-6.3.1-dev/lib/modules/6.3.1/source/scripts/Makefile.build:494: /build/source/drivers/media/pci/intel] Error 2
ipu6-drivers> make[1]: *** [/nix/store/jzhmim38g62p5ji45fnmm7vk45in5nig-linux-6.3.1-dev/lib/modules/6.3.1/source/Makefile:2025: /build/source] Error 2
ipu6-drivers> make: *** [Makefile:71: all] Error 2

Affected by

commit 3dbdd92014a410778de8406e9e3253e353f51c2b
Author: Andy Shevchenko <[email protected]>
Date:   Wed Dec 28 11:49:22 2022 +0200

    software node: Remove unused APIs
    
    There are no more users of software_node_register_nodes() and
    software_node_unregister_nodes(). Remove them.
    
    Signed-off-by: Andy Shevchenko <[email protected]>
    Acked-by: Greg Kroah-Hartman <[email protected]>
    Acked-by: Sakari Ailus <[email protected]>
    Tested-by: Daniel Scally <[email protected]>
    Acked-by: Heikki Krogerus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

media-i2c-Enable-hi556-with-iVSC.patch fails

root@vm:~/linux-6.0-rc4# patch -p1 < patch/media-i2c-Enable-hi556-with-iVSC.patch 
patching file drivers/media/i2c/hi556.c
Hunk #3 succeeded at 677 (offset 3 lines).
Hunk #4 succeeded at 704 (offset 3 lines).
Hunk #5 succeeded at 742 (offset 3 lines).
Hunk #6 succeeded at 805 with fuzz 2 (offset 28 lines).
Hunk #7 succeeded at 873 (offset 32 lines).
Hunk #8 FAILED at 1159.
Hunk #9 FAILED at 1204.
Hunk #10 succeeded at 1236 (offset 19 lines).
2 out of 10 hunks FAILED -- saving rejects to file drivers/media/i2c/hi556.c.rej

Add support for OV8856 sensor

In Dell Latitude 7320 Detachable (with Tiger Lake processor) the rear camera is an OV8856 sensor. For this sensor the official Linux kernel already contains an i2c driver (see https://github.com/torvalds/linux/blob/master/drivers/media/i2c/ov8856.c) but this driver does not work together with this IPU6 driver, does it?

Help would be very appreciated. I am a C/C++ software developer myself but with no knowledge about Linux kernel development. So what would have to be done in order to make this work?

Thank you,
Marcus

Update jsl to kernel 6.0 or higher

The jsl_penguin_peak branch has not been worked on since Aug 2022 and last tested on kernel 5.10, which is very old now.

Any chance of updating it to kernel 6.0 or higher?

`dkms autoinstall` fails (6.1.7 kernel)

I followed the instructions from the README section 3. I copied the dkms.conf aswell.

Here is a log:

$ uname -r
6.1.7-1-MANJARO

$ sudo dkms autoinstall ipu6-drivers/0.0.0

Sign command: /usr/lib/modules/6.1.7-1-MANJARO/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module:
Cleaning build area...(bad exit status: 2)
make -j16 KERNELRELEASE=6.1.7-1-MANJARO KERNELRELEASE=6.1.7-1-MANJARO KERNEL_SRC=/usr/lib/modules/6.1.7-1-MANJARO/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.7-1-MANJARO (x86_64)
Consult /var/lib/dkms/ipu6-drivers/0.0.0/build/make.log for more information.
Sign command: /usr/lib/modules/6.1.7-1-MANJARO/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module:
Cleaning build area...(bad exit status: 2)
make -j16 KERNELRELEASE=6.1.7-1-MANJARO KERNELRELEASE=6.1.7-1-MANJARO KERNEL_SRC=/usr/lib/modules/6.1.7-1-MANJARO/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.7-1-MANJARO (x86_64)
Consult /var/lib/dkms/ivsc-driver/1.0.0/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.

Here is the log for the make.log file:

DKMS make.log for ivsc-driver-1.0.0 for kernel 6.1.7-1-MANJARO (x86_64)
Mon 30 Jan 2023 17:55:52 CET
make: *** No targets specified and no makefile found.  Stop.

I have the linux61-headers package from the AUR installed. Anything else I require?

ipu-psys: MODULE_IMPORT_NS(DMA_BUF) for kernel 5.15

For kernel 5.15.49 i have modpost failure for ipu-psys:

ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_detach from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_vunmap from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_fd from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_get from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_unmap_attachment from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_map_attachment from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_export from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_attach from namespace DMA_BUF, but does not import it.
ERROR: modpost: module intel-ipu6-psys uses symbol dma_buf_vmap from namespace DMA_BUF, but does not import it.

resolution:
for drivers/media/pci/intel/ipu-psys.c:

MODULE_DESCRIPTION("Intel ipu processing system driver");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
MODULE_IMPORT_NS(DMA_BUF);
#endif

P.S. i'm not sure from which kernel version this should be done

Doesn't work with CONFIG_X86_KERNEL_IBT=y (missing ENDBR)

Got the following error while booting Arch Linux kernel version 6.1.x and camera doesn't work, laptop doesn't power down after shutdown and freezes during suspend.
When I boot with ibt=warn the warning is thrown a few times until eventually the sensor registration completes and camera works (shutdown and suspend seem to work properly too).

Jan 10 11:08:15 kernel: traps: Missing ENDBR: kallsyms_lookup_name+0x4/0xf0
Jan 10 11:08:15 kernel: ------------[ cut here ]------------
Jan 10 11:08:15 kernel: WARNING: CPU: 8 PID: 467 at arch/x86/kernel/traps.c:252 kallsyms_lookup_name+0x4/0xf0
Jan 10 11:08:15 kernel: Modules linked in: mei_hdcp spi_ljca(OE) i2c_ljca(OE+) gpio_ljca(OE) dell_laptop intel_rapl_msr intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass rapl intel_cstate intel_uncore pcspkr psmouse dell_wmi_sysman firmware_attributes_class dell_wmi dell_smbios dcdbas ledtrig_audio dell_wmi_descriptor wmi_bmof snd_hda_codec_hdmi snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_bus snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec iwlmvm snd_hda_core snd_hwdep mac80211 snd_pcm libarc4 spi_nor i2c_i801 snd_timer mtd i2c_smbus snd soundcore btusb iwlwifi btrtl btbcm intel_lpss_pci mei_me btintel intel_lpss btmtk cfg80211 idma64 ljca(OE) intel_ipu6_isys(OE) bluetooth
Jan 10 11:08:15 kernel:  videobuf2_dma_contig processor_thermal_device_pci videobuf2_memops ecdh_generic processor_thermal_device videobuf2_v4l2 rfkill crc16 videobuf2_common processor_thermal_rfim processor_thermal_mbox intel_ish_ipc intel_ipu6_psys(OE) processor_thermal_rapl intel_ishtp thunderbolt intel_ipu6(OE) intel_rapl_common ucsi_acpi typec_ucsi typec igen6_edac roles i2c_hid_acpi i2c_hid mei_vsc(OE) int3403_thermal int340x_thermal_zone ov01a10(OE) mei_csi(OE) mei_ace(OE) mei intel_vsc(OE) v4l2_fwnode v4l2_async intel_skl_int3472_tps68470 tps68470_regulator clk_tps68470 intel_hid intel_skl_int3472_discrete sparse_keymap int3400_thermal acpi_thermal_rel acpi_tad acpi_pad vfat fat mac_hid vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) v4l2loopback(OE) videodev mc dm_multipath sg crypto_user nfsd auth_rpcgss nfs_acl lockd grace sunrpc fuse ip_tables x_tables btrfs blake2b_generic libcrc32c crc32c_generic xor raid6_pq dm_crypt cbc encrypted_keys trusted asn1_encoder tee usbhid dm_mod
Jan 10 11:08:15 kernel:  crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni serio_raw polyval_generic gf128mul atkbd ghash_clmulni_intel nvme libps2 vivaldi_fmap sha512_ssse3 aesni_intel nvme_core spi_intel_pci crypto_simd i8042 xhci_pci cryptd spi_intel nvme_common xhci_pci_renesas serio i915 drm_buddy intel_gtt video wmi drm_display_helper cec ttm
Jan 10 11:08:15 kernel: CPU: 8 PID: 467 Comm: systemd-udevd Tainted: G           OE      6.1.4-arch1-1 #1 b56a0be67d6a5f69f99015da4a908cae98ee5acc
Jan 10 11:08:15 kernel: Hardware name: Dell Inc. XPS 9315/00KRKP, BIOS 1.6.1 11/22/2022
Jan 10 11:08:15 kernel: RIP: 0010:kallsyms_lookup_name+0x4/0xf0
Jan 10 11:08:15 kernel: Code: 0b 00 48 8b 54 24 28 65 48 2b 14 25 28 00 00 00 75 0e 48 83 c4 30 5b c3 cc cc cc cc 31 c0 eb e2 e8 61 0c ab 00 90 66 0f 1f 00 <0f> 1f 44 00 00 41 56 b9 40 00 00 00 41 55 49 89 fd 41 54 55 53 48
Jan 10 11:08:15 kernel: RSP: 0018:ffffa85e00ed7618 EFLAGS: 00010246
Jan 10 11:08:15 kernel: RAX: ffffa85e00ed7630 RBX: 0000000000000000 RCX: 0000000000000002
Jan 10 11:08:15 kernel: RDX: 0000000000000001 RSI: 0000000055555554 RDI: ffffffffc14540b1
Jan 10 11:08:15 kernel: RBP: ffffa85e00ed76d0 R08: 0000000000032790 R09: 0000000000000000
Jan 10 11:08:15 kernel: R10: 0000000000000008 R11: 0000000000000000 R12: ffffa85e00ed7620
Jan 10 11:08:15 kernel: R13: ffffffff89d6fc34 R14: ffff8a630d885800 R15: ffff8a6301f61030
Jan 10 11:08:15 kernel: FS:  00007f4a85645080(0000) GS:ffff8a6a6f800000(0000) knlGS:0000000000000000
Jan 10 11:08:15 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan 10 11:08:15 kernel: CR2: 000055c092bd1000 CR3: 0000000109eb0004 CR4: 0000000000f70ee0
Jan 10 11:08:15 kernel: PKRU: 55555554
Jan 10 11:08:15 kernel: Call Trace:
Jan 10 11:08:15 kernel:  <TASK>
Jan 10 11:08:15 kernel:  init_vsc_symbols+0x68/0xb0 [ov01a10 4e3dfa54a67381019516620897f0731b3644f571]
Jan 10 11:08:15 kernel:  ? kallsyms_lookup_name+0x4/0xf0
Jan 10 11:08:15 kernel:  ov01a10_probe+0x57/0x470 [ov01a10 4e3dfa54a67381019516620897f0731b3644f571]
Jan 10 11:08:15 kernel:  ? devres_open_group+0x45/0x100
Jan 10 11:08:15 kernel:  ? i2c_device_probe+0x135/0x330
Jan 10 11:08:15 kernel:  i2c_device_probe+0x135/0x330
Jan 10 11:08:15 kernel:  really_probe+0xdb/0x380
Jan 10 11:08:15 kernel:  ? pm_runtime_barrier+0x54/0x90
Jan 10 11:08:15 kernel:  __driver_probe_device+0x78/0x170
Jan 10 11:08:15 kernel:  driver_probe_device+0x1f/0x90
Jan 10 11:08:15 kernel:  __device_attach_driver+0x89/0x110
Jan 10 11:08:15 kernel:  ? driver_allows_async_probing+0x70/0x70
Jan 10 11:08:15 kernel:  bus_for_each_drv+0x8c/0xe0
Jan 10 11:08:15 kernel:  __device_attach+0xb2/0x1e0
Jan 10 11:08:15 kernel:  bus_probe_device+0x92/0xb0
Jan 10 11:08:15 kernel:  device_add+0x422/0x9a0
Jan 10 11:08:15 kernel:  i2c_new_client_device+0x197/0x2c0
Jan 10 11:08:15 kernel:  i2c_acpi_add_device+0x94/0xb0
Jan 10 11:08:15 kernel:  acpi_ns_walk_namespace+0x16d/0x2db
Jan 10 11:08:15 kernel:  ? i2c_acpi_resource_count+0x30/0x30
Jan 10 11:08:15 kernel:  ? i2c_acpi_resource_count+0x30/0x30
Jan 10 11:08:15 kernel:  acpi_walk_namespace+0xf5/0x141
Jan 10 11:08:15 kernel:  i2c_acpi_register_devices+0x48/0x80
Jan 10 11:08:15 kernel:  i2c_register_adapter+0x225/0x6a0
Jan 10 11:08:15 kernel:  ljca_i2c_probe+0x1fe/0x270 [i2c_ljca 0b3b7c670dc09a589f6bdd3732ba788e08199e00]
Jan 10 11:08:15 kernel:  platform_probe+0x45/0x90
Jan 10 11:08:15 kernel:  really_probe+0xdb/0x380
Jan 10 11:08:15 kernel:  ? pm_runtime_barrier+0x54/0x90
Jan 10 11:08:15 kernel:  __driver_probe_device+0x78/0x170
Jan 10 11:08:15 kernel:  driver_probe_device+0x1f/0x90
Jan 10 11:08:15 kernel:  __driver_attach+0xd2/0x1c0
Jan 10 11:08:15 kernel:  ? __device_attach_driver+0x110/0x110
Jan 10 11:08:15 kernel:  bus_for_each_dev+0x88/0xd0
Jan 10 11:08:15 kernel:  bus_add_driver+0x1b2/0x200
Jan 10 11:08:15 kernel:  driver_register+0x8d/0xe0
Jan 10 11:08:15 kernel:  ? 0xffffffffc062b000
Jan 10 11:08:15 kernel:  do_one_initcall+0x5a/0x220
Jan 10 11:08:15 kernel:  do_init_module+0x4a/0x1e0
Jan 10 11:08:15 kernel:  __do_sys_init_module+0x17f/0x1b0
Jan 10 11:08:15 kernel:  do_syscall_64+0x5c/0x90
Jan 10 11:08:15 kernel:  ? syscall_exit_to_user_mode+0x1b/0x40
Jan 10 11:08:15 kernel:  ? do_syscall_64+0x6b/0x90
Jan 10 11:08:15 kernel:  ? do_user_addr_fault+0x1e0/0x6a0
Jan 10 11:08:15 kernel:  ? syscall_exit_to_user_mode+0x1b/0x40
Jan 10 11:08:15 kernel:  ? exc_page_fault+0x74/0x170
Jan 10 11:08:15 kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
Jan 10 11:08:15 kernel: RIP: 0033:0x7f4a86121eae
Jan 10 11:08:15 kernel: Code: 48 8b 0d dd ee 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d aa ee 0c 00 f7 d8 64 89 01 48
Jan 10 11:08:15 kernel: RSP: 002b:00007ffc314f9048 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
Jan 10 11:08:15 kernel: RAX: ffffffffffffffda RBX: 000055c092b497c0 RCX: 00007f4a86121eae
Jan 10 11:08:15 kernel: RDX: 00007f4a86608343 RSI: 000000000000505d RDI: 000055c092bb2800
Jan 10 11:08:15 kernel: RBP: 00007f4a86608343 R08: 27d4eb2f165667c5 R09: 85ebca77c2b2ae63
Jan 10 11:08:15 kernel: R10: 00000000000035f1 R11: 0000000000000246 R12: 0000000000020000
Jan 10 11:08:15 kernel: R13: 000055c092b43d90 R14: 000055c092b497c0 R15: 000055c092aa93e0
Jan 10 11:08:15 kernel:  </TASK>
Jan 10 11:08:15 kernel: ---[ end trace 0000000000000000 ]---

V4L2 device fails buffer ioctls

This driver does manage to create a V4L2 video driver under /dev/video0 on my system, however it cannot be opened with GStreamer (works with icamerasrc though) due to a failure to allocate the buffer, making it de facto unusable on regular webcam clients.

Relevant output from v4l2-compliance:

v4l2-compliance 1.22.1, 64 bits, 64-bit time_t

Compliance test for intel-ipu6-isys device /dev/video0:

Driver Info:
	Driver name      : intel-ipu6-isys
	Card type        : ipu6
	Bus info         : PCI:pci:pci0000:00
	Driver version   : 5.19.2
	Capabilities     : 0x84201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : intel-ipu6-isys
	Model            : ipu6
	Serial           : 
	Bus info         : pci:pci0000:00
	Media version    : 5.19.2
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.19.2
Interface Info:
	ID               : 0x0300001e
	Type             : V4L Video
Entity Info:
	ID               : 0x0000001c (28)
	Name             : Intel IPU6 BE SOC capture 0
	Function         : V4L2 I/O
	Pad 0x0100001d   : 0: Sink, Must Connect
	 Link 0x02000020: from remote pad 0x100001b of entity 'Intel IPU6 CSI2 BE SOC 0' (Video Interface Bridge): Data, Enabled, Dynamic

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
		warn: v4l2-compliance.cpp(642): media bus_info 'pci:pci0000:00' differs from V4L2 bus_info 'PCI:pci:pci0000:00'
	test VIDIOC_QUERYCAP: OK
		fail: v4l2-compliance.cpp(783): doioctl(node, ioc, nullptr) != ENOTTY
	test invalid ioctls: FAIL

Allow for multiple opens:
	test second /dev/video0 open: OK
		warn: v4l2-compliance.cpp(642): media bus_info 'pci:pci0000:00' differs from V4L2 bus_info 'PCI:pci:pci0000:00'
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
		fail: v4l2-test-controls.cpp(872): subscribe event for control 'User Controls' failed
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 1 Private Controls: 1

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK (Not Supported)
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
	test Scaling: OK

Codec ioctls (Input 0):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
		fail: v4l2-test-buffers.cpp(751): q.create_bufs(node, 1, &fmt) != EINVAL
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)

Total for intel-ipu6-isys device /dev/video0: 46, Succeeded: 43, Failed: 3, Warnings: 2

dkms complains about deprecated feature.

When using dkms:

$ sudo dkms add .
Deprecated feature: REMAKE_INITRD (/usr/src/ipu6-drivers/dkms.conf)
Deprecated feature: REMAKE_INITRD (/usr/src/ipu6-drivers-0.0.0/dkms.conf)
Creating symlink /var/lib/dkms/ipu6-drivers/0.0.0/source -> /usr/src/ipu6-drivers-0.0.0

dkms: 3.0.6

OS: Ubuntu 22.10

kernel: 5.19.0-21-generic

two xps 9320 laptops with identical software, one has working ov01a10, one fails

Hello,

due to touchpad issues my dell xps13 9320 is getting replaced by an identical one (the identical one could be a newer hardware revision, since the original one is from last august and the replacement from february). they both run the same os (ubuntu 2204) and firmware, but the old one has working webcam while the new one hasn't. the old laptop (with working webcam) will be shipped back to dell.

i was updating this issue intel/icamerasrc#26 but i'm moving it here as that repo seems to be dead.

the output is identical on the working and non-working xps13 plus. I still have the nonworking one for two weeks before dell picks it up, i'm going to do some more tests to find exactly what is different between the two:

  • both systems run ubuntu 22.04 with kernel 5.19.0-32-generic

this is the dmesg output for the working system:

[    4.958108] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[    4.958253] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[    4.958443] intel-ipu6 intel-ipu: physical base address 0x603c000000
[    4.958445] intel-ipu6 intel-ipu: mapped as: 0x000000005e4a6637
[    4.958549] intel-ipu6 intel-ipu: Unable to set secure mode
[    4.958551] intel-ipu6 intel-ipu: IPU in non-secure mode
[    4.958552] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[    4.958553] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[    4.958591] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[    4.958592] intel-ipu6 intel-ipu: IPC reset done
[    4.958593] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[    4.959949] intel-ipu6 intel-ipu: FW version: 20220510
[    4.962623] intel-ipu6 intel-ipu: IPU6-v3 driver version 1.0
[    5.006069] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[    5.006260] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   15.558343] intel-ipu6-isys intel-ipu6-isys0: bind ov01a10 17-0036 nlanes is 1 port is 2
[   15.558528] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.

this is the dmesg output for the non-working system:

[   70.816402] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[   70.816759] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[   70.816776] intel-ipu6 intel-ipu: physical base address 0x603c000000
[   70.816778] intel-ipu6 intel-ipu: mapped as: 0x00000000cb7fe56f
[   70.816820] intel-ipu6 intel-ipu: Unable to set secure mode
[   70.816822] intel-ipu6 intel-ipu: IPU in non-secure mode
[   70.816823] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[   70.816823] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[   70.816961] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[   70.816964] intel-ipu6 intel-ipu: IPC reset done
[   70.816966] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[   70.818655] intel-ipu6 intel-ipu: FW version: 20220510
[   70.822366] intel-ipu6 intel-ipu: IPU6-v3 driver version 1.0
[   70.863378] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   70.863485] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[ 1002.585603] intel-ipu6 intel-ipu: IPU in non-secure mode
[ 1002.585611] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[12336.171476] intel-ipu6 intel-ipu: IPU in non-secure mode
[12336.171483] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode

both have userspace 0git202302070245.a359c1eubuntu22.04.2 libcamhal-ipu6ep0
they both have the same kernel modules.
i verified the correct working of both cameras in windows to exclude hardware problems.

the dmesg on the non-working system doesn't name ov01a10, so maybe its a different camera (is there a way to figure this out?)

the userspace component logs this:

feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.88] CamHAL[INF] aiqb file name ov01a1s.aiqb
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.88] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.92] CamHAL[ERR] Get entity fail for calling getEntityById
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.92] CamHAL[ERR] Get entity fail for calling getEntityById
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.92] CamHAL[ERR] setup Link ov13b10  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.92] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.92] CamHAL[ERR] set up mediaCtl failed
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.92] CamHAL[ERR] @configure Device Configure failed
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:48.92] CamHAL[ERR] failed to config streams.
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[INF] aiqb file name ov13b10.aiqb
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[ERR] there is no aiqb file:ov13b10
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[INF] aiqb file name ov13b10.aiqb
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[ERR] there is no aiqb file:ov13b10
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[INF] aiqb file name ov8856.aiqb
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[ERR] there is no aiqb file:ov8856
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[INF] aiqb file name ov8856.aiqb
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[ERR] there is no aiqb file:ov8856
feb 21 11:25:57 rhea sh[1412]: [02-21 11:25:57.85] CamHAL[INF] aiqb file name ov01a10.aiqb

Fails to build on Intel Jasper Lake

I am currently running Kernel 5.19 (Debian) and I pulled the jsl_penguin_peak branch. I am not sure if the errors are related to my kernel or my board, but this is the error I am getting.

$ make -j8
make -C /lib/modules/5.19.0-1-amd64/build M=/home/mobian/ipu6-drivers modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-1-amd64'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-11 (Debian 11.3.0-5) 11.3.0
  You are using:           gcc-11 (Debian 11.3.0-6) 11.3.0
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.o
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu.o
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-bus.o
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-dma.o
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-mmu.o
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-buttress.o
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-trace.o
  CC [M]  /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-cpd.o
/home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-bus.c:137:19: error: initialization of ‘void (*)(struct device *)’ from incompatible pointer type ‘int (*)(struct device *)’ [-Werror=incompatible-pointer-types]
  137 |         .remove = ipu_bus_remove,
      |                   ^~~~~~~~~~~~~~
/home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-bus.c:137:19: note: (near initialization for ‘ipu_bus.remove’)
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-5.19.0-1-common/scripts/Makefile.build:254: /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-bus.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from /usr/src/linux-headers-5.19.0-1-common/include/media/v4l2-device.h:13,
                 from /home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:9:
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c: In function ‘ov13858_open’:
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1383:75: error: ‘struct v4l2_subdev_fh’ has no member named ‘pad’
 1383 |                                                                         fh->pad,
      |                                                                           ^~
/usr/src/linux-headers-5.19.0-1-common/include/media/v4l2-subdev.h:1095:40: note: in definition of macro ‘v4l2_subdev_get_try_format’
 1095 |         v4l2_subdev_get_pad_format(sd, state, pad)
      |                                        ^~~~~
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c: In function ‘ov13858_do_get_pad_format’:
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1565:59: error: passing argument 2 of ‘v4l2_subdev_get_pad_format’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 1565 |                 framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
      |                                                           ^~~
      |                                                           |
      |                                                           struct v4l2_subdev_pad_config *
/usr/src/linux-headers-5.19.0-1-common/include/media/v4l2-subdev.h:1095:40: note: in definition of macro ‘v4l2_subdev_get_try_format’
 1095 |         v4l2_subdev_get_pad_format(sd, state, pad)
      |                                        ^~~~~
/usr/src/linux-headers-5.19.0-1-common/include/media/v4l2-subdev.h:1046:54: note: expected ‘struct v4l2_subdev_state *’ but argument is of type ‘struct v4l2_subdev_pad_config *’
 1046 |                            struct v4l2_subdev_state *state,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c: In function ‘ov13858_set_pad_format’:
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1614:59: error: passing argument 2 of ‘v4l2_subdev_get_pad_format’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 1614 |                 framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
      |                                                           ^~~
      |                                                           |
      |                                                           struct v4l2_subdev_pad_config *
/usr/src/linux-headers-5.19.0-1-common/include/media/v4l2-subdev.h:1095:40: note: in definition of macro ‘v4l2_subdev_get_try_format’
 1095 |         v4l2_subdev_get_pad_format(sd, state, pad)
      |                                        ^~~~~
/usr/src/linux-headers-5.19.0-1-common/include/media/v4l2-subdev.h:1046:54: note: expected ‘struct v4l2_subdev_state *’ but argument is of type ‘struct v4l2_subdev_pad_config *’
 1046 |                            struct v4l2_subdev_state *state,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c: At top level:
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1805:27: error: initialization of ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_mbus_code_enum *)’ from incompatible pointer type ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)’ [-Werror=incompatible-pointer-types]
 1805 |         .enum_mbus_code = ov13858_enum_mbus_code,
      |                           ^~~~~~~~~~~~~~~~~~~~~~
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1805:27: note: (near initialization for ‘ov13858_pad_ops.enum_mbus_code’)
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1806:20: error: initialization of ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_format *)’ from incompatible pointer type ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)’ [-Werror=incompatible-pointer-types]
 1806 |         .get_fmt = ov13858_get_pad_format,
      |                    ^~~~~~~~~~~~~~~~~~~~~~
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1806:20: note: (near initialization for ‘ov13858_pad_ops.get_fmt’)
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1807:20: error: initialization of ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_format *)’ from incompatible pointer type ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)’ [-Werror=incompatible-pointer-types]
 1807 |         .set_fmt = ov13858_set_pad_format,
      |                    ^~~~~~~~~~~~~~~~~~~~~~
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1807:20: note: (near initialization for ‘ov13858_pad_ops.set_fmt’)
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1808:28: error: initialization of ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_frame_size_enum *)’ from incompatible pointer type ‘int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_frame_size_enum *)’ [-Werror=incompatible-pointer-types]
 1808 |         .enum_frame_size = ov13858_enum_frame_size,
      |                            ^~~~~~~~~~~~~~~~~~~~~~~
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1808:28: note: (near initialization for ‘ov13858_pad_ops.enum_frame_size’)
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c: In function ‘ov13858_probe’:
/home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.c:1992:15: error: implicit declaration of function ‘v4l2_async_register_subdev_sensor_common’; did you mean ‘v4l2_async_register_subdev_sensor’? [-Werror=implicit-function-declaration]
 1992 |         ret = v4l2_async_register_subdev_sensor_common(&ov13858->sd);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |               v4l2_async_register_subdev_sensor
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.19.0-1-common/scripts/Makefile.build:254: /home/mobian/ipu6-drivers/drivers/media/i2c/ov13858_intel.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.19.0-1-common/scripts/Makefile.build:471: /home/mobian/ipu6-drivers/drivers/media/i2c] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: *** [/usr/src/linux-headers-5.19.0-1-common/scripts/Makefile.build:471: /home/mobian/ipu6-drivers/drivers/media/pci/intel/ipu6] Error 2
make[2]: *** [/usr/src/linux-headers-5.19.0-1-common/scripts/Makefile.build:471: /home/mobian/ipu6-drivers/drivers/media/pci/intel] Error 2
make[1]: *** [/usr/src/linux-headers-5.19.0-1-common/Makefile:1871: /home/mobian/ipu6-drivers] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-1-amd64'
make: *** [Makefile:17: all] Error 2

Kernel 6.0, ov01a10 cannot find sensor anymore

Dell XPS 9320

System was working with 5.18 kernel, but after updating kernel to 6.0 and update to newest git on ipu6-drivers and ivsc-driver today, ov01a10 cannot find the sensor anymore. I've applied IOMMU-passthrough-for-intel-ipu.diff and int3472-support-independent-clock-and-LED-gpios-5.17 to the kernel, but it made no difference (maybe because the sensor is not an OV01A1S?)

Tried both with power_ctrl_logic enabled and disabled in the ipu6-drivers build, but maybe that module cannot be loaded at the same time as intel_skl_int3472* ?

[   33.902599] vsc_ace spi-INTC1094:00-5db76cf6-0a68-4ed6-9b78-0361635e2447: recv firmware id
[   33.931912] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[   33.932043] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[   33.932088] intel-ipu6 intel-ipu: physical base address 0x603c000000
[   33.932089] intel-ipu6 intel-ipu: mapped as: 0x00000000b02d7b40
[   33.932135] intel-ipu6 intel-ipu: Unable to set secure mode
[   33.932136] intel-ipu6 intel-ipu: IPU in non-secure mode
[   33.932137] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[   33.932138] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[   33.932143] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[   33.932144] intel-ipu6 intel-ipu: IPC reset done
[   33.932145] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[   33.932147] Loading firmware: intel/ipu6ep_fw.bin
[   33.933156] intel-ipu6 intel-ipu: FW version: 20220510
[   33.933967] intel-ipu6 intel-ipu: IPU6-v3 driver version 1.0
[   34.019511] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   34.019757] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   34.022296] i2c i2c-12: i2c start failed len:-1 id:0 0
[   34.022299] ov01a10 i2c-OVTI01A0:00: failed to find sensor: -5
[   34.022382] ov01a10: probe of i2c-OVTI01A0:00 failed with error -5

CONFIG_INTEL_SKL_INT3472 vs. CONFIG_POWER_CTRL_LOGIC in Engineer release 2022-08-10

In https://github.com/intel/ipu6-drivers/blob/master/drivers/media/i2c/ov01a1s.c#L334:

#if IS_ENABLED(CONFIG_INTEL_SKL_INT3472)
...
#elif IS_ENABLED(CONFIG_POWER_CTRL_LOGIC)
...
#endif

This is going to shadow CONFIG_POWER_CTRL_LOGIC when CONFIG_INTEL_SKL_INT3472 is enabled, and actually the latter is always enabled by host kernel on recent (>= 5.14) Ubuntu kernels. So:

  1. Even one tries to comment-out the export CONFIG_INTEL_SKL_INT3472=m line in the Makefile, it will still be enabled anyway as it's enabled by host kernel.
  2. And since CONFIG_INTEL_SKL_INT3472 is always enabled by host kernel, the preprocessor macros CONFIG_INTEL_SKL_INT3472 and CONFIG_INTEL_SKL_INT3472_MODULE will also be defined in host generated autoconf.h. The cflags appending in the Makefile is useless.
  3. As my experiments, The TGL/ov01a1s platforms still need CONFIG_POWER_CTRL_LOGIC to drive the gpio correctly. Are you sure CONFIG_INTEL_SKL_INT3472 can replace CONFIG_POWER_CTRL_LOGIC in this sensor? We need to keep backward compatibility as always.

Reloading module causes null pointer dereference

I get this error when I unload modules intel_ipu6_isys and ov2740, then run systemctl suspend and then try to modprobe intel_ipu6_isys back. Without suspend everything works fine and camera works properly after reloading.

I use Thinkpad X1 carbon gen10 archlinux with unpatched kernel 6.3.2. I tried both modules ov2740 from upstream and from git, for me looks like the problem is not with this module, also it loads successfully after suspend.

[   69.464042] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[   69.464303] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[   69.464304] intel-ipu6 0000:00:05.0: mapped as: 0x00000000d42aec21
[   69.464476] intel-ipu6 0000:00:05.0: IPU in secure mode
[   69.464479] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[   69.464480] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[   69.482137] intel-ipu6 0000:00:05.0: IPC reset done
[   69.482139] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[   69.482268] intel-ipu6 0000:00:05.0: FW version: 20220510
[   69.483388] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[   69.500718] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[   69.574270] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[   69.574475] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[   69.601778] BUG: kernel NULL pointer dereference, address: 0000000000000000
[   69.601790] #PF: supervisor read access in kernel mode
[   69.601794] #PF: error_code(0x0000) - not-present page
[   69.601798] PGD 0 P4D 0 
[   69.601804] Oops: 0000 [#1] PREEMPT SMP NOPTI
[   69.601809] CPU: 2 PID: 3540 Comm: modprobe Tainted: G           OE      6.3.2-arch1-1 #1 44a850778a68c42d012ba8e685997cb0375875a4
[   69.601817] Hardware name: LENOVO 21CBCTO1WW/21CBCTO1WW, BIOS N3AET71W (1.36 ) 01/31/2023
[   69.601820] RIP: 0010:software_node_graph_get_port_parent+0x3f/0xa0
[   69.601835] Code: ff ff 77 0a 48 81 7f 08 00 f7 98 af 74 76 31 ff 48 8b 9f c0 00 00 00 48 85 db 74 48 48 8b 83 80 00 00 00 48 c7 c6 a9 56 e1 af <48> 8b 38 e8 99 a4 43 00 85 c0 74 38 48 89 dd 48 83 c5 40 74 13 48
[   69.601840] RSP: 0018:ffffbc1604bc3a78 EFLAGS: 00010286
[   69.601845] RAX: 0000000000000000 RBX: ffff9b22524d9200 RCX: 0000000000000001  
[   69.601848] RDX: ffffffffaf98f700 RSI: ffffffffafe156a9 RDI: ffff9b22524d8f00  
[   69.601851] RBP: ffffbc1604bc3b70 R08: ffffbc1604bc3a48 R09: ffff9b2211b10dc0  
[   69.601854] R10: 0000000000007fc0 R11: 0000000000000000 R12: ffff9b2211b10dc0  
[   69.601856] R13: ffffbc1604bc3ae0 R14: ffff9b220125e0d0 R15: 0000000000000001  
[   69.601859] FS:  00007f0dd38af740(0000) GS:ffff9b293f680000(0000) knlGS:0000000000000000  
[   69.601863] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033  
[   69.601867] CR2: 0000000000000000 CR3: 0000000134bf2003 CR4: 0000000000f70ee0  
[   69.601870] PKRU: 55555554  
[   69.601872] Call Trace:  
[   69.601877]  <TASK>  
[   69.601885]  fwnode_graph_get_port_parent+0x65/0xb0  
[   69.601891]  fwnode_graph_get_remote_port_parent+0x41/0x90  
[   69.601900]  v4l2_async_nf_parse_fwnode_endpoints+0xc6/0x400 [v4l2_fwnode 68a4d5edbfa73aa24e2fa9bfdab746e4f4ca7150]  
[   69.601920]  ? __pfx_isys_fwnode_parse+0x10/0x10 [intel_ipu6_isys b2ac461bc4905946734b69f7aa04c6de574037d6]  
[   69.601955]  isys_probe+0x718/0x950 [intel_ipu6_isys b2ac461bc4905946734b69f7aa04c6de574037d6]  
[   69.601980]  ipu_bus_probe+0x5c/0xf0 [intel_ipu6 8c5c0d34bb10b7f96d25c019badb8903d2e64677]  
[   69.602004]  really_probe+0x19b/0x3e0  
[   69.602015]  ? __pfx___driver_attach+0x10/0x10  
[   69.602023]  __driver_probe_device+0x78/0x160  
[   69.602031]  driver_probe_device+0x1f/0x90  
[   69.602038]  __driver_attach+0xd2/0x1c0  
[   69.602046]  bus_for_each_dev+0x85/0xd0  
[   69.602053]  bus_add_driver+0x116/0x220  
[   69.602060]  driver_register+0x59/0x100  
[   69.602068]  ? __pfx_init_module+0x10/0x10 [intel_ipu6_isys b2ac461bc4905946734b69f7aa04c6de574037d6]  
[   69.602090]  do_one_initcall+0x5a/0x240  
[   69.602102]  do_init_module+0x4a/0x200  
[   69.602111]  __do_sys_init_module+0x17f/0x1b0  
[   69.602118]  ? __vm_munmap+0xbc/0x150  
[   69.602130]  do_syscall_64+0x5d/0x90
[   69.602141]  ? do_syscall_64+0x6c/0x90
[   69.602147]  ? ksys_read+0x6f/0xf0
[   69.602153]  ? syscall_exit_to_user_mode+0x1b/0x40
[   69.602158]  ? do_syscall_64+0x6c/0x90
[   69.602164]  ? exc_page_fault+0x7c/0x180
[   69.602172]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[   69.602180] RIP: 0033:0x7f0dd3321f9e
[   69.602264] Code: 48 8b 0d bd ed 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 8a ed 0c 00 f7 d8 64 89 01 48
[   69.602267] RSP: 002b:00007fff60940bd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[   69.602272] RAX: ffffffffffffffda RBX: 000055dfb4adb0d0 RCX: 00007f0dd3321f9e
[   69.602275] RDX: 000055dfb334bcb2 RSI: 000000000006b03d RDI: 00007f0dd2c5f010
[   69.602278] RBP: 000055dfb334bcb2 R08: 000000000008c000 R09: 0000000000000000
[   69.602281] R10: 0000000000037711 R11: 0000000000000246 R12: 0000000000040000
[   69.602283] R13: 000055dfb4adae80 R14: 0000000000000000 R15: 000055dfb4aded60
[   69.602288]  </TASK>
[   69.602290] Modules linked in: intel_ipu6_isys(OE+) intel_ipu6(OE) ov2740(OE) v4l2_fwnode v4l2_async rfcomm ccm cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel btmtk bluetooth gpio_ljca(OE) spi_ljca(OE) i2c_ljca(OE
) ljca(OE) ecdh_generic hid_sensor_custom_intel_hinge hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio hid_sensor_custom hid_sensor_hub intel_ishtp_hid snd_ctl_led snd_soc_skl_hda_dsp snd_soc_i
ntel_hda_dsp_common snd_sof_probes snd_soc_hdac_hdmi snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_soc_dmic snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence
 snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_bus snd_soc_core intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp snd_compres
s coretemp ac97_bus joydev iwlmvm snd_pcm_dmaengine kvm_intel mousedev kvm
[   69.602382]  snd_hda_intel irqbypass mac80211 snd_intel_dspcfg videobuf2_dma_contig snd_intel_sdw_acpi pmt_telemetry rapl iTCO_wdt vfat videobuf2_memops hid_multitouch intel_pmc_bxt squashfs processor_thermal_device_pci intel_cstate vi
deobuf2_v4l2 fat mei_hdcp mei_pxp mei_wdt libarc4 iTCO_vendor_support intel_rapl_msr pmt_class snd_hda_codec processor_thermal_device think_lmi nxp_nci_i2c videobuf2_common intel_uncore processor_thermal_rfim snd_hda_core psmouse pcspkr f
irmware_attributes_class wmi_bmof iwlwifi nxp_nci thinkpad_acpi ucsi_acpi processor_thermal_mbox snd_hwdep snd_pcm typec_ucsi spi_nor ledtrig_audio processor_thermal_rapl nci intel_lpss_pci snd_timer mei_me cfg80211 mei_vsc(OE) intel_ish_
ipc i2c_hid_acpi nfc platform_profile intel_lpss typec i2c_i801 intel_rapl_common int3403_thermal snd mtd intel_skl_int3472_tps68470 i2c_smbus thunderbolt idma64 intel_ishtp intel_vsec igen6_edac roles mei rfkill soundcore soc_button_arra
y i2c_hid int340x_thermal_zone tps68470_regulator clk_tps68470 int3400_thermal
[   69.602486]  acpi_thermal_rel videodev intel_hid intel_skl_int3472_discrete acpi_pad mc acpi_tad sparse_keymap mac_hid vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) dm_multipath sg crypto_user fuse loop ip_tables x_tables ext4 crc32c_gener
ic crc16 mbcache jbd2 dm_crypt cbc encrypted_keys trusted asn1_encoder tee dm_mod crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic serio_raw gf128mul nvme atkbd ghash_clmulni_intel libps2 sha512_ssse3 aesni_intel
 vivaldi_fmap spi_intel_pci nvme_core i8042 xhci_pci crypto_simd cryptd spi_intel nvme_common xhci_pci_renesas serio i915 i2c_algo_bit drm_buddy intel_gtt video wmi drm_display_helper cec ttm
[   69.602568] Unloaded tainted modules: ov2740(OE):1 intel_ipu6(OE):1 intel_ipu6_psys(OE):1 intel_ipu6_isys(OE):1 [last unloaded: v4l2_async]
[   69.602584] CR2: 0000000000000000
[   69.602588] ---[ end trace 0000000000000000 ]---
[   69.602591] RIP: 0010:software_node_graph_get_port_parent+0x3f/0xa0
[   69.602598] Code: ff ff 77 0a 48 81 7f 08 00 f7 98 af 74 76 31 ff 48 8b 9f c0 00 00 00 48 85 db 74 48 48 8b 83 80 00 00 00 48 c7 c6 a9 56 e1 af <48> 8b 38 e8 99 a4 43 00 85 c0 74 38 48 89 dd 48 83 c5 40 74 13 48
[   69.602602] RSP: 0018:ffffbc1604bc3a78 EFLAGS: 00010286
[   69.602605] RAX: 0000000000000000 RBX: ffff9b22524d9200 RCX: 0000000000000001
[   69.602608] RDX: ffffffffaf98f700 RSI: ffffffffafe156a9 RDI: ffff9b22524d8f00
[   69.602611] RBP: ffffbc1604bc3b70 R08: ffffbc1604bc3a48 R09: ffff9b2211b10dc0
[   69.602614] R10: 0000000000007fc0 R11: 0000000000000000 R12: ffff9b2211b10dc0
[   69.602616] R13: ffffbc1604bc3ae0 R14: ffff9b220125e0d0 R15: 0000000000000001
[   69.602619] FS:  00007f0dd38af740(0000) GS:ffff9b293f680000(0000) knlGS:0000000000000000
[   69.602622] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   69.602625] CR2: 0000000000000000 CR3: 0000000134bf2003 CR4: 0000000000f70ee0
[   69.602628] PKRU: 55555554
[   69.602630] note: modprobe[3540] exited with irqs disabled

Is `dkms add .` still possible?

When following the instructions to build with dkms I receive an error message:

$ sudo dkms add .

Error! Arguments <module> and <module-version> are not specified.
Usage: add <module>/<module-version> or
       add -m <module>/<module-version> or
       add -m <module> -v <module-version>

Additional info:

$ dkms --version
dkms-3.0.10

What do I need to put as <module> and <module-version>?

Please upstream modules into mainline kernel

I recently discovered that my ThinkPad X1 Carbon needs an out-of-tree driver (this one) for my camera. That seems atypical for Intel hardware, which is typically well supported upstream.

I've tried with both Debian sid's 5.18.0-2-amd64 and Ubuntu jammy's 5.15, but the driver is included in neither distro, probably because it isn't upstream. Since this hardware is considered important for most people who use an Alder Lake laptop, could you consider upstreaming this driver (and any dependent pieces) into the mainline kernel relatively soon, even if only in the staging area?

I did try to build this myself with DKMS, but due to #13 (both the missing header and then the modpost error), it's not possible to do so, so there is presently no way to make this hardware work on Debian.

driver failed to load because of unsigned firmware

I am getting

[ 23.390968] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[ 23.391133] intel-ipu6 0000:00:05.0: Device 0x9a19 (rev: 0x1)
[ 23.391205] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 23.391206] intel-ipu6 0000:00:05.0: mapped as: 0x0000000028e0d23b
[ 23.391351] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 23.391354] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 23.391356] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 23.406513] intel-ipu6 0000:00:05.0: IPC reset done
[ 23.406520] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6_fw.bin
[ 23.406568] intel-ipu6 0000:00:05.0: Direct firmware load for intel/ipu6_fw.bin failed with error -2
[ 23.406571] intel-ipu6 0000:00:05.0: Requesting signed firmware failed
[ 23.406573] intel-ipu6: probe of 0000:00:05.0 failed with error -2

When booting up my system, where are you supposed to get the firmware?

Compiler error (build outside kernel source tree)

Hello there,
I'm trying to build the drives and get the following error on gcc-11,gcc-9,gcc-8:

/home/sylv/Repo/github/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:396:17: error: initialization of ‘int (*)(struct dma_buf *, struct dma_buf_map *)’ from incompatible pointer type ‘void * (*)(struct dma_buf *)’ [-Werror=incompatible-pointer-types]
  396 |         .vmap = ipu_dma_buf_vmap,
      |                 ^~~~~~~~~~~~~~~~
/home/sylv/Repo/github/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:396:17: note: (near initialization for ‘ipu_dma_buf_ops.vmap’)
/home/sylv/Repo/github/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:397:19: error: initialization of ‘void (*)(struct dma_buf *, struct dma_buf_map *)’ from incompatible pointer type ‘void (*)(struct dma_buf *, void *)’ [-Werror=incompatible-pointer-types]
  397 |         .vunmap = ipu_dma_buf_vunmap,
      |                   ^~~~~~~~~~~~~~~~~~
/home/sylv/Repo/github/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:397:19: note: (near initialization for ‘ipu_dma_buf_ops.vunmap’)
/home/sylv/Repo/github/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function ‘ipu_psys_mapbuf_locked’:
/home/sylv/Repo/github/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:638:23: error: too few arguments to function ‘dma_buf_vmap’
  638 |         kbuf->kaddr = dma_buf_vmap(kbuf->dbuf);
      |                       ^~~~~~~~~~~~
In file included from /home/sylv/Repo/github/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:7:
./include/linux/dma-buf.h:507:5: note: declared here
  507 | int dma_buf_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map);
      |     ^~~~~~~~~~~~
cc1: some warnings being treated as errors

After adding subdir-ccflags-y += -Wno-error=incompatible-pointer-types ( subdir-ccflags-y += $(call cc-disable-warning, incompatible-pointe-pointer-types) did not work), I get following error:

/home/ubuntu/Repo/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:397:12: note: (near initialization for ‘ipu_dma_buf_ops.vunmap’)
/home/ubuntu/Repo/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function ‘ipu_psys_mapbuf_locked’:
/home/ubuntu/Repo/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:638:16: error: too few arguments to function ‘dma_buf_vmap’
  kbuf->kaddr = dma_buf_vmap(kbuf->dbuf);
                ^~~~~~~~~~~~
In file included from /home/ubuntu/Repo/ipu6-drivers/drivers/media/pci/intel/ipu6/../ipu-psys.c:7:
./include/linux/dma-buf.h:507:5: note: declared here
 int dma_buf_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map);

Is there anything I need to consider or is the master currently broken?

Error when loading intel-ipu6 module

I am running 5.19.12-1-default on OpenSUSE Tumbleweed. My hardware is LENOVO 21CBCTO1WW/21CBCTO1WW, BIOS N3AET65W (1.30). I got an error when loading intel-ipu6 module (commit from 20220926) during boot:

Edit: Still the same problem with kernel 6.0.0 and the commit from 20221009

[    6.746457] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[    6.748265] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x4)
[    6.748301] intel-ipu6 intel-ipu: physical base address 0x603c000000
[    6.748305] intel-ipu6 intel-ipu: mapped as: 0x00000000496d1881
[    6.748422] intel-ipu6 intel-ipu: IPU in secure mode
[    6.748426] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[    6.748428] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[    6.754013] proc_thermal_pci 0000:00:04.0: enabling device (0000 -> 0002)
[    6.759019] intel_rapl_common: Found RAPL domain package
[    6.762885] intel-ipu6 intel-ipu: IPC reset done
[    6.762891] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[    6.763627] intel-ipu6 intel-ipu: FW version: 20220510
[    6.763955] BUG: kernel NULL pointer dereference, address: 0000000000000304
[    6.763962] #PF: supervisor read access in kernel mode
[    6.763966] #PF: error_code(0x0000) - not-present page
[    6.763969] PGD 0 P4D 0 
[    6.763975] Oops: 0000 [#1] PREEMPT SMP NOPTI
[    6.763981] CPU: 5 PID: 665 Comm: systemd-udevd Tainted: G     U  W  OE     5.19.12-1-default #1 openSUSE Tumbleweed 665b142383228b747d71fcd0f7280693267f8cd7
[    6.763988] Hardware name: LENOVO 21CBCTO1WW/21CBCTO1WW, BIOS N3AET65W (1.30 ) 08/02/2022
[    6.763991] RIP: 0010:ipu_pci_probe.cold+0x3f0/0x90e [intel_ipu6]
[    6.764023] Code: 48 89 fa 48 85 ff 0f 84 b8 00 00 00 48 8b bf 10 03 00 00 48 85 ff 0f 84 ba 00 00 00 e8 56 b6 ff ff 48 8b 43 18 48 85 c0 74 11 <48> 8b b8 10 03 00 00 48 85 ff 74 05 e8 3c b6 ff ff 48 8b 53 20 48
[    6.764028] RSP: 0018:ffffb71440747b58 EFLAGS: 00010282
[    6.764033] RAX: fffffffffffffff4 RBX: ffff88b6c6789828 RCX: 0000000000000000
[    6.764036] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[    6.764039] RBP: ffff88b9e81bb000 R08: ffffb71440747af0 R09: ffff88b6c3f425a0
[    6.764043] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88b9e81bb0d0
[    6.764046] R13: ffffb71445000000 R14: 00000000fffffff4 R15: ffffb71445000000
[    6.764049] FS:  00007f2330946b00(0000) GS:ffff88ba0f540000(0000) knlGS:0000000000000000
[    6.764054] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    6.764057] CR2: 0000000000000304 CR3: 000000010b3e4002 CR4: 0000000000770ee0
[    6.764062] PKRU: 55555554
[    6.764064] Call Trace:
[    6.764069]  <TASK>
[    6.764076]  local_pci_probe+0x3e/0x80
[    6.764087]  pci_device_probe+0xc3/0x230
[    6.764094]  really_probe+0x1bf/0x390
[    6.764101]  __driver_probe_device+0xff/0x170
[    6.764106]  driver_probe_device+0x1f/0x90
[    6.764111]  __driver_attach+0xcf/0x1d0
[    6.764116]  ? __device_attach_driver+0x110/0x110
[    6.764121]  bus_for_each_dev+0x73/0xc0
[    6.764126]  bus_add_driver+0x160/0x210
[    6.764131]  driver_register+0x89/0xe0
[    6.764136]  ? 0xffffffffc0f83000
[    6.764140]  ipu_init+0x3b/0x1000 [intel_ipu6 47b5614a0b9b9e937a29eb4630298c70c28ff96d]
[    6.764161]  do_one_initcall+0x41/0x200
[    6.764169]  ? kmem_cache_alloc_trace+0x177/0x360
[    6.764177]  do_init_module+0x4a/0x1f0
[    6.764185]  __do_sys_finit_module+0xac/0x120
[    6.764192]  do_syscall_64+0x58/0x80
[    6.764200]  ? do_syscall_64+0x67/0x80
[    6.764206]  ? exit_to_user_mode_prepare+0x190/0x1f0
[    6.764211]  ? syscall_exit_to_user_mode+0x17/0x40
[    6.764216]  ? do_syscall_64+0x67/0x80
[    6.764221]  ? syscall_exit_to_user_mode+0x17/0x40
[    6.764225]  ? do_syscall_64+0x67/0x80
[    6.764230]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[    6.764237] RIP: 0033:0x7f23313128fd
[    6.764241] Code: 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e3 74 0d 00 f7 d8 64 89 01 48
[    6.764245] RSP: 002b:00007fff1e93fa38 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[    6.764250] RAX: ffffffffffffffda RBX: 0000557837186240 RCX: 00007f23313128fd
[    6.764253] RDX: 0000000000000000 RSI: 00007f233187e05d RDI: 0000000000000006
[    6.764256] RBP: 00007f233187e05d R08: 0000000000000000 R09: 0000557836fb3cd0
[    6.764259] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000020000
[    6.764262] R13: 0000000000000000 R14: 000055783718af30 R15: 0000000000000000
[    6.764266]  </TASK>
[    6.764268] Modules linked in: processor_thermal_device_pci(+) processor_thermal_device processor_thermal_rfim processor_thermal_mbox processor_thermal_rapl fjes(-) acpi_cpufreq(-) intel_vsec pcc_cpufreq(-) intel_rapl_common intel_ipu6(OE+) i2c_dev igen6_edac thermal tiny_power_button button fan thinkpad_acpi ledtrig_audio platform_profile snd mei_vsc(OE) mei soundcore int3403_thermal int340x_thermal_zone soc_button_array ac ov2740(OE) v4l2_fwnode v4l2_async videodev mc intel_skl_int3472_tps68470 tps68470_regulator intel_skl_int3472_discrete intel_hid sparse_keymap int3400_thermal acpi_thermal_rel intel_pmc_core acpi_tad acpi_pad nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_tables ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c iptable_mangle iptable_raw vboxnetadp(O) iptable_security vboxnetflt(O)
[    6.764334]  nfnetlink rfkill ip6table_filter ip6_tables iptable_filter bpfilter vboxdrv(O) qrtr dmi_sysfs nls_iso8859_1 nls_cp437 vfat fat fuse configfs ip_tables x_tables ext4 mbcache jbd2 hid_sensor_custom hid_sensor_hub hid_generic intel_ishtp_hid i915 drm_buddy drm_display_helper crct10dif_pclmul xhci_pci crc32_pclmul xhci_pci_renesas crc32c_intel xhci_hcd cec ucsi_acpi nvme rc_core typec_ucsi intel_ish_ipc i2c_hid_acpi ghash_clmulni_intel aesni_intel crypto_simd cryptd serio_raw roles usbcore intel_ishtp nvme_core typec ttm wmi i2c_hid battery video pinctrl_tigerlake coretemp sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua msr efivarfs
[    6.764392] Unloaded tainted modules: acpi_cpufreq():1 fjes():1 pcc_cpufreq():1 acpi_cpufreq():1 fjes():1 pcc_cpufreq():1 acpi_cpufreq():1 fjes():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 fjes():1 acpi_cpufreq():1 pcc_cpufreq():1 fjes():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1
[    6.764460]  pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1
[    6.764479] CR2: 0000000000000304
[    6.764483] ---[ end trace 0000000000000000 ]---
[    6.764486] RIP: 0010:ipu_pci_probe.cold+0x3f0/0x90e [intel_ipu6]
[    6.764509] Code: 48 89 fa 48 85 ff 0f 84 b8 00 00 00 48 8b bf 10 03 00 00 48 85 ff 0f 84 ba 00 00 00 e8 56 b6 ff ff 48 8b 43 18 48 85 c0 74 11 <48> 8b b8 10 03 00 00 48 85 ff 74 05 e8 3c b6 ff ff 48 8b 53 20 48
[    6.764513] RSP: 0018:ffffb71440747b58 EFLAGS: 00010282
[    6.764516] RAX: fffffffffffffff4 RBX: ffff88b6c6789828 RCX: 0000000000000000
[    6.764519] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[    6.764522] RBP: ffff88b9e81bb000 R08: ffffb71440747af0 R09: ffff88b6c3f425a0
[    6.764525] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88b9e81bb0d0
[    6.764527] R13: ffffb71445000000 R14: 00000000fffffff4 R15: ffffb71445000000
[    6.764531] FS:  00007f2330946b00(0000) GS:ffff88ba0f540000(0000) knlGS:0000000000000000
[    6.764535] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    6.764538] CR2: 0000000000000304 CR3: 000000010b3e4002 CR4: 0000000000770ee0
[    6.764541] PKRU: 55555554

Suspend/hibernate issue on Thinkpad x1 carbon gen10

I got the driver working(both gst-launch and v4l2-relayd) as per comment #48 (comment) with arch linux on kernel 6.0.9.

Unfortunately laptop started to freeze when tried suspend/hibernate. dmesg/journalctl output is empty. After deleting drivers everything works normally.

I tried to compile newer kernels 6.1.7 and 6.2.2 and driver doesn't work(problems with mainline ov2740, I hope the fix is described here #55 (comment) but haven't tried) but the suspend/hibernate issue persists even with camera not working. The same reproduces with mainline arch linux kernel without patches.

Getting it working with rpm-ostree

On fedora kinoite/silverblue you have rpm-ostree and there is no support for dkms yet. Soru had tried to build with the Build outside kernel source tree method in a toolbox and that worked, however, after insmod'ing the module, this is the dmesg output:

[  121.407554] intel_ipu6: loading out-of-tree module taints kernel.
[  121.407712] intel_ipu6: module verification failed: signature and/or required key missing - tainting kernel
[  121.410343] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[  121.410608] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[  121.410711] intel-ipu6 intel-ipu: physical base address 0x603c000000
[  121.410714] intel-ipu6 intel-ipu: mapped as: 0x000000004e3f88d7
[  121.412625] intel-ipu6 intel-ipu: IPU in secure mode
[  121.412632] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[  121.412633] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[  121.428923] intel-ipu6 intel-ipu: IPC reset done
[  121.428939] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[  121.429156] intel-ipu6 intel-ipu: Direct firmware load for intel/ipu6ep_fw.bin failed with error -2
[  121.429167] intel-ipu6 intel-ipu: Requesting signed firmware failed
[  121.429173] intel-ipu6: probe of intel-ipu failed with error -2

Any help would be greatly appreciated!

UBSAN warnings in Intel IPU6 camera driver at boot

UBSAN: array-index-out-of-bounds in /tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
UBSAN: shift-out-of-bounds in /tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:652:15
UBSAN: shift-out-of-bounds in /tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:654:19

Detail:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958006

failed to enable platforms with ov01a1s or hm11b1 sensors on TGL

Differences from media-ctl -p output of oem-5.14 kernel to oem-5.17 gives:

--- media-ctl.5.14.0-1036-oem.ANDW-DVT2-C1.Vicamo-TGL-ov01a1s.log       2022-05-18 00:49:15.849439919 +0800
+++ media-ctl.5.17.0-9004-oem.ANDW-DVT2-C1.Vicamo-TGL-ov01a1s.log       2022-05-18 00:49:15.869440701 +0800
@@ -1,4 +1,4 @@
-Media controller API version 5.14.21
+Media controller API version 5.17.3
 
 Media device information
 ------------------------
@@ -7,7 +7,7 @@
 serial          
 bus info        pci:pci0000:00
 hw revision     0x0
-driver version  5.14.21
+driver version  5.17.3
 
 Device topology
 - entity 1: Intel IPU6 CSI-2 0 (2 pads, 1 link)
@@ -19,12 +19,11 @@
                [fmt:Y10_1X10/4096x3072 field:none]
                -> "Intel IPU6 CSI2 BE SOC 0":0 []
 
-- entity 4: Intel IPU6 CSI-2 1 (2 pads, 2 links)
+- entity 4: Intel IPU6 CSI-2 1 (2 pads, 1 link)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev1
        pad0: Sink
                [fmt:Y10_1X10/4096x3072 field:none]
-               <- "ov01a1s 20-0036":0 []
        pad1: Source
                [fmt:Y10_1X10/4096x3072 field:none]
                -> "Intel IPU6 CSI2 BE SOC 0":0 []
@@ -107,10 +106,3 @@
        pad0: Sink
                <- "Intel IPU6 CSI2 BE SOC 0":1 [DYNAMIC]
 
-- entity 68: ov01a1s 20-0036 (1 pad, 1 link)
-             type V4L2 subdev subtype Sensor flags 0
-             device node name /dev/v4l-subdev9
-       pad0: Source
-               [fmt:SGRBG10_1X10/1296x798 field:none]
-               -> "Intel IPU6 CSI-2 1":0 []
-

It seems some device is no longer probed/created.

The following logs were captured using ipu6/ivsc DKMS from vicamo/ppa-1972106 and vicamo/ppa-1972109.

Add support for OV01A1B infrared sensor

I looked into the Windows driver package for the Dell Latitude 9430 and noticed several *.aiqb and graph files that aren't present in the open source stack, as well as mentions of ov01a1b. Please add support for those sensors as well.

intel_ipu6 fails to load with "CSE boot_load failed"

After attempting to get the IPU6 driver working on a Gigabyte/GigaIPC Jasper Lake board iTXL-4500A (aka MJPLNAT-SI),
We've run into an issue where the driver fails to authenticate the firmware with "CSE boot_load failed".

The IPC response is 0x820, which does not indicate too much, considering there is no documentation of the registers outside of the driver.

The driver is also unable set the IPU to "non-secure mode" (with option "secure_mode_enable=N"), so the assumption is either the BIOS or an eFuse has disabled this functionality.

We HAVE been able to successfully get the driver working, with camera video, on a different system (a "Designed for Windows" Asus BR1100 notebook, Same N4500 SoC), after patching ACPI to create the proper MIPI port/endpoint links, using the same kernel, driver and firmware files.

Seeing as we had to ask Gigabyte to re-spin the BIOS to enable the IPU as a discoverable PCI device, is there something that may still be missing (such as a firmware certificate perhaps?) which the BIOS must set before an OS can successfully initialize the device?

Linux kernel:
5.16.0-rc7 (latest at the time, from Kernel.org)

Driver:
"JSL penguin peak" branch from:
https://github.com/intel/ipu6-drivers/tree/jsl_penguin_peak

GigaIPC board information:
https://www.gigaipc.com/index.php?action=products3&cid=1&tid=3&pid=141&utm_source=gigaipc&utm_medium=product&utm_campaign=iTXL-4500A
https://www.gigaipc.com/filedown.php?file=iTXL-4500A_20211112.pdf
https://www.gigaipc.com/filedown.php?file=Manual-iTXL-5105A_4500A_20211124.pdf

dmesg output:
intel-ipu6 intel-ipu: Device 0x4e19 (rev: 0x0)
intel-ipu6 intel-ipu: physical base address 0x6000000000
intel-ipu6 intel-ipu: mapped as: 0x00000000a33195d7
intel_ipu6:ipu_pci_probe:440: intel-ipu6 intel-ipu: isys_base: 0xffffbc2683000000
intel_ipu6:ipu_pci_probe:441: intel-ipu6 intel-ipu: psys_base: 0xffffbc2683000000
intel-ipu6 intel-ipu: IPU in secure mode
intel_ipu6:ipu_buttress_ipc_reset:111: intel-ipu6 intel-ipu: ipu_buttress_ipc_reset:IPC_PEER_COMP_ACTIONS_RST_PHASE1
intel_ipu6:ipu_buttress_ipc_reset:95: intel-ipu6 intel-ipu: ipu_buttress_ipc_reset:IPC_PEER_COMP_ACTIONS_RST_PHASE1 & IPC_PEER_COMP_ACTIONS_RST_PHASE2
intel_ipu6:ipu_buttress_ipc_reset:126: intel-ipu6 intel-ipu: ipu_buttress_ipc_reset: IPC_PEER_COMP_ACTIONS_RST_PHASE2
intel-ipu6 intel-ipu: IPC reset done
intel-ipu6 intel-ipu: cpd file name: intel/ipu6se_fw.bin
intel-ipu6 intel-ipu: FW version: 20210414
intel_ipu6:get_dummy_page:136: intel-ipu6 intel-ipu: get_dummy_page get_zeroed_page() == 000000000224262f
intel_ipu6:alloc_dummy_l2_pt:171: intel-ipu6 intel-ipu: alloc_dummy_l2_pt get_zeroed_page() == 00000000fc27c7d6
intel_ipu6:alloc_l1_pt:209: intel-ipu6 intel-ipu: alloc_l1_pt get_zeroed_page() == 00000000ccd35858
intel_ipu6:alloc_l1_pt:221: intel-ipu6 intel-ipu: l1 pt 00000000ccd35858 mapped at 1144000
intel_ipu6:ipu_mmu_alloc:550: intel-ipu6 intel-ipu: domain initialised
intel_ipu6:alloc_dma_mapping:596: intel-ipu6 intel-ipu: alloc mapping
intel_ipu6:bus_pm_runtime_resume:51: intel-ipu6-bus intel-ipu6-isys0: bus_pm_runtime_resume: buttress power up 0
intel_ipu6:bus_pm_runtime_resume:56: intel-ipu6-bus intel-ipu6-isys0: bus_pm_runtime_resume: resume 0
intel_ipu6:get_dummy_page:136: intel-ipu6 intel-ipu: get_dummy_page get_zeroed_page() == 0000000052fe013a
intel_ipu6:alloc_dummy_l2_pt:171: intel-ipu6 intel-ipu: alloc_dummy_l2_pt get_zeroed_page() == 00000000bd019e0d
intel_ipu6:alloc_l1_pt:209: intel-ipu6 intel-ipu: alloc_l1_pt get_zeroed_page() == 000000005102976f
intel_ipu6:alloc_l1_pt:221: intel-ipu6 intel-ipu: l1 pt 000000005102976f mapped at 1143000
intel_ipu6:ipu_mmu_alloc:550: intel-ipu6 intel-ipu: domain initialised
intel_ipu6:bus_pm_runtime_suspend:31: intel-ipu6-bus intel-ipu6-isys0: bus_pm_runtime_suspend: buttress power down 0
intel_ipu6:alloc_dma_mapping:596: intel-ipu6 intel-ipu: alloc mapping
intel_ipu6:bus_pm_runtime_resume:51: intel-ipu6-bus intel-ipu6-isys0: bus_pm_runtime_resume: buttress power up 0
intel_ipu6:bus_pm_runtime_resume:56: intel-ipu6-bus intel-ipu6-isys0: bus_pm_runtime_resume: resume 0
intel_ipu6:bus_pm_runtime_resume:51: intel-ipu6-bus intel-ipu6-psys0: bus_pm_runtime_resume: buttress power up 0
intel_ipu6:bus_pm_runtime_resume:56: intel-ipu6-bus intel-ipu6-psys0: bus_pm_runtime_resume: resume 0
intel_ipu6:ipu_mmu_hw_init:442: intel-ipu6-bus intel-ipu6-psys0: mmu hw init
intel_ipu6:alloc_l2_pt:238: intel-ipu6 intel-ipu: alloc_l2_pt get_zeroed_page() == 00000000c8a1b540
intel_ipu6:l2_map:284: intel-ipu6 intel-ipu: page for l1_idx 1022 00000000c8a1b540 allocated
intel_ipu6:alloc_l2_pt:238: intel-ipu6 intel-ipu: alloc_l2_pt get_zeroed_page() == 00000000f50de5a8
intel_ipu6:l2_map:284: intel-ipu6 intel-ipu: page for l1_idx 1023 00000000f50de5a8 allocated
intel_ipu6:allocate_trash_buffer:422: intel-ipu6-bus intel-ipu6-psys0: iova trash buffer for MMUID: 0 is 4286578688
intel_ipu6:ipu_dma_map_sg:319: intel-ipu6-bus intel-ipu6-psys0: dmamap: mapping sg 14 entries, 93 pages
intel_ipu6:ipu_dma_map_sg:326: intel-ipu6-bus intel-ipu6-psys0: dmamap: iova low pfn 1046435, high pfn 1046527
intel_ipu6:alloc_l2_pt:238: intel-ipu6 intel-ipu: alloc_l2_pt get_zeroed_page() == 0000000086728e3e
intel_ipu6:l2_map:284: intel-ipu6 intel-ipu: page for l1_idx 1021 0000000086728e3e allocated
intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
intel_ipu6:ipu_buttress_ipc_send_bulk:261: intel-ipu6 intel-ipu: bulk IPC command: 0x1
intel_ipu6:ipu_buttress_isr:425: intel-ipu6 intel-ipu: BUTTRESS_ISR_IPC_EXEC_DONE_BY_CSE
intel_ipu6:ipu_buttress_isr:411: intel-ipu6 intel-ipu: BUTTRESS_ISR_IPC_FROM_CSE_IS_WAITING
intel-ipu6 intel-ipu: expected resp: 0x1, IPC response: 0x820
intel-ipu6 intel-ipu: CSE boot_load failed
intel-ipu6 intel-ipu: FW authentication failed(-5)
intel_ipu6:bus_pm_runtime_suspend:31: intel-ipu6-bus intel-ipu6-psys0: bus_pm_runtime_suspend: buttress power down 0
intel_ipu6:bus_pm_runtime_suspend:31: intel-ipu6-bus intel-ipu6-isys0: bus_pm_runtime_suspend: buttress power down 0
intel-ipu6: probe of intel-ipu failed with error -5

Failed to build against v6.0-rcX, multiple errors

build.log:

<<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.c: In function 'link_validate':
<<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.c:612:32: error: implicit declaration of function 'media_entity_remote_pad'; did you mean 'media_entity_remove_links'? [-Werror=implicit-function-declaration]
  612 |                 ip->external = media_entity_remote_pad(av->vdev.entity.pads);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
      |                                media_entity_remove_links
<<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.c:612:30: warning: assignment to 'struct media_pad *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  612 |                 ip->external = media_entity_remote_pad(av->vdev.entity.pads);
      |                              ^
<<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.c: In function 'get_external_facing_format':
<<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.c:687:41: warning: pointer/integer type mismatch in conditional expression
  687 |                            ip->external :
      |                                         ^
<<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.c: In function 'start_stream_firmware':
<<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.c:1040:40: warning: initialization of 'struct media_pad *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
 1040 |         struct media_pad *source_pad = media_entity_remote_pad(&av->pad);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:257: <<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.o] Error 1
make[5]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:257: <<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-queue.o] Error 1
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:257: <<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6/../ipu-isys-video.o] Error 1
make[4]: *** [scripts/Makefile.build:473: <<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel/ipu6] Error 2
make[3]: *** [scripts/Makefile.build:473: <<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build/drivers/media/pci/intel] Error 2
make[2]: *** [Makefile:1859: <<DKMSDIR>>/build/ipu6-drivers/0~git202204270226.8357dee9/build] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.