lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6d5fe1fc-1126-9764-5f72-836369f7874c@i2se.com>
Date:   Sat, 26 Feb 2022 18:18:14 +0100
From:   Stefan Wahren <stefan.wahren@...e.com>
To:     Jean-Michel Hautbois <jeanmichel.hautbois@...asonboard.com>
Cc:     dave.stevenson@...pberrypi.com, devicetree@...r.kernel.org,
        kernel-list@...pberrypi.com, laurent.pinchart@...asonboard.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
        lukasz@...y.st, mchehab@...nel.org, naush@...pberrypi.com,
        robh@...nel.org, tomi.valkeinen@...asonboard.com,
        bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH v5 00/11] Add support for BCM2835 camera interface
 (unicam)

Hi Jean-Michel,

Am 20.02.22 um 15:30 schrieb Jean-Michel Hautbois:
> Hi Stefan,
>
> On 16/02/2022 21:57, Stefan Wahren wrote:
>> Hi Jean-Michel,
>>
>> Am 08.02.22 um 16:50 schrieb Jean-Michel Hautbois:
>>> Hello !
>>>
>>> ...
>>>
>>> In order to properly configure the media pipeline, it is needed to call
>>> the usual ioctls, and configure routing in order to send the embedded
>>> data from the sensor to the "unicam-embedded" device node :
>>>
>>> ```
>>> media=0
>>> media-ctl -d${media} -l "'imx219 2-0010':0->'unicam-subdev':0 [1]"
>>> media-ctl -d${media} -l "'unicam-subdev':1->'unicam-image':0 [1]"
>>> media-ctl -d${media} -v -R "'unicam-subdev' [0/0->1/0[1],0/1->2/0[1]]"
>>> media-ctl -d${media} -V "'imx219 2-0010':0/0
>>> [fmt:SRGGB10_1X10/3280x2464 field:none]"
>>> v4l2-ctl -d0 --set-fmt-video
>>> width=3280,height=2464,pixelformat='pRAA',field=none
>>> media-ctl -d${media} -v -V "'imx219 2-0010':0/1
>>> [fmt:METADATA_8/16384x1 field:none]"
>>> media-ctl -d${media} -p
>>> ```
>>
>> i tried to test the unicam driver on a Raspberry Pi 4 with the imx219
>> camera (based on 5.17-rc4). The unicam & imx219 driver probes and
>> /dev/video0 is created.
>>
>> If a execute the first media-ctl command, it complains with invalid
>> argument 22. Is there a more fool-proof variant to configure this (a
>> script or something else)? I never used the unicam driver before.
>>
>> Here is the output of
>>
>> $ mediactl -d0 -p
>>
>
> Based on your output, I suppose the issue is the naming of the imx219
> media entity ('imx219 2-0010' vs 'imx219 5-0010').
> You could add a '-v' in the line to help you I suppose.
>
> A more bullet-proof version of the commands is certainly doable, not
> sure how though as I would not like to rewrite a libcamera-like
> command ;-).

Today i had a little bit time and manage to get the commands working.

After running the yavta command, the kernel put the following:

[  405.908674] cma: cma_alloc: linux,cma: alloc failed, req-size: 2484
pages, ret: -12
[  405.908695] unicam fe801000.csi: dma alloc of size 10174464 failed

As per default the CMA size with mainline DTB is 64 MB. After that i
increase the value to 256 MB and the issue disappeared. Maybe this is
something which could be integrated into the overlay. But at least a
note about this in the cover letter of the next version of this series
would be nice.

Best regards


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