From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Stanislawski Subject: Re: [PATCH 02/11] Documentation: media: description of DMABUF importing in V4L2 Date: Thu, 05 Apr 2012 17:10:34 +0200 Message-ID: <4F7DB5EA.2020506@samsung.com> References: <1333634408-4960-1-git-send-email-t.stanislaws@samsung.com> <1333634408-4960-3-git-send-email-t.stanislaws@samsung.com> <201204051758.41552.remi@remlab.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-reply-to: <201204051758.41552.remi@remlab.net> Sender: linux-media-owner@vger.kernel.org To: =?ISO-8859-15?Q?R=E9mi_Denis-Courmont?= Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@redhat.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, sumit.semwal@ti.com, daeinki@gmail.com, daniel.vetter@ffwll.ch, robdclark@gmail.com, pawel@osciak.com, linaro-mm-sig@lists.linaro.org, subashrp@gmail.com List-Id: dri-devel@lists.freedesktop.org Hello, Thank you for review. Please refer to comments below. On 04/05/2012 04:58 PM, R=E9mi Denis-Courmont wrote: > Le jeudi 5 avril 2012 16:59:59 Tomasz Stanislawski, vous avez =E9crit= : >> This patch adds description and usage examples for importing >> DMABUF file descriptor in V4L2. >> >> Signed-off-by: Tomasz Stanislawski >> Signed-off-by: Kyungmin Park >> --- >> Documentation/DocBook/media/v4l/compat.xml | 4 + >> Documentation/DocBook/media/v4l/io.xml | 177 >> ++++++++++++++++++++ .../DocBook/media/v4l/vidioc-create-bufs.xml = |=20 >> 1 + >> Documentation/DocBook/media/v4l/vidioc-qbuf.xml | 15 ++ >> Documentation/DocBook/media/v4l/vidioc-reqbufs.xml | 8 +- >> 5 files changed, 203 insertions(+), 2 deletions(-) >> [snip] >> + >> + Initiating streaming I/O with DMABUF file descriptors<= /title> >> + >> + <programlisting> >> +&v4l2-requestbuffers; reqbuf; >> + >> +memset (&reqbuf, 0, sizeof (reqbuf)); >> +reqbuf.type =3D V4L2_BUF_TYPE_VIDEO_CAPTURE; >> +reqbuf.memory =3D V4L2_MEMORY_DMABUF; >> + >> +if (ioctl (fd, &VIDIOC-REQBUFS;, &reqbuf) =3D=3D -1) { >> + if (errno =3D=3D EINVAL) >> + printf ("Video capturing or user pointer streaming is not=20 > supported\n"); >=20 > User pointer?? >=20 Right. I will fix this copy & paste error. >> + else >> + perror ("VIDIOC_REQBUFS"); >> + >> + exit (EXIT_FAILURE); >> +} >> + </programlisting> >> + </example> >> + [snip] >> + <para>To start and stop capturing or output applications call t= he >> +&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note >> +<constant>VIDIOC_STREAMOFF</constant> removes all buffers from both= queues >> and +unlocks/unpins all buffers as a side effect. Since there is no = notion >> of doing +anything "now" on a multitasking system, if an application= needs >> to synchronize +with another event it should examine the &v4l2-buffe= r; >> +<structfield>timestamp</structfield> of captured buffers, or set th= e field >> +before enqueuing buffers for output.</para> >> + >> + <para>Drivers implementing user pointer I/O must support the >=20 > User pointer again?? >=20 >=20 Yes. Another C&P mistake. Thanks for noticing it. Regards, Tomasz Stanislawski