From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Pawel Osciak <pawel@osciak.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
LMML <linux-media@vger.kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [REVIEWv7 PATCH 01/12] videobuf2-core.h: improve documentation
Date: Wed, 26 Nov 2014 21:48:04 +0200 [thread overview]
Message-ID: <1849257.LYuFVs0uYE@avalon> (raw)
In-Reply-To: <CAMm-=zADQpwW8+A24vWo0hAS+h=5eqGVsKQfn4ApEiL5czxSgA@mail.gmail.com>
Hi Hans,
Thank you for the patch.
On Sunday 23 November 2014 20:01:22 Pawel Osciak wrote:
> On Tue, Nov 18, 2014 at 9:50 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> > From: Hans Verkuil <hans.verkuil@cisco.com>
> >
> > Document that drivers can access/modify the buffer contents in buf_prepare
> > and buf_finish. That was not clearly stated before.
> >
> > Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>
> Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> > ---
> >
> > include/media/videobuf2-core.h | 32 +++++++++++++++++---------------
> > 1 file changed, 17 insertions(+), 15 deletions(-)
> >
> > diff --git a/include/media/videobuf2-core.h
> > b/include/media/videobuf2-core.h index 6ef2d01..70ace7c 100644
> > --- a/include/media/videobuf2-core.h
> > +++ b/include/media/videobuf2-core.h
> > @@ -270,22 +270,24 @@ struct vb2_buffer {
> >
> > * queue setup from completing successfully;
> > optional.
> > * @buf_prepare: called every time the buffer is queued from
> > userspace
> > * and from the VIDIOC_PREPARE_BUF ioctl; drivers may
> >
> > - * perform any initialization required before each
> > hardware - * operation in this callback; drivers that
> > support - * VIDIOC_CREATE_BUFS must also validate the
> > buffer size; - * if an error is returned, the buffer
> > will not be queued - * in driver; optional.
> > + * perform any initialization required before each
> > + * hardware operation in this callback; drivers can
> > + * access/modify the buffer here as it is still
> > synced for + * the CPU; drivers that support
> > VIDIOC_CREATE_BUFS must + * also validate the buffer
> > size; if an error is returned, + * the buffer will
> > not be queued in driver; optional.>
> > * @buf_finish: called before every dequeue of the buffer
> > back to>
> > - * userspace; drivers may perform any operations
> > required - * before userspace accesses the buffer;
> > optional. The - * buffer state can be one of the
> > following: DONE and - * ERROR occur while streaming
> > is in progress, and the - * PREPARED state occurs
> > when the queue has been canceled - * and all pending
> > buffers are being returned to their - * default
> > DEQUEUED state. Typically you only have to do - *
> > something if the state is VB2_BUF_STATE_DONE, since in - *
> > all other cases the buffer contents will be ignored - *
> > anyway.
> > + * userspace; the buffer is synced for the CPU, so
> > drivers + * can access/modify the buffer contents;
> > drivers may + * perform any operations required
> > before userspace + * accesses the buffer; optional.
> > The buffer state can be + * one of the following:
> > DONE and ERROR occur while + * streaming is in
> > progress, and the PREPARED state occurs + * when the
> > queue has been canceled and all pending + * buffers
> > are being returned to their default DEQUEUED + *
> > state. Typically you only have to do something if the + *
> > state is VB2_BUF_STATE_DONE, since in all other cases + *
> > the buffer contents will be ignored anyway.>
> > * @buf_cleanup: called once before the buffer is freed; drivers
> > may
> > * perform any additional cleanup; optional.
> > * @start_streaming: called once to enter 'streaming' state; the driver
> > may>
> > --
> > 2.1.1
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-11-26 19:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 12:50 [REVIEWv7 PATCH 00/12] vb2: improve dma-sg, expbuf Hans Verkuil
2014-11-18 12:50 ` [REVIEWv7 PATCH 01/12] videobuf2-core.h: improve documentation Hans Verkuil
2014-11-23 11:01 ` Pawel Osciak
2014-11-26 19:48 ` Laurent Pinchart [this message]
2014-11-18 12:50 ` [REVIEWv7 PATCH 02/12] vb2: replace 'write' by 'dma_dir' Hans Verkuil
2014-11-26 19:50 ` Laurent Pinchart
2014-11-18 12:50 ` [REVIEWv7 PATCH 03/12] vb2: add dma_dir to the alloc memop Hans Verkuil
2014-11-26 19:53 ` Laurent Pinchart
2014-11-18 12:51 ` [REVIEWv7 PATCH 04/12] vb2: don't free alloc context if it is ERR_PTR Hans Verkuil
2014-11-23 10:19 ` Pawel Osciak
2014-11-26 19:57 ` Laurent Pinchart
2014-11-18 12:51 ` [REVIEWv7 PATCH 05/12] vb2-dma-sg: add allocation context to dma-sg Hans Verkuil
2014-11-23 10:36 ` Pawel Osciak
2014-11-26 20:01 ` Laurent Pinchart
2014-11-27 8:38 ` Hans Verkuil
2014-11-18 12:51 ` [REVIEWv7 PATCH 06/12] vb2-dma-sg: move dma_(un)map_sg here Hans Verkuil
2014-11-26 20:43 ` Laurent Pinchart
2014-11-27 8:48 ` Hans Verkuil
2014-11-18 12:51 ` [REVIEWv7 PATCH 07/12] vb2-dma-sg: add dmabuf import support Hans Verkuil
2014-11-26 21:00 ` Laurent Pinchart
2014-11-27 9:02 ` Hans Verkuil
2014-12-01 22:46 ` Laurent Pinchart
2014-12-02 7:35 ` Hans Verkuil
2014-11-18 12:51 ` [REVIEWv7 PATCH 08/12] vb2-dma-sg: add support for dmabuf exports Hans Verkuil
2014-11-18 12:51 ` [REVIEWv7 PATCH 09/12] vb2-vmalloc: " Hans Verkuil
2014-11-23 10:52 ` Pawel Osciak
2014-11-18 12:51 ` [REVIEWv7 PATCH 10/12] vivid: enable vb2_expbuf support Hans Verkuil
2014-11-26 20:46 ` Laurent Pinchart
2014-11-18 12:51 ` [REVIEWv7 PATCH 11/12] vim2m: support expbuf Hans Verkuil
2014-11-26 20:46 ` Laurent Pinchart
2014-11-18 12:51 ` [REVIEWv7 PATCH 12/12] vb2: use dma_map_sg_attrs to prevent unnecessary sync Hans Verkuil
2014-11-23 10:55 ` Pawel Osciak
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=1849257.LYuFVs0uYE@avalon \
--to=laurent.pinchart@ideasonboard.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox