endeavour / DellXps7390-2in1-Manjaro-Linux-Fixes

Kernel patches and tweaks to get the Dell XPS 7390 2-in-1 with 10th Gen Intel CPUs functioning on Manjaro Linux
23 stars 3 forks source link

Webcam Not Working #6

Open dkout opened 4 years ago

dkout commented 4 years ago

I have tried installing both Ubuntu and Manjaro but the webcam does not seem to work on either (while it works on Windows). It seems that the webcam is not even being recognized by the system. Any thoughts on how this might be fixed? Would a kernel update solve this in the future?

Thanks!

endeavour commented 4 years ago

There is no Linux driver for the webcam. Unless Dell or Omnivision release technical details this is going to involve reverse engineering the windows driver to see how it works. I'm afraid this is beyond my skillset.

guilhem commented 4 years ago

More information: https://github.com/jakeday/linux-surface/issues/145

We have the ov5693 camera as exposed by /sys/bus/acpi/devices/INT33BE:00/

guilhem commented 4 years ago

To resume, we have to wait for:

guilhem commented 4 years ago

For the sake of information, it seems that camera i2c device is i2c-OVTI01A0 (tested by activating and deactivating camera in BIOS)

dkout commented 4 years ago

To resume, we have to wait for:

* `ipu3` to be stable

* `ipu3` to manage the "new" `Multimedia controller [0480]: Intel Corporation Device [8086:8a19]` (instead of `8080:1919` only managed by ipu3)

* `libcamera` to manage ipu3

* `libcamera` to have a V4L2 compatibility layer for "legacy" app to use the camera

* maybe a driver for ov5693 to manage parameters through `i2c`

For those with more experience in Linux development cycles etc, any idea how long this might take? Is there an estimated timeframe?

Thanks!

guilhem commented 4 years ago

some more information: https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1#Camera

dkout commented 4 years ago

There should be a way to make it work now, since it already works on the 2020 xps 13 developer edition. Any thoughts on how one might access those drivers?

endeavour commented 4 years ago

My guess is the developer edition has different camera hardware. Perhaps someone can check?

NiklasBeierl commented 4 years ago

@dkout Carefull, they are easy to confuse: The XPS13 7390 has a developer edition. But as far as I know, the XPS13 2 in 1 7390 does not. The 2 in 1 and the normal one have different screen bezels and different camera hardware. Camera for the non-2-in-1 has been confirmed working in the arch wiki. But the 2 in 1s camera is why we are here. That was the exact misconception that baited me into buying a 2-in-1 assuming the camera would work.
So @endeavour is right on the money.

dkout commented 4 years ago

Yes, that's actually the reason I bought the 2-in-1 too. There seems to be some work being done in the ipu3 area here: https://github.com/linux-surface/linux-surface/issues/91#issuecomment-609361505 but there's no indication to a time frame.

kbingham commented 3 years ago

To resume, we have to wait for:

Firstly - don't "wait for" ... things here won't happen here without someone driving them ... If you need this support, push for it.


* `ipu3` to be stable
* `ipu3` to manage the "new" `Multimedia controller [0480]: Intel Corporation Device [8086:8a19]` (instead of `8080:1919` only managed by ipu3)

Does the kernel driver not load for your platform?

  • libcamera to manage ipu3

We have IPU3 as one of our main targets. But there is still a lot of work to go to be able to use it on non-chromebook devices. We're only supporting IPU3 for our Chromebook targets, so please do

  • libcamera to have a V4L2 compatibility layer for "legacy" app to use the camera

  • maybe a driver for ov5693 to manage parameters through i2c

It looks like someone has started looking at this in the surface thread above - and there is some support in the atomisp moduels already - but someone needs to get a version posted to linux-media for review, to work towards integration.

For those with more experience in Linux development cycles etc, any idea how long this might take? Is there an estimated timeframe?

Timeframe? - when someone (with the device, and motivation) looks at it. If you're reading this - that means 'you' ;-)

-- Kieran

maresb commented 3 years ago

I'm generally very comfortable with Linux and high-level Python programming, but unfortunately kernel driver development is distinctly beyond my current abilities. I'm not sure how exactly I can help...

I could offer to try out some commands, or perhaps more efficiently even arrange for ssh access into a LiveUSB for someone who knows what they're doing but has no physical XPS 7390 2-in-1.

cooperrc commented 3 years ago

I'm generally very comfortable with Linux and high-level Python programming, but unfortunately kernel driver development is distinctly beyond my current abilities. I'm not sure how exactly I can help...

I could offer to try out some commands, or perhaps more efficiently even arrange for ssh access into a LiveUSB for someone who knows what they're doing but has no physical XPS 7390 2-in-1.

I'm in the same boat. I have the hardware and would love to help get the camera working, but i have not done any kernel driver development. @kbingham any place we could start?

kbingham commented 3 years ago

The first place to start is to make sure you can load the IPU3 (CIO2/IMGU3) drivers, and get them to match on the hardware you have. Once you have that, the work that is happening in https://github.com/linux-surface/linux-surface/issues/91 and on the linux-media list will hopefully produce a means to connecting the camera sensors to the IPU3, which will be the point that you can capture images.

However, at that point, the images will likely be 'green' due to incorrect white-balance/exposure corrections, so then the work can start on the algorithm integrations.

typhoe commented 3 years ago

I would gladly also try to help support that hardware. I'm running a manjaro distrib on my laptop xps13 7390 but would prefer to do the tests in an other dedicated environment. What would be the "best" distrib you would suggest to use for the tests? Can you direct us to a "how to" install the IPU3 drivers? And what would be the tests you'd like us to run? Thank you very much!

kbingham commented 3 years ago

Your distribution should already have installed the IPU3 drivers. What is required is making sure they load correctly and match the hardware you have

I presume you could try something like

sudo modprobe ipu3-cio2 sudo modprobe ipu3-imgu

And examine the kernel logs. (dmesg)

I've tried that on my system (which doesn't have any IPU3 so it's a bit of a moot test) and nothing much comes out of the logs. Perhaps someone with an IPU3 could report the expected output. (No point doing it on my chromebook)

Also - if the devices are not matching correctly, then you need to identify what's different, - I see above mention that there might be some different vendor ID's used.

Those should be reported to the linux-media list to get them added (preferably in the form of a patch to the device having tested it). To do this, you're probably going to need to update the list of entries in the table at: https://elixir.bootlin.com/linux/latest/source/drivers/staging/media/ipu3/ipu3.c#L847

And then recompile the module, and retest.

