Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Tomasz Figa <tfiga@chromium.org>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] media/doc: Allow sizeimage to be set by v4l clients
Date: Thu, 16 May 2019 12:40:45 +0200
Message-ID: <cd7baea0-3893-7471-2e86-9cc6730843e3@xs4all.nl> (raw)
In-Reply-To: <CAAFQd5DBUUAPV0_=thmRBTFqJE+Nd4LZRzZE20rR0D8d7Cjz5g@mail.gmail.com>

On 5/16/19 11:56 AM, Tomasz Figa wrote:
> On Thu, May 16, 2019 at 5:09 PM Stanimir Varbanov
> <stanimir.varbanov@linaro.org> wrote:
>>
>> Hi Hans,
>>
>> On 5/14/19 11:54 AM, Hans Verkuil wrote:
>>> Hi Stanimir,
>>>
>>> On 4/12/19 5:59 PM, Stanimir Varbanov wrote:
>>>> This changes v4l2_pix_format and v4l2_plane_pix_format sizeimage
>>>> field description to allow v4l clients to set bigger image size
>>>> in case of variable length compressed data.
>>>
>>> I've been reconsidering this change. The sizeimage value in the format
>>> is the minimum size a buffer should have in order to store the data of
>>> an image of the width and height as described in the format.
>>>
>>> But there is nothing that prevents userspace from calling VIDIOC_CREATEBUFS
>>> instead of VIDIOC_REQBUFS to allocate larger buffers.
>>
>> Sometimes CREATEBUFS cannot be implemented for a particular fw/hw.
>>
>> CC: Tomasz for his opinion.
>>
> 
> Thanks Stanimir.
> 
> Actually, if called at the same point in time as REQBUFS, CREATE_BUFS
> doesn't really differ to much, except that it gives more flexibility
> for allocating the buffers and that shouldn't depend on any specific
> features of hardware or firmware.
> 
> Actually, one could even allocate any buffers any time regardless of
> hardware/firmware support, but the ability to use such buffers would
> actually depend on such.
> 
> Perhaps we should just let the drivers return -EBUSY from CREATE_BUFS
> if called at the wrong time?
> 
>>>
>>> So do we really need this change?
>>>
> 
> Yes, because this has worked like this all the time, but it was just
> not documented. Disallowing this would break quite a bit of existing
> userspace.

Which drivers allow this today? I think that would be useful information
for the commit log of a v4 of this patch.

Regards,

	Hans

> 
> Best regards,
> Tomasz
> 
>>> The more I think about this, the more uncomfortable I become with this change.
>>>
>>> Regards,
>>>
>>>       Hans
>>>
>>
>> <cut>
>>
>> --
>> regards,
>> Stan


  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 15:59 Stanimir Varbanov
2019-05-02 12:55 ` Mauro Carvalho Chehab
2019-05-02 13:16   ` Hans Verkuil
2019-05-02 13:29     ` Mauro Carvalho Chehab
2019-05-07 16:54       ` Stanimir Varbanov
2019-05-14  8:54 ` Hans Verkuil
2019-05-14 12:19   ` Nicolas Dufresne
2019-05-14 12:23     ` Hans Verkuil
2019-05-16  8:09   ` Stanimir Varbanov
2019-05-16  9:56     ` Tomasz Figa
2019-05-16 10:40       ` Hans Verkuil [this message]
2019-05-16 15:09         ` Stanimir Varbanov

Reply instructions:

You may reply publically 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=cd7baea0-3893-7471-2e86-9cc6730843e3@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.org \
    /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

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org linux-media@archiver.kernel.org
	public-inbox-index linux-media


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/ public-inbox