From: Hans Verkuil <hverkuil@xs4all.nl>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: platform: pxa_camera: convert to vb2
Date: Fri, 11 Mar 2016 17:07:45 +0100 [thread overview]
Message-ID: <56E2ED51.8050400@xs4all.nl> (raw)
In-Reply-To: <87oaal81ls.fsf@belgarion.home>
On 03/11/2016 04:40 PM, Robert Jarzmik wrote:
> Hans Verkuil <hverkuil@xs4all.nl> writes:
>
>> On 03/11/2016 02:41 PM, Robert Jarzmik wrote:
>>> Hans Verkuil <hverkuil@xs4all.nl> writes:
>> One area where I would like to see some helper functions is with respect to
>> format/media bus processing. I played with this a little bit but it is surprisingly
>> hard to do. A lot of devices have all sorts of weird and wonderful exceptions
>> that make this quite problematic.
>
> I'm also worried about the initial probing, where the subdevice, be that an I2C
> sensor or something else has to be available, ie. the v4l2_async_notifier and
> its implications.
>
>>> Ah, that's a special case we need to discuss.
>>> I've written in the commit message a chapter about a "special port of this
>>> code". This is it.
>>>
>>> This usecase is when a user does the following :
>>> - set format to 1280x1024, RGB565
>>> - REQBUF for MMAP buffers
>>> - QBUF, capture, DQBUF
>>>
>>> - then set format to 640x480, RGB565
>>> => here the new format fits in the previously allocated video buffer
>>> - QBUF
>>> => the test in pxa_vb2_prepare() detects this, and calls pxa_buffer_init()
>>> again
>>>
>>> Now if this usecase is impossible, then I'll do as you say to simplify the code
>>> : use icd->sizeimage, remove the code in pxa_vb2_prepare(), etc ...
>>
>> Does this actually work with soc-camera? As far as I can see soc-camera returns
>> -EBUSY in soc_camera_s_fmt_vid_cap() if you attempt to change the format while
>> streaming.
>
> It's not "while streaming" in the described usecase, it's after streaming is
> finished actually. I should have added in the third dash VIDIOC_STREAMON before
> "capture" and VIDIOC_STREAMOFF after DQBUF. I think it's working, even if I had
> not tried recently. I certainly don't care that much about the usecase, and I
> won't feel sad dropping it :)
Ah, OK. This use-case will probably work with soc-camera.
What I would prefer is to remove the feature for this vb2 conversion and the
following soc-camera removal. If you decide that the feature is desirable, then
add it back in a final patch.
The reason for this is that it is much easier for me to review this once the driver
is no longer dependent on soc-camera. I don't have to jump from the pxa driver to
the soc-camera framework and back just to trace if there are no corner cases that
were forgotten.
This feature is unusual (very few drivers support it) and so I would like to take
a close look at it, ensuring everything is done correctly.
Regards,
Hans
next prev parent reply other threads:[~2016-03-11 16:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 17:17 [PATCH] media: platform: pxa_camera: convert to vb2 Robert Jarzmik
2016-03-11 12:43 ` Hans Verkuil
2016-03-11 13:41 ` Robert Jarzmik
2016-03-11 14:00 ` Hans Verkuil
2016-03-11 15:40 ` Robert Jarzmik
2016-03-11 16:07 ` Hans Verkuil [this message]
2016-08-02 18:03 ` Robert Jarzmik
2016-08-03 7:39 ` Hans Verkuil
2016-08-03 17:55 ` Robert Jarzmik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56E2ED51.8050400@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.