typhoe commented 3 years ago

Thanks for your reply.

My system:

~ >>> uname -a                                                                                                                                                                                                      
Linux xps13 5.8.6-1-MANJARO #1 SMP PREEMPT Thu Sep 3 14:19:36 UTC 2020 x86_64 GNU/Linux
~ >>> cat /sys/module/ipu3_cio2/srcversion                                                                                                                                                                          
C061A6C16048F1966EEF42F
~ >>> cat /sys/module/ipu3_imgu/srcversion                                                                                                                                                                          
462131FBDAB5FE3721175CD
~ >>> sudo lspci -vvv -nn -d 8086:8a19                                                                                                                                                                               
00:05.0 Multimedia controller [0480]: Intel Corporation Device [8086:8a19] (rev 03)                                                                                                                                  
        Subsystem: Dell Device [1028:08b0]                                                                                                                                                                           
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-                                                                                                        
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-                                                                                                         
        Interrupt: pin A routed to IRQ 255                                                                                                                                                                           
        Region 0: Memory at 603c000000 (64-bit, non-prefetchable) [disabled] [size=16M]                                                                                                                              
        Capabilities: [70] Express (v2) Root Complex Integrated Endpoint, MSI 00                                                                                                                                     
                DevCap: MaxPayload 128 bytes, PhantFunc 0                                                                                                                                                            
                        ExtTag- RBE+ FLReset-                                                                                                                                                                        
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR-
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
        Capabilities: [ac] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [d0] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-

So here's what I tried:

~ >>> sudo rmmod ipu3-cio2 ipu3-imgu 2>/dev/null ;lsmod |grep --color ipu3
~ >>> 

Nothing displayed (ok)

~ >>> sudo modprobe ipu3-cio2 ;sudo modprobe ipu3-imgu ;lsmod |grep --color ipu3                                                                                                                                 [1]
ipu3_imgu             225280  0
ipu3_cio2              40960  0
v4l2_fwnode            32768  1 ipu3_cio2
videobuf2_dma_sg       16384  2 ipu3_cio2,ipu3_imgu
videobuf2_v4l2         28672  2 ipu3_cio2,ipu3_imgu
videobuf2_common       57344  3 ipu3_cio2,videobuf2_v4l2,ipu3_imgu
videodev              274432  5 v4l2_fwnode,ipu3_cio2,videobuf2_v4l2,videobuf2_common,ipu3_imgu
mc                     61440  5 videodev,ipu3_cio2,videobuf2_v4l2,videobuf2_common,ipu3_imgu

So the modules seem to load correctly.

But all I see in my system logs is this message:

~ >>> sudo journalctl -k |grep ipu3                                                                                                                                                                                 
sept. 09 14:49:04 xps13 kernel: ipu3_imgu: module is from the staging directory, the quality is unknown, you have been warned.

The pci id of my device is indeed different from 8080:1919 as mine is 8086:8a19 so I'll have to try looking how to compile the module after simply changing the id... but for me, it's by far another challenge than simply trying some commands :'(

Edit: Juste also tried latest kernel available on Manjaro (5.9rc3) but the modules are the same version and no more success

kbingham commented 3 years ago

It's hard to confirm, but if the Intel processor on this device is an 'Ice Lake' it might be that this device refers to an IPU4. https://fuse.wikichip.org/news/2318/ice-lake-brings-a-new-cpu-gpu-ipu-and-i-os-to-follow-by-tiger-lake-next-year/

If that's the case, then the IPU3 driver will not support the device at all, so I'm afraid we're even further back for support with this device.

Oddly though, I can't see the 8086:8a19 device id in the IPU4 driver listed at : https://github.com/intel/intel-camera-drivers/blob/master/drivers/media/pci/intel-ipu4/intel-ipu4.h either, and the '19' suffix matches the IPU3 ?

Really hard to know without support from intel - I've asked an intel guy on the #v4l IRC channel so I'll update if I find out what the device ID represents.

maresb commented 3 years ago

@kbingham The info at the Ubuntu Wiki supports your IPU4 hypothesis: https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1

typhoe commented 3 years ago

I can confirm that the Intel CPU inside this laptop is an Intel® Core™ i7-1065G7 (ice-lake-U gen11 GPU Iris Plus G7)

And all the articles I find on the internet mention it coming with the IPU4 version indeed

kbingham commented 3 years ago

Well in that case - there are some very nice USB webcams available for purchase lately ...

typhoe commented 3 years ago

Well, that's not what we all expected but thanks for your help.

It's really too bad neither Dell nor Intel can deliver a decent support for these IPU4 webcam...

We'll wait and hope support for IPU4 can be added at some point.

And if there's need for some tests, we'll try to help to make it work at last!

Once again, thanks!

cooperrc commented 3 years ago

Well in that case - there are some very nice USB webcams available for purchase lately ...

This was my original plan. A little frustrating to have a Dell that balks on the Linux support in this way. XPS 13 2-in-1 is supposed to have Linux developer edition.

HeikoGH commented 3 years ago

Can we help in any other way? Does it make sense to write people/departments at Intel or Dell to at least let them know that this affects a certain amount of users? Is there a known address where we can complain where it, from experience, could actually help?

kbingham commented 3 years ago

If it's really IPU4, then you're probably looking at needing several months of work porting the IPU4 driver posted to function on a mainline kernel, and try to at least get it into staging - plus extra work creating a new pipeline handler in libcamera.

Then on top of that will be the IPU4 specific 3a algorithm support. Without direct support from Intel that's going to be quite difficult in it's own right.

So I'd say the options are:

The IPU4 architecture is very different from the IPU3, so there will likely be further complications down the road too.

typhoe commented 3 years ago

For my part, I already opened a case with Dell support but so far, all they replied was "we transmitted your request to our technical support team and will get back to you soon"

That was last year already!

There seems to be a repo with IPU4 code on github: https://github.com/intel/intel-camera-drivers

But, there's no activity on it.

kbingham commented 3 years ago

Indeed, the code at https://github.com/intel/intel-camera-drivers is the one I meant could be ported, but that is not going to be a simple task.

NiklasBeierl commented 3 years ago

Good to see more people pay attention to that: I ...

@kbingham where do I start with porting that? Something I should read?

kbingham commented 3 years ago

There is also 'another' IPU4 driver at: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/974918

That is listed with the device id of 0x5a19, so 'yet another' IPU4 variant. I've heard that the https://github.com/intel/intel-camera-drivers is likely too old a driver to support the 0x8a19.

