From patchwork Fri Sep 28 09:30:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 1517921 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ADA703FC71 for ; Fri, 28 Sep 2012 09:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753844Ab2I1JbH (ORCPT ); Fri, 28 Sep 2012 05:31:07 -0400 Received: from smtp-vbr6.xs4all.nl ([194.109.24.26]:3009 "EHLO smtp-vbr6.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754924Ab2I1JbF (ORCPT ); Fri, 28 Sep 2012 05:31:05 -0400 Received: from alastor.dyndns.org (166.80-203-20.nextgentel.com [80.203.20.166] (may be forged)) (authenticated bits=0) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id q8S9UQjA096908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 28 Sep 2012 11:30:27 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) Received: from tschai.cisco.com (64-103-25-233.cisco.com [64.103.25.233]) (Authenticated sender: hans) by alastor.dyndns.org (Postfix) with ESMTPSA id B838935C00C9; Fri, 28 Sep 2012 11:30:25 +0200 (CEST) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Sylwester Nawrocki , Pawel Osciak , Marek Szyprowski , Hans Verkuil Subject: [RFCv2 PATCH 4/4] DocBook: various updates w.r.t. v4l2_buffer and multiplanar. Date: Fri, 28 Sep 2012 11:30:12 +0200 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1348824612-2857-1-git-send-email-hverkuil@xs4all.nl> References: <1348824612-2857-1-git-send-email-hverkuil@xs4all.nl> In-Reply-To: <2ffce29d048fbe637273d08abd506d128194d7d9.1348824367.git.hans.verkuil@cisco.com> References: <2ffce29d048fbe637273d08abd506d128194d7d9.1348824367.git.hans.verkuil@cisco.com> X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Hans Verkuil Clarify the behavior of v4l2_buffer in the multiplanar case, including fixing a false statement: you can't set m.planes to NULL when calling DQBUF. Signed-off-by: Hans Verkuil --- Documentation/DocBook/media/v4l/io.xml | 6 ++++-- Documentation/DocBook/media/v4l/vidioc-qbuf.xml | 3 +-- Documentation/DocBook/media/v4l/vidioc-querybuf.xml | 11 +++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index 97f785a..b5d1cbd 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml @@ -677,8 +677,10 @@ memory, set by the application. See for details. length Size of the buffer (not the payload) in bytes for the - single-planar API. For the multi-planar API should contain the - number of elements in the planes array. + single-planar API. For the multi-planar API the application sets + this to the number of elements in the planes + array. The driver will fill in the actual number of valid elements in + that array. diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml index 6a821a6..2d37abe 100644 --- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml +++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml @@ -121,8 +121,7 @@ remaining fields or returns an error code. The driver may also set field. It indicates a non-critical (recoverable) streaming error. In such case the application may continue as normal, but should be aware that data in the dequeued buffer might be corrupted. When using the multi-planar API, the -planes array does not have to be passed; the m.planes -member must be set to NULL in that case. +planes array must be passed in as well. By default VIDIOC_DQBUF blocks when no buffer is in the outgoing queue. When the diff --git a/Documentation/DocBook/media/v4l/vidioc-querybuf.xml b/Documentation/DocBook/media/v4l/vidioc-querybuf.xml index 6e414d7..a597155 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querybuf.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querybuf.xml @@ -48,8 +48,8 @@ Description - This ioctl is part of the memory -mapping I/O method. It can be used to query the status of a + This ioctl is part of the streaming + I/O method. It can be used to query the status of a buffer at any time after buffers have been allocated with the &VIDIOC-REQBUFS; ioctl. @@ -71,6 +71,7 @@ the structure. In the flags field the V4L2_BUF_FLAG_MAPPED, +V4L2_BUF_FLAG_PREPARED, V4L2_BUF_FLAG_QUEUED and V4L2_BUF_FLAG_DONE flags will be valid. The memory field will be set to the current @@ -79,8 +80,10 @@ contains the offset of the buffer from the start of the device memory, the length field its size. For the multi-planar API, fields m.mem_offset and length in the m.planes -array elements will be used instead. The driver may or may not set the remaining -fields and flags, they are meaningless in this context. +array elements will be used instead and the length +field of &v4l2-buffer; is set to the number of filled-in array elements. +The driver may or may not set the remaining fields and flags, they are +meaningless in this context. The v4l2_buffer structure is specified in .