intel / ipu6-drivers

GNU General Public License v2.0
160 stars 51 forks source link

OVTI02C1 sensor on Latiture 7440 #144

Closed gcomes closed 1 year ago

gcomes commented 1 year ago

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.

gcomes commented 1 year ago

I managed to advance, I report here to help other users in the same situation.

The build error for icamerasrc_slim_api is due to commit fe733e7b98fc2c9824abe8b451182af38470d659. After reverting such commit it is possible to compile icamerasrc

When I run the test the command:

gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink

I get the error that libia_mkn.so needs glibc 2.34 (leap 15.5 has glibc 2.31). I unpacked glibc 2.37 from the tumbleweed rpm in the directory /glibc and using the command:

/glibc/ld-linux-x86-64.so.2 --library-path /glibc gst-launch-1.0 --gst-plugin-load=/usr/lib64/gstreamer-1.0/libgsticamerasrc.so icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink

I was able to get the video from the camera. Next step is to install v4l2loopback and v4l2-relayd. After I did that I was able to run ffplay /dev/video0 but ffplay showed only a black window. It turns out v4l2loopback needs to be patched: the patch 0005 and 0006 from: https://git.launchpad.net/ubuntu/+source/v4l2loopback/tree/debian/patches plus: https://github.com/umlaeute/v4l2loopback/pull/543

With that I can finally get the camera work.

There is only one minor issue. I cannot use cheese, it gives me the error: Device wants 2:0:0:0 colorimetry.

If there is a way to fix such problem, please share your knowledge.