There really will be quite some up-hill struggle pulling all that together. The first thing I'd do is get all of those files required for both drivers and compare them to see how much architecture they share.

Then there's a battle to work out what is / isn't likely to be able to compile as a module against your own running device. Initially you would probably want to compile the modules against your running kernel, out-of-tree and get them loading to see if they can interact with the hardware at all ... but as they're not directly supported - this really is such a minefield.

And once you've got the drivers 'loading' and potentially talking to the devices, you will need firmware for the devices. And then likely also the have to add in the ability to map in the sensors from ACPI too - which is another topic being worked on by the IPU3.

heftig commented 3 years ago

A little frustrating to have a Dell that balks on the Linux support in this way. XPS 13 ~2-in-1~ is supposed to have Linux developer edition.

The Ice Lake XPS 13 non-2-in-1 (which has a developer edition) has a completely different camera module which is supported by the uvcvideo driver.

NiklasBeierl commented 3 years ago

A little frustrating to have a Dell that balks on the Linux support in this way. XPS 13 ~2-in-1~ is supposed to have Linux developer edition.

The Ice Lake XPS 13 non-2-in-1 (which has a developer edition) has a completely different camera module which is supported by the uvcvideo driver.

Indeed. Didn't stop me (and many others) from purchasing the 2-in-1 assuming it would have the same camera, tho.

NiklasBeierl commented 3 years ago

There is also 'another' IPU4 driver at: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/974918

That is listed with the device id of 0x5a19, so 'yet another' IPU4 variant. I've heard that the https://github.com/intel/intel-camera-drivers is likely too old a driver to support the 0x8a19.

There really will be quite some up-hill struggle pulling all that together. The first thing I'd do is get all of those files required for both drivers and compare them to see how much architecture they share.

Then there's a battle to work out what is / isn't likely to be able to compile as a module against your own running device. Initially you would probably want to compile the modules against your running kernel, out-of-tree and get them loading to see if they can interact with the hardware at all ... but as they're not directly supported - this really is such a minefield.

And once you've got the drivers 'loading' and potentially talking to the devices, you will need firmware for the devices. And then likely also the have to add in the ability to map in the sensors from ACPI too - which is another topic being worked on by the IPU3.

I will get back to you as soon as I understand what all of that means.

QMeqGR commented 3 years ago

I am in the same boat. I am able to help test kernel modules that others are developing. I'm running Ubuntu 20.04, which is still on the 5.4 kernel, but Phoronix reports* kernel version 5.8 will be included in the Ubuntu 20.10 release next month, so I should be good to go then.

kitakar5525 commented 3 years ago

Somewhat good news is that, Intel ported the IPU4 up to v4.19: https://github.com/intel/linux-intel-lts/tree/4.19/base/drivers/media/pci/intel/ipu4 and it supports 0x8a19 when CONFIG_VIDEO_INTEL_IPU4P=y)

(Surface Pro 7 and Surface Book 3 also use the 0x8a19 one)

Firmware is available on e.g., https://github.com/Intel-5xx-Camera/intel-camera-adaptation

but I guess porting the driver to the latest stable version is still a hard work. So, first I'd like to see that someone build the whole kernel then see if the Intel's v4.19 kernel can boot on your machines. It may be highly possible that Ice Lake gen machines don't boot on upstream v4.19, but Intel may have added some patches into their v4.19

I think kernel config like this may work:

#
# IPU4
#
CONFIG_VIDEO_INTEL_IPU=m
#
# select VIDEO_INTEL_IPU4 if your PCI ID is 0x5a88
# select VIDEO_INTEL_IPU4P if your PCI ID is 0x8a19
#
# https://github.com/intel/linux-intel-lts/blob/bd16f3c70d1773b1811eeb77fc7ca68f88208d2b/drivers/media/pci/intel/ipu.h#L17-L21
#
CONFIG_VIDEO_INTEL_IPU4P=y
CONFIG_VIDEO_INTEL_IPU_FW_LIB=y

#
# Not sure what exactly these options mean
#
CONFIG_VIDEO_INTEL_IPU_SOC=y
CONFIG_VIDEO_INTEL_ICI=y

#
# camera sensors
#
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
CONFIG_VIDEO_CRLMODULE=m
CONFIG_VIDEO_CRLMODULE_LITE=m
typhoe commented 3 years ago

Thank you @kitakar5525 !

I tried to build the intel kernel and seems I finally managed to get it working.

The modules and kernel are ok, and the webcam seems detected but I now get an error about the firmware blob:

journalctl -b
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: enabling device (0000 -> 0002)
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: Device 0x8a19 (rev: 0x3)
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: physical base address 0x603c000000
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: mapped as: 0x0000000052e146ed
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: IPU in secure mode
oct. 26 21:26:37 xps13 kernel: tpm_tis STM7408:00: 2.0 TPM (device-id 0x0, rev-id 78)
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: cpd file name: ipu4p_cpd.bin
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: Direct firmware load for ipu4p_cpd.bin failed with error -2
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: Requesting signed firmware failed
oct. 26 21:26:37 xps13 kernel: intel-ipu4: probe of intel-ipu failed with error -2
oct. 26 21:26:37 xps13 kernel: media: Linux media interface: v0.10
oct. 26 21:26:37 xps13 kernel: videodev: Linux video capture interface: v2.00

Just in case, here's what I tried to do if someone wants to get further or correct me:

Create a working dir

mkdir ~/webcam
cd ~/webcam

Get firmware blob for ipu4, untar and put under /usr/lib/firmware/

wget https://github.com/Intel-5xx-Camera/intel-camera-adaptation/raw/master/fw-ipu4-1.0.tar.gz
tar zxvf fw-ipu4-1.0.tar.gz
sudo cp lib/firmware/ipu4_cpd_b0.bin /usr/lib/firmware/ipu4_cpd_b0.bin

Get kernel source for branch 4.19/base

git clone -b 4.19/base https://github.com/intel/linux-intel-lts.git

Reinstall old kernel 4.19 on my Manjaro

pacaur -S linux419 linux419-headers

Reboot on 4.19 kernel (beware, no wifi and video artefacts & blinking!) Create .config file from manjaro default options (just pressed enter for each choices)

make localmodconfig

Reboot on kernel 5.8 and remove kernel 4.19

cd ~/webcam

