All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Pawel Osciak <pawel@osciak.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFCv1 PATCH 4/6] videobuf2-core: fill in length field for multiplanar buffers.
Date: Fri, 21 Sep 2012 18:47:54 +0200	[thread overview]
Message-ID: <505C9A3A.4030500@samsung.com> (raw)
In-Reply-To: <201209211823.03825.hverkuil@xs4all.nl>

On 09/21/2012 06:23 PM, Hans Verkuil wrote:
> On Fri September 21 2012 18:13:20 Sylwester Nawrocki wrote:
>> Hi Hans,
>>
>> On 09/19/2012 04:37 PM, Hans Verkuil wrote:
>>> From: Hans Verkuil <hans.verkuil@cisco.com>
>>>
>>> length should be set to num_planes in __fill_v4l2_buffer(). That way the
>>> caller knows how many planes there are in the buffer.
>>>
>>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> I think this would break VIDIOC_CREATE_BUFS. We need per buffer num_planes.
>> Consider a use case where device is streaming with 2-planar pixel format
>> and we invoke VIDIOC_CREATE_BUFS with single-planar format. On a single 
>> queue there will be buffers with different number of planes. The number of 
>> planes information must be attached to a buffer, otherwise VIDIOC_QUERYBUF 
>> won't work.
> 
> That's a very good point and one I need to meditate on.
> 
> However, your comment applies to patch 1/6, not to this one.
> This patch is about whether or not the length field of v4l2_buffer should
> be filled in with the actual number of planes used by that buffer or not.

Yes, right. Sorry, I was editing response to multiple patches from this
series and have mixed things a bit. I agree that it is logical and expected
to update struct v4l2_buffer for user space.

I have spent some time on this series, and even prepared a patch for s5p-mfc,
as it relies on num_planes being in struct vb2_buffer. But then a realized
there could be buffers with distinct number of planes an a single queue.

Regards,
Sylwester


  reply	other threads:[~2012-09-21 16:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 14:37 [RFCv1 PATCH 0/6] vb2 & multiplanar fixes/changes Hans Verkuil
2012-09-19 14:37 ` [RFCv1 PATCH 1/6] videobuf2-core: move num_planes from vb2_buffer to vb2_queue Hans Verkuil
2012-09-19 14:37   ` [RFCv1 PATCH 2/6] videobuf2-core: use vb2_queue in __verify_planes_array Hans Verkuil
2012-09-19 16:55     ` Sylwester Nawrocki
2012-09-19 14:37   ` [RFCv1 PATCH 3/6] videobuf2-core: move plane verification out of __fill_v4l2_buffer Hans Verkuil
2012-09-19 16:55     ` Sylwester Nawrocki
2012-09-20  6:28       ` Hans Verkuil
2012-09-19 14:37   ` [RFCv1 PATCH 4/6] videobuf2-core: fill in length field for multiplanar buffers Hans Verkuil
2012-09-21  9:54     ` Hans Verkuil
2012-09-21 16:13     ` Sylwester Nawrocki
2012-09-21 16:23       ` Hans Verkuil
2012-09-21 16:47         ` Sylwester Nawrocki [this message]
2012-09-21 16:54           ` Hans Verkuil
2012-09-24 13:52             ` Hans Verkuil
2012-09-19 14:37   ` [RFCv1 PATCH 5/6] v4l2-ioctl,c: handle PREPARE_BUF like QUERYBUF Hans Verkuil
2012-09-19 14:37   ` [RFCv1 PATCH 6/6] DocBook: various updates w.r.t. v4l2_buffer and multiplanar Hans Verkuil
2012-09-21 16:37     ` Sylwester Nawrocki
2012-09-19 15:18   ` [RFCv1 PATCH 1/6] videobuf2-core: move num_planes from vb2_buffer to vb2_queue Sylwester Nawrocki
2012-09-19 15:28     ` Hans Verkuil
2012-09-19 16:54       ` Sylwester Nawrocki

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=505C9A3A.4030500@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=pawel@osciak.com \
    /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.