[libcamera-devel] Need help with IPU6 vs SimplePipeLine handler

Hans de Goede hdegoede at redhat.com
Sun Oct 1 14:39:41 CEST 2023


Hi again,

On 10/1/23 14:34, Hans de Goede wrote:
> Hi,
> 
> On 10/1/23 11:32, Laurent Pinchart wrote:
>> Hi Hans,
>>
>> On Sun, Oct 01, 2023 at 11:14:33AM +0200, Hans de Goede via libcamera-devel wrote:
>>> Hi All,
>>>
>>> I have raw bayer capture working from the cmdline, but after this naive patch:
>>>
>>> --- a/src/libcamera/pipeline/simple/simple.cpp
>>> +++ b/src/libcamera/pipeline/simple/simple.cpp
>>> @@ -196,6 +196,7 @@ static const SimplePipelineInfo supportedDevices[] = {
>>>  	{ "mxc-isi", {} },
>>>  	{ "qcom-camss", {} },
>>>  	{ "sun6i-csi", {} },
>>> +	{ "intel-ipu6", {} },
>>>  };
>>>  
>>>  } /* namespace */
>>>
>>>
>>> qcam still does not see the camera. I believe that this is likely caused
>>> by the CSI2-receiver on the IPU6 not being so simple. It appears to have
>>> some sort of cross-switch giving it a whole bunch of different inputs
>>> and outputs and we need to set that up to connect the CSI data from the sensor
>>> to one of the inputs and likewise make it dump the raw bayer data into
>>> /dev/video#. 
>>
>> Could you provide the output of media-ctl --print-dot ? It will help
>> visualize the topology, the text representation is a monster.
> 
> Attached.
> 
> On 10/1/23 12:48, Andrey Konovalov wrote:
>> Also if you prepend your qcam command with LIBCAMERA_LOG_LEVELS=SimplePipeline:DEBUG
>> you will see how SimplePipeline handler is trying to configure the pipeline.
> 
> LIBCAMERA_LOG_LEVELS=SimplePipeline:DEBUG qcam
> does not log anything other then the libcamera version.
> 
> "LIBCAMERA_LOG_LEVELS=*:DEBUG qcam" logs:
> 
> [0:15:16.743042795] [5307]  INFO IPAManager ipa_manager.cpp:143 libcamera is not installed. Adding '/home/hans/projects/libcamera/redhat-linux-build/src/ipa' to the IPA search path
> [0:15:16.763804299] [5307] DEBUG IPAModule ipa_module.cpp:334 ipa_ipu3.so: IPA module /home/hans/projects/libcamera/redhat-linux-build/src/ipa/ipu3/ipa_ipu3.so is signed
> [0:15:16.763909675] [5307] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/home/hans/projects/libcamera/redhat-linux-build/src/ipa/ipu3/ipa_ipu3.so'
> [0:15:16.764150556] [5307] DEBUG IPAModule ipa_module.cpp:334 ipa_ipu3.so: IPA module /usr/lib64/libcamera/ipa_ipu3.so is signed
> [0:15:16.764202449] [5307] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/lib64/libcamera/ipa_ipu3.so'
> [0:15:16.764268394] [5307]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+55-06d972b4
> [0:15:16.764738627] [5319] DEBUG Camera camera_manager.cpp:69 Starting camera manager
> [0:15:16.781475753] [5319] DEBUG DeviceEnumerator device_enumerator.cpp:224 New media device "intel-ipu6" created from /dev/media0
> [0:15:16.781498544] [5319] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 36 missing dependencies
> [0:15:16.788819335] [5319] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
> [0:15:16.788839378] [5319] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media0: intel-ipu6
> [0:15:16.789012574] [5319] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerIPU3'
> [0:15:16.789027627] [5319] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerUVC'
> 
> Hmm, this makes me wonder if it is even trying to use the SimplePipelineHandler at all ?

p.s.

I wonder if this may be caused by the ov2740 sensor driver not having all necessary features?

Regards,

Hans



>>> Specifically I need to run the following script before capturing raw
>>> bayer from /dev/video0 :
>>>
>>> ```
>>> #!/bin/bash
>>>
>>> MDEV=/dev/media0
>>>
>>> media-ctl -d $MDEV -l "\"ov2740 19-0036\":0 -> \"Intel IPU6 CSI2 1\":0[1]"
>>>
>>> media-ctl -d $MDEV -V "\"ov2740 19-0036\":0 [fmt:SGRBG10/1932x1092]"
>>> media-ctl -d $MDEV -V "\"Intel IPU6 CSI2 1\":0 [fmt:SGRBG10/1932x1092]"
>>> media-ctl -d $MDEV -V "\"Intel IPU6 CSI2 1\":1 [fmt:SGRBG10/1932x1092]"
>>>
>>> media-ctl -d $MDEV -l "\"ov2740 19-0036\":0 -> \"Intel IPU6 CSI2 1\":0[1]"
>>> media-ctl -d $MDEV -l "\"Intel IPU6 CSI2 1\":1 -> \"Intel IPU6 ISYS Capture 0\":0[5]"
>>> ```
>>>
>>> Full media-ctl -p output below. So I guess that even without the ISP IPU6
>>> is probably going to need its own pipelinehandler, or am I missing something here?
>>
>> [snip]



More information about the libcamera-devel mailing list