Add IPU4 options (there wasn't any entries about IPU4 in .config file)

cat <<EOF >>.config
#
# IPU4
#
CONFIG_VIDEO_INTEL_IPU=m
#
# select VIDEO_INTEL_IPU4 if your PCI ID is 0x5a88
# select VIDEO_INTEL_IPU4P if your PCI ID is 0x8a19
#
# https://github.com/intel/linux-intel-lts/blob/bd16f3c70d1773b1811eeb77fc7ca68f88208d2b/drivers/media/pci/intel/ipu.h#L17-L21
#
CONFIG_VIDEO_INTEL_IPU4P=y
CONFIG_VIDEO_INTEL_IPU_FW_LIB=y

#
# Not sure what exactly these options mean
#
CONFIG_VIDEO_INTEL_IPU_SOC=y
CONFIG_VIDEO_INTEL_ICI=n                                     # <= Had to disable this one or I cannot build the modules

#
# camera sensors
#
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
CONFIG_VIDEO_CRLMODULE=m
CONFIG_VIDEO_CRLMODULE_LITE=m
EOF

Tag my built

sed -i 's,^CONFIG_LOCALVERSION=.*,CONFIG_LOCALVERSION="-IPU4-TEST",' .config

Make (option -j nb_vcpu+1 to speed up things), and use make clean if I did other make test before

make -j9

Install kernel (will only copy vmlinuz and System.map files in boot)

sudo make install

Install modules (they will be copied to /usr/lib/modules/OurKernelName)

sudo make modules_install

Rename System.map et vmlinuz

sudo mv /boot/System.map /boot/System.map-4.19.151-IPU4-TEST+
sudo mv /boot/vmlinuz /boot/vmlinuz-4.19.151-IPU4-TEST+

Generate initramfs (option -k is from OurKernelName)

sudo mkinitcpio -k 4.19.151-IPU4-TEST+ -g /boot/initramfs-4.19.151-IPU4-TEST+.img

Manjaro uses grub, so update grub menu (but that doesn't seem to work)

sudo update-grub

And now reboot on the new built kernel.

To clean and restore grub (remove the built kernel entry)

sudo rm -Rf /boot/*4.19.151-IPU4-TEST+* /usr/lib/modules/4.19.151-IPU4-TEST+ && sudo update-grub
typhoe commented 3 years ago

Just a little follow up:

I managed to boot a custom kernel 4.19 with the ipu4 module but I now get an error when loading the blob firmware...

journalctl -b
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: enabling device (0000 -> 0002)
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: Device 0x8a19 (rev: 0x3)
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: physical base address 0x603c000000
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: mapped as: 0x0000000052e146ed
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: IPU in secure mode
oct. 26 21:26:37 xps13 kernel: tpm_tis STM7408:00: 2.0 TPM (device-id 0x0, rev-id 78)
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: cpd file name: ipu4p_cpd.bin
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: Direct firmware load for ipu4p_cpd.bin failed with error -2
oct. 26 21:26:37 xps13 kernel: intel-ipu4 intel-ipu: Requesting signed firmware failed
oct. 26 21:26:37 xps13 kernel: intel-ipu4: probe of intel-ipu failed with error -2
oct. 26 21:26:37 xps13 kernel: media: Linux media interface: v0.10
oct. 26 21:26:37 xps13 kernel: videodev: Linux video capture interface: v2.00
kitakar5525 commented 3 years ago

I managed to boot a custom kernel 4.19 with the ipu4 module but I now get an error when loading the blob firmware...

Congrats!

Regarding the firmware: I see. The link I posted before only contains ipu4_cpd_b0.bin which is for CONFIG_VIDEO_INTEL_IPU4 and not for ipu4p.

Can you try this firmware: https://github.com/RajmohanMani/ipu4pfw Looks like the committer is Intel person. Not sure where the firmware should be located, maybe under /lib/firmware

typhoe commented 3 years ago

Well, the new file is detected but it now seems we have a mismatch problem:

intel-ipu4 intel-ipu: Moduledata and library version mismatch (20180316 != 20181222)

Does it mean that the blob firmware we have is too old? Are these dates? 2018/03/16 != 2018/12/22 ? The firmware file from RajmohanMani github was indeed pushed on 2018/03/23.

oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: enabling device (0000 -> 0002)
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: Device 0x8a19 (rev: 0x3)
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: physical base address 0x603c000000
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: mapped as: 0x000000003f3674af
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: IPU in secure mode
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: cpd file name: ipu4p_cpd.bin
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: Moduledata and library version mismatch (20180316 != 20181222)
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: Invalid moduledata
oct. 27 18:51:05 xps13 kernel: intel-ipu4 intel-ipu: Failed to validate cpd
oct. 27 18:51:05 xps13 kernel: intel-ipu4: probe of intel-ipu failed with error -22
oct. 27 18:51:05 xps13 kernel: media: Linux media interface: v0.10
oct. 27 18:51:05 xps13 kernel: intel-lpss 0000:00:15.0: enabling device (0000 -> 0002)
oct. 27 18:51:05 xps13 kernel: videodev: Linux video capture interface: v2.00
kitakar5525 commented 3 years ago

Hmm, I can't find a newer version yet... but fortunately, there is a module parameter named fw_version_check: https://github.com/intel/linux-intel-lts/blob/bd16f3c70d1773b1811eeb77fc7ca68f88208d2b/drivers/media/pci/intel/ipu-cpd.c#L49

You can disable the fw version check by setting the parameter to N for now. (https://wiki.archlinux.org/index.php/Kernel_module#Setting_module_options)

typhoe commented 3 years ago

Yeah, sorry I also saw that and already tried it without success (should have posted it immediately but I have no wifi under the 4.19 kernel and had to do another thing and forgot :'( ). Here are the notes I took:

modinfo intel_ipu4p |grep -e description -e version -e parm
description:    Intel ipu pci driver
description:    Intel ipu trace support
description:    Intel ipu fw comm library
srcversion:     533BB7E5866E52F63B9ACCB
parm:           fw_version_check:enable/disable checking firmware version (bool)
parm:           secure_mode_enable:bool
parm:           secure_mode:IPU secure mode enable

So I added the option:

echo "options intel_ipu4p fw_version_check=0"   |sudo tee    /etc/modprobe.d/ipu4.conf

After reboot, here's the log:

lsmod |grep ipu4
intel_ipu4p_psys       57344  0
intel_ipu4p_psys_csslib   139264  1 intel_ipu4p_psys
intel_ipu4p_isys      159744  0
intel_ipu4p_isys_csslib    57344  1 intel_ipu4p_isys
videobuf2_dma_contig    20480  1 intel_ipu4p_isys
v4l2_common            16384  1 intel_ipu4p_isys
videobuf2_v4l2         28672  1 intel_ipu4p_isys
videobuf2_common       53248  2 videobuf2_v4l2,intel_ipu4p_isys
videodev              221184  4 v4l2_common,videobuf2_v4l2,videobuf2_common,intel_ipu4p_isys
media                  53248  2 videodev,intel_ipu4p_isys
intel_ipu4p_mmu        16384  0
intel_ipu4p            90112  3 intel_ipu4p_psys,intel_ipu4p_isys,intel_ipu4p_mmu

journalctl -b
oct. 28 09:02:22 xps13 kernel: intel-ipu4 intel-ipu: physical base address 0x603c000000
oct. 28 09:02:22 xps13 kernel: intel-ipu4 intel-ipu: mapped as: 0x000000007ce7c2e5
oct. 28 09:02:22 xps13 kernel: intel-ipu4 intel-ipu: IPU in secure mode
oct. 28 09:02:22 xps13 kernel: intel-ipu4 intel-ipu: cpd file name: ipu4p_cpd.bin
oct. 28 09:02:22 xps13 kernel: intel-ipu4 intel-ipu: Moduledata version: 20180316, library version: 20181222
oct. 28 09:02:22 xps13 kernel: intel-ipu4 intel-ipu: CSS release: 20181222
oct. 28 09:02:22 xps13 kernel: intel-ipu4 intel-ipu: IPU driver verion 1.0
typhoe commented 3 years ago

Just took another trace because the log was missing some information:

oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: enabling device (0000 -> 0002)
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: Device 0x8a19 (rev: 0x3)
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: physical base address 0x603c000000
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: mapped as: 0x00000000cdaf2aa7
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: IPU in secure mode
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: cpd file name: ipu4p_cpd.bin
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: Moduledata version: 20180316, library version: 20181222
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: CSS release: 20181222
oct. 29 08:15:07 xps13 kernel: intel-ipu4 intel-ipu: IPU driver verion 1.0
oct. 29 08:15:07 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: MMU: 1, allocated page for trash: 0x00000000d31a5ec3
oct. 29 08:15:07 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 29 08:15:07 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: MMU: 0, allocated page for trash: 0x0000000043dab191
oct. 29 08:15:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 29 08:15:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: iova trash buffer for MMUID: 1 is 4286578688
oct. 29 08:15:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 0
oct. 29 08:15:08 xps13 kernel: iommu: Removing device intel-ipu4-isys0 from group 0
oct. 29 08:15:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 29 08:15:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 0
oct. 29 08:15:08 xps13 kernel: iommu: Removing device intel-ipu4-isys0 from group 0
oct. 29 08:15:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 29 08:15:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 0
oct. 29 08:15:08 xps13 kernel: iommu: Removing device intel-ipu4-isys0 from group 0
oct. 29 08:15:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: mmu is not ready yet. skipping.
oct. 29 08:15:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: iova trash buffer for MMUID: 0 is 4286578688
oct. 29 08:15:08 xps13 kernel: iommu: Adding device intel-ipu4-psys0 to group 0
oct. 29 08:15:08 xps13 kernel: intel-ipu4-psys intel-ipu4-psys0: pkg_dir entry count:16
oct. 29 08:15:08 xps13 kernel: intel-ipu4 intel-ipu: Sending BOOT_LOAD to CSE
oct. 29 08:15:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 1
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: isys probe 00000000f5a0aa97 00000000f5a0aa97
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI-2 0 was not initialized!
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI-2 4 was not initialized!
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI2 BE SOC was not initialized!
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI2 BE was not initialized!
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 ISA was not initialized!
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't find adapter
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't find adapter
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't find adapter
oct. 29 08:15:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't find adapter
oct. 29 08:15:08 xps13 kernel: intel-ipu4 intel-ipu: Sending AUTHENTICATE_RUN to CSE
oct. 29 08:15:08 xps13 kernel: intel-ipu4 intel-ipu: expected resp: 0x2, IPC response: 0xc20 
oct. 29 08:15:08 xps13 kernel: intel-ipu4 intel-ipu: CSE authenticate_run failed
oct. 29 08:15:08 xps13 kernel: intel-ipu4-psys intel-ipu4-psys0: FW authentication failed(-5)
oct. 29 08:15:08 xps13 kernel: intel-ipu4-psys intel-ipu4-psys0: FW init failed(-5)
oct. 29 08:15:08 xps13 kernel: iommu: Removing device intel-ipu4-psys0 from group 0
oct. 29 08:15:08 xps13 kernel: intel-ipu4-psys: probe of intel-ipu4-psys0 failed with error -5
oct. 29 08:15:09 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: mmu is not ready yet. skipping.
oct. 29 08:15:09 xps13 kernel: intel-ipu4 intel-ipu: Sending BOOT_LOAD to CSE
oct. 29 08:15:14 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: FW authentication failed
oct. 29 08:15:14 xps13 kernel: intel-ipu4 intel-ipu: Sending BOOT_LOAD to CSE
oct. 29 08:15:14 xps13 kernel: intel-ipu4 intel-ipu: expected resp: 0x1, IPC response: 0x220 
oct. 29 08:15:14 xps13 kernel: intel-ipu4 intel-ipu: CSE boot_load failed
oct. 29 08:15:14 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: FW authentication failed
oct. 29 08:15:14 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: mmu is not ready yet. skipping.
oct. 29 08:15:14 xps13 kernel: intel-ipu4 intel-ipu: Sending BOOT_LOAD to CSE
oct. 29 08:15:19 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: FW authentication failed
oct. 29 08:15:19 xps13 kernel: intel-ipu4 intel-ipu: Sending BOOT_LOAD to CSE
oct. 29 08:15:19 xps13 kernel: intel-ipu4 intel-ipu: expected resp: 0x1, IPC response: 0x220 
oct. 29 08:15:19 xps13 kernel: intel-ipu4 intel-ipu: CSE boot_load failed
oct. 29 08:15:19 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: FW authentication failed
oct. 29 08:15:19 xps13 kernel: intel-ipu4 intel-ipu: Sending BOOT_LOAD to CSE

The last lines are repeating in loop...

typhoe commented 3 years ago

Trying to find a working blob firmware, I took a different approach and tried to find from where the blob firmware could be coming or how to extract it...

The webcam is working under Windows 10, so I looked on Dell website for its "official" driver:

https://www.dell.com/support/home/fr-fr/drivers/driversdetails?driverid=gdd1w&oscode=wt64a&productcode=xps-13-7390-2-in-1-laptop

So I downloaded it and extracted the blob firmware from it

cd ~/webcam/ && wget -c "https://dl.dell.com/FOLDER05745912M/1/Intel-2D-Imaging-Driver_GDD1W_WIN_42.17134.3.10744_A01.EXE"
unzip -j -d ~/webcam/ ~/webcam/Intel-2D-Imaging-Driver_GDD1W_WIN_42.17134.3.10744_A01.EXE Files/x64/cpd_component_signed.bin
sudo cp ~/webcam/cpd_component_signed /usr/lib/firmware/ipu4_cpd_b0.bin

Reboot and test new blob firmware

oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: enabling device (0000 -> 0002)
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: Device 0x8a19 (rev: 0x3)
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: physical base address 0x603c000000
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: mapped as: 0x00000000749f47b4
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: IPU in secure mode
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: cpd file name: ipu4p_cpd.bin
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: Moduledata version: 20190407, library version: 20181222
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: CSS release: 20181222
oct. 30 11:21:07 xps13 kernel: intel-ipu4 intel-ipu: IPU driver verion 1.0
oct. 30 11:21:07 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: MMU: 1, allocated page for trash: 0x0000000027b7a7e2
oct. 30 11:21:07 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 30 11:21:07 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: MMU: 0, allocated page for trash: 0x00000000e60af44d
oct. 30 11:21:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 30 11:21:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: iova trash buffer for MMUID: 1 is 4286578688
oct. 30 11:21:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 0
oct. 30 11:21:08 xps13 kernel: iommu: Removing device intel-ipu4-isys0 from group 0
oct. 30 11:21:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 30 11:21:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 0
oct. 30 11:21:08 xps13 kernel: iommu: Removing device intel-ipu4-isys0 from group 0
oct. 30 11:21:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 30 11:21:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 0
oct. 30 11:21:08 xps13 kernel: iommu: Removing device intel-ipu4-isys0 from group 0
oct. 30 11:21:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu0: mmu is not ready yet. skipping.
oct. 30 11:21:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 0
oct. 30 11:21:08 xps13 kernel: iommu: Removing device intel-ipu4-isys0 from group 0
oct. 30 11:21:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: mmu is not ready yet. skipping.
oct. 30 11:21:08 xps13 kernel: intel-ipu4-mmu intel-ipu4-mmu1: iova trash buffer for MMUID: 0 is 4286578688
oct. 30 11:21:08 xps13 kernel: iommu: Adding device intel-ipu4-psys0 to group 0
oct. 30 11:21:08 xps13 kernel: intel-ipu4-psys intel-ipu4-psys0: pkg_dir entry count:12
oct. 30 11:21:08 xps13 kernel: intel-ipu4 intel-ipu: Sending BOOT_LOAD to CSE
oct. 30 11:21:08 xps13 kernel: iommu: Adding device intel-ipu4-isys0 to group 1
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: isys probe 00000000fdf112c0 00000000fdf112c0
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI-2 0 was not initialized!
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI-2 4 was not initialized!
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI2 BE SOC was not initialized!
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI2 BE was not initialized!
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 ISA was not initialized!
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: creating new i2c subdev for imx355 (address 1a, bus 9)
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: sensor device on CSI port: 4
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't create new i2c subdev
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: creating new i2c subdev for imx355 (address 10, bus 9)
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: sensor device on CSI port: 4
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't create new i2c subdev
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: creating new i2c subdev for imx319 (address 10, bus 8)
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: sensor device on CSI port: 0
oct. 30 11:21:08 xps13 kernel: intel-ipu4 intel-ipu: Sending AUTHENTICATE_RUN to CSE
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't create new i2c subdev
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: creating new i2c subdev for ak7375 (address 0c, bus 9)
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: non camera subdevice
oct. 30 11:21:08 xps13 kernel: intel-ipu4-isys intel-ipu4-isys0: can't create new i2c subdev
oct. 30 11:21:08 xps13 kernel: intel-ipu4-psys intel-ipu4-psys0: psys probe minor: 0

Still not working yet, but the firmware seems to be accepted this time

Moduledata version: 20190407

I don't have anymore the error I had with "Moduledata version: 20180316"

intel-ipu4-isys intel-ipu4-isys0: FW authentication failed

But the initialization is still in error...

intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI-2 0 was not initialized! <...>

Any idea to go further?

kbingham commented 3 years ago

Still not working yet, but the firmware seems to be accepted this time

Moduledata version: 20190407

I don't have anymore the error I had with "Moduledata version: 20180316"

intel-ipu4-isys intel-ipu4-isys0: FW authentication failed

But the initialization is still in error...

intel-ipu4-isys intel-ipu4-isys0: Entity type for entity Intel IPU4 CSI-2 0 was not initialized! <...>

Any idea to go further?

Actually, you can ignore the "Entity type for entity %s was not initialised" string. That's only a warning, not an error. It comes from here: https://elixir.bootlin.com/linux/latest/source/drivers/media/mc/mc-device.c#L615

I'd say there's a chance it's all loaded successfully, so you should explore what devices have been created, and how the media graph looks.

typhoe commented 3 years ago

Oh nice! I just launched "cheese" but it didn't detect a webcam... so I assumed it was still failing!

I'll reboot on kernel 4.19 and look a little more into it then in the afternoon!

kbingham commented 3 years ago

You won't be able to run cheese directly. The IPU4 is a complex camera device, you'll need to configure the pipelines to handle debayering and managing the ISP. That's what libcamera is for.

As yet the IPU4 is not supported by libcamera, but if you can get all of the drivers working, then you can start putting a pipeline handler together from the IPU3 support.

When you have that, then you'll be able to capture using qcam, or if you want to use cheese, you'd need to use the v4l2-adaptation layer in libcamera. Best to just work towards getting qcam displaying something first.

There is a strong possibility that you'll have to handle the ACPI bridging for your platform to the driver as is being handled in https://github.com/linux-surface/linux-surface/issues/91 but I can't confirm that without seeing the driver you're working on.

On that note in fact, I think I saw you're running a 4.x kernel. You will need to get that driver running on a 5.x kernel as there are media options that are required that were only introduced in 5.x.

typhoe commented 3 years ago

Well... I really willing to get support for this device, and I am trying to do what I can but there, we seem to reach my limits!

  1. I don't know C so it will be hard for me to "touch" the code...
  2. Porting the driver from 4.19 to 5.x: I have absolutely no idea how to do that... (I compiled that kernel version because that was the only one seemingly supported on the intel-lts repo as suggested by kitakar5525 in a previous post)

@kitakar5525 said:

but I guess porting the driver to the latest stable version is still a hard work. So, first I'd like to see that someone build the whole kernel then see if the Intel's v4.19 kernel can boot on your machines. It may be highly possible that Ice Lake gen machines don't boot on upstream v4.19, but Intel may have added some patches into their v4.19

Well, it seems I managed to get the IPU4 working on intel's v4.19 Is there more tests/commands I should run to offer debug?

If you @kbingham or someone else can points me to detailed instructions, I will gladly test anything you want me to test, but I'm sorry my knowledge is limited...

And anyway, already big thank you for taking the time to give these answers!

kbingham commented 3 years ago

Intel CPUs will boot just fine on a mainline kernel, I can be quite sure of that.

Can you run my libcamera-info script with your drivers loaded please? https://gist.github.com/kbingham/be28a67831c26158bdb4ab2a48e707d4

I've just updated this script to also generate the media-graph diagrams as png files, which should be easy to upload here to visualise how the system is connected (if it's worked).

That should give us some visibility of what has / hasn't loaded. Also an attachment of the output from dmesg might be useful too.

The aim of the next exercise will be getting the drivers that you have loaded, and adding them to a 5.9, or 5.10-rcX mainline branch, then submitting these to be integrated into the kernel (most likely) under the staging directory.

typhoe commented 3 years ago

Thank you for the script.

Note (for your script header help): it needs to be run as root for media-ctl to output anything and dot seems to be from package graphviz (at least in Manjaro)

Here are the outputs libcamera-info.log

v4l-subdev0: Intel IPU4 CSI-2 0
v4l-subdev1: Intel IPU4 CSI-2 4
v4l-subdev2: Intel IPU4 TPG 0
v4l-subdev3: Intel IPU4 TPG 1
v4l-subdev4: Intel IPU4 CSI2 BE SOC
v4l-subdev5: Intel IPU4 CSI2 BE
v4l-subdev6: Intel IPU4 ISA
video0: Intel IPU4 CSI-2 0 capture 0
video1: Intel IPU4 CSI-2 0 capture 1
video2: Intel IPU4 CSI-2 0 capture 2
video3: Intel IPU4 CSI-2 0 capture 3
video4: Intel IPU4 CSI-2 0 meta
video5: Intel IPU4 CSI-2 4 capture 0
video6: Intel IPU4 CSI-2 4 capture 1
video7: Intel IPU4 CSI-2 4 capture 2
video8: Intel IPU4 CSI-2 4 capture 3
video9: Intel IPU4 CSI-2 4 meta
video10: Intel IPU4 TPG 0 capture
video11: Intel IPU4 TPG 1 capture
video12: Intel IPU4 BE SOC capture 0
video13: Intel IPU4 BE SOC capture 1
video14: Intel IPU4 BE SOC capture 2
video15: Intel IPU4 BE SOC capture 3
video16: Intel IPU4 BE SOC capture 4
video17: Intel IPU4 BE SOC capture 5
video18: Intel IPU4 BE SOC capture 6
video19: Intel IPU4 BE SOC capture 7
video20: Intel IPU4 CSI2 BE capture
video21: Intel IPU4 ISA capture
video22: Intel IPU4 ISA config
video23: Intel IPU4 ISA 3A stats
video24: Intel IPU4 ISA scaled capture
media0: ipu4p
/dev/media0:
Media controller API version 4.19.151

Media device information
------------------------
driver          intel-ipu4-isys
model           ipu4p
serial          
bus info        pci:intel-ipu
hw revision     0x0
driver version  4.19.151

Device topology
- entity 1: Intel IPU4 CSI-2 0 (6 pads, 41 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
    pad0: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
    pad1: Source
        [fmt:Y10_1X10/4096x3072 field:none]
        -> "Intel IPU4 CSI-2 0 capture 0":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad2: Source
        [fmt:unknown/0x0]
        -> "Intel IPU4 CSI-2 0 capture 1":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad3: Source
        [fmt:unknown/0x0]
        -> "Intel IPU4 CSI-2 0 capture 2":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad4: Source
        [fmt:unknown/0x0]
        -> "Intel IPU4 CSI-2 0 capture 3":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad5: Source
        -> "Intel IPU4 CSI-2 0 meta":0 []

- entity 8: Intel IPU4 CSI-2 0 capture 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
    pad0: Sink
        <- "Intel IPU4 CSI-2 0":1 []

- entity 14: Intel IPU4 CSI-2 0 capture 1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video1
    pad0: Sink
        <- "Intel IPU4 CSI-2 0":2 []

- entity 20: Intel IPU4 CSI-2 0 capture 2 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video2
    pad0: Sink
        <- "Intel IPU4 CSI-2 0":3 []

- entity 26: Intel IPU4 CSI-2 0 capture 3 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
    pad0: Sink
        <- "Intel IPU4 CSI-2 0":4 []

- entity 32: Intel IPU4 CSI-2 0 meta (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video4
    pad0: Sink
        <- "Intel IPU4 CSI-2 0":5 []

- entity 38: Intel IPU4 CSI-2 4 (6 pads, 41 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev1
    pad0: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
    pad1: Source
        [fmt:Y10_1X10/4096x3072 field:none]
        -> "Intel IPU4 CSI-2 4 capture 0":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad2: Source
        [fmt:unknown/0x0]
        -> "Intel IPU4 CSI-2 4 capture 1":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad3: Source
        [fmt:unknown/0x0]
        -> "Intel IPU4 CSI-2 4 capture 2":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad4: Source
        [fmt:unknown/0x0]
        -> "Intel IPU4 CSI-2 4 capture 3":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]
    pad5: Source
        -> "Intel IPU4 CSI-2 4 meta":0 []

- entity 45: Intel IPU4 CSI-2 4 capture 0 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video5
    pad0: Sink
        <- "Intel IPU4 CSI-2 4":1 []

- entity 51: Intel IPU4 CSI-2 4 capture 1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video6
    pad0: Sink
        <- "Intel IPU4 CSI-2 4":2 []

- entity 57: Intel IPU4 CSI-2 4 capture 2 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video7
    pad0: Sink
        <- "Intel IPU4 CSI-2 4":3 []

- entity 63: Intel IPU4 CSI-2 4 capture 3 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video8
    pad0: Sink
        <- "Intel IPU4 CSI-2 4":4 []

- entity 69: Intel IPU4 CSI-2 4 meta (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video9
    pad0: Sink
        <- "Intel IPU4 CSI-2 4":5 []

- entity 75: Intel IPU4 TPG 0 (1 pad, 10 links)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
    pad0: Source
        [fmt:SBGGR8_1X8/4096x3072 field:none]
        -> "Intel IPU4 TPG 0 capture":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]

- entity 77: Intel IPU4 TPG 0 capture (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video10
    pad0: Sink
        <- "Intel IPU4 TPG 0":0 []

- entity 83: Intel IPU4 TPG 1 (1 pad, 10 links)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev3
    pad0: Source
        [fmt:SBGGR8_1X8/4096x3072 field:none]
        -> "Intel IPU4 TPG 1 capture":0 []
        -> "Intel IPU4 CSI2 BE":0 []
        -> "Intel IPU4 CSI2 BE SOC":0 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":1 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":2 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":3 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":4 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":5 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":6 [DYNAMIC]
        -> "Intel IPU4 CSI2 BE SOC":7 [DYNAMIC]

- entity 85: Intel IPU4 TPG 1 capture (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video11
    pad0: Sink
        <- "Intel IPU4 TPG 1":0 []

- entity 91: Intel IPU4 CSI2 BE SOC (16 pads, 88 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev4
    pad0: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad1: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad2: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad3: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad4: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad5: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad6: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad7: Sink
        [fmt:Y10_1X10/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 0":4 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":1 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":2 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":3 [DYNAMIC]
        <- "Intel IPU4 CSI-2 4":4 [DYNAMIC]
        <- "Intel IPU4 TPG 0":0 [DYNAMIC]
        <- "Intel IPU4 TPG 1":0 [DYNAMIC]
    pad8: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 0":0 [DYNAMIC]
    pad9: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 1":0 [DYNAMIC]
    pad10: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 2":0 [DYNAMIC]
    pad11: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 3":0 [DYNAMIC]
    pad12: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 4":0 [DYNAMIC]
    pad13: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 5":0 [DYNAMIC]
    pad14: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 6":0 [DYNAMIC]
    pad15: Source
        [fmt:unknown/0x0
         crop:(0,0)/0x0]
        -> "Intel IPU4 BE SOC capture 7":0 [DYNAMIC]

- entity 108: Intel IPU4 BE SOC capture 0 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video12
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":8 [DYNAMIC]

- entity 114: Intel IPU4 BE SOC capture 1 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video13
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":9 [DYNAMIC]

- entity 120: Intel IPU4 BE SOC capture 2 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video14
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":10 [DYNAMIC]

- entity 126: Intel IPU4 BE SOC capture 3 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video15
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":11 [DYNAMIC]

- entity 132: Intel IPU4 BE SOC capture 4 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video16
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":12 [DYNAMIC]

- entity 138: Intel IPU4 BE SOC capture 5 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video17
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":13 [DYNAMIC]

- entity 144: Intel IPU4 BE SOC capture 6 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video18
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":14 [DYNAMIC]

- entity 150: Intel IPU4 BE SOC capture 7 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video19
    pad0: Sink
        <- "Intel IPU4 CSI2 BE SOC":15 [DYNAMIC]

- entity 156: Intel IPU4 CSI2 BE (2 pads, 12 links)
              type V4L2 subdev subtype Unknown flags 0
              device node name /dev/v4l-subdev5
    pad0: Sink
        [fmt:SBGGR14_1X14/4096x3072 field:none]
        <- "Intel IPU4 CSI-2 0":1 []
        <- "Intel IPU4 CSI-2 0":2 []
        <- "Intel IPU4 CSI-2 0":3 []
        <- "Intel IPU4 CSI-2 0":4 []
        <- "Intel IPU4 CSI-2 4":1 []
        <- "Intel IPU4 CSI-2 4":2 []
        <- "Intel IPU4 CSI-2 4":3 []
        <- "Intel IPU4 CSI-2 4":4 []
        <- "Intel IPU4 TPG 0":0 []
        <- "Intel IPU4 TPG 1":0 []
    pad1: Source
        [fmt:SBGGR14_1X14/4096x3072 field:none
         crop:(0,0)/4096x3072]
        -> "Intel IPU4 CSI2 BE capture":0 []
        -> "Intel IPU4 ISA":0 []

- entity 159: Intel IPU4 CSI2 BE capture (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video20
    pad0: Sink
        <- "Intel IPU4 CSI2 BE":1 []

- entity 165: Intel IPU4 ISA (5 pads, 5 links)
              type V4L2 subdev subtype Unknown flags 0
              device node name /dev/v4l-subdev6
    pad0: Sink
        [fmt:SBGGR14_1X14/4096x3072 field:none]
        <- "Intel IPU4 CSI2 BE":1 []
    pad1: Source
        [fmt:SBGGR12_1X12/4096x3072 field:none
         crop:(0,0)/4096x3072]
        -> "Intel IPU4 ISA capture":0 []
    pad2: Sink
        [fmt:FIXED/0x0]
        <- "Intel IPU4 ISA config":0 []
    pad3: Source
        [fmt:FIXED/0x0]
        -> "Intel IPU4 ISA 3A stats":0 []
    pad4: Source
        [fmt:SBGGR12_1X12/4096x3072 field:none
         crop:(0,0)/4096x3072
         compose:(0,0)/4096x3072]
        -> "Intel IPU4 ISA scaled capture":0 []

- entity 171: Intel IPU4 ISA capture (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video21
    pad0: Sink
        <- "Intel IPU4 ISA":1 []

- entity 177: Intel IPU4 ISA config (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video22
    pad0: Source
        -> "Intel IPU4 ISA":2 []

- entity 183: Intel IPU4 ISA 3A stats (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video23
    pad0: Sink
        <- "Intel IPU4 ISA":3 []

- entity 189: Intel IPU4 ISA scaled capture (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video24
    pad0: Sink
        <- "Intel IPU4 ISA":4 []

and the png produced: media0-graph

dmesg output: dmesg.log

kbingham commented 3 years ago

Thanks. Seeing the IPU4 media graph is quite interesting. It also confirms my suspicions that I would expect a similar bridging mechanism to be required as is being developed for the IPU3 to support connecting the ACPI sensors to the IPU4.

Perhaps the work being done there will be re-usable, but we won't know until we start seeing a real IPU4 driver heading towards the kernel itself anyway.

typhoe commented 3 years ago

Great then!

Is there anything I can do to help porting the driver to kernel v5.{8,9} now?