From patchwork Thu Dec 17 08:40:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 7870801 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 76D2DBEEE5 for ; Thu, 17 Dec 2015 08:42:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85332202EC for ; Thu, 17 Dec 2015 08:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76F8E203E9 for ; Thu, 17 Dec 2015 08:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755298AbbLQIlz (ORCPT ); Thu, 17 Dec 2015 03:41:55 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:44651 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934328AbbLQIlT (ORCPT ); Thu, 17 Dec 2015 03:41:19 -0500 Received: from avalon.ideasonboard.com (unknown [207.140.26.138]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id E3C4E20398; Thu, 17 Dec 2015 09:41:15 +0100 (CET) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH/RFC 38/48] DocBook: media: Document the V4L2 subdev request API Date: Thu, 17 Dec 2015 10:40:16 +0200 Message-Id: <1450341626-6695-39-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1450341626-6695-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1450341626-6695-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The V4L2 subdev request API consists in extensions to existing V4L2 subdev ioctls. Document it. Signed-off-by: Laurent Pinchart --- .../DocBook/media/v4l/vidioc-subdev-g-fmt.xml | 33 ++++++++++++++++++++-- .../media/v4l/vidioc-subdev-g-selection.xml | 28 ++++++++++++++++-- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml index a67cde6f8c54..2623e8f52362 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml @@ -97,6 +97,13 @@ low-pass noise filter might crop pixels at the frame boundaries, modifying its output frame size. + Applications can get and set formats stored in a request by setting + the which field to + V4L2_SUBDEV_FORMAT_REQUEST and the + request to the request ID. See + for more information about the request + API. + Drivers must not return an error solely because the requested format doesn't match the device capabilities. They must instead modify the format to match what the hardware can provide. The modified format should be as @@ -124,8 +131,22 @@ linkend="v4l2-mbus-framefmt" /> for details. + __u16 + request + Request ID, only valid when the which + field is set to V4L2_SUBDEV_FORMAT_REQUEST. + Applications and drivers must set the field to zero in all other + cases. + + + __u16 + reserved2 + Reserved for future extensions. Applications and drivers must + set the field to zero. + + __u32 - reserved[8] + reserved[7] Reserved for future extensions. Applications and drivers must set the array to zero. @@ -148,6 +169,11 @@ 1 Active formats, applied to the hardware. + + V4L2_SUBDEV_FORMAT_REQUEST + 1 + Request formats, used with the requests API. + @@ -171,8 +197,9 @@ EINVAL The &v4l2-subdev-format; pad - references a non-existing pad, or the which - field references a non-existing format. + references a non-existing pad, the which + field references a non-existing format or the request ID references + a nonexistant request. diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml index 9b59b49db0c3..f1f6a31baa63 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml @@ -100,6 +100,13 @@ handle. Two applications querying the same sub-device would thus not interfere with each other. + Applications can get and set selection rectangles stored in a request + by setting the which field to + V4L2_SUBDEV_FORMAT_REQUEST and the + request to the request ID. See + for more information about the request + API. + Drivers must not return an error solely because the requested selection rectangle doesn't match the device capabilities. They must instead modify the rectangle to match what the hardware can provide. The modified @@ -160,8 +167,22 @@ Selection rectangle, in pixels. + __u16 + request + Request ID, only valid when the which + field is set to V4L2_SUBDEV_FORMAT_REQUEST. + Applications and drivers must set the field to zero in all other + cases. + + + __u16 + reserved2 + Reserved for future extensions. Applications and drivers must + set the field to zero. + + __u32 - reserved[8] + reserved[7] Reserved for future extensions. Applications and drivers must set the array to zero. @@ -193,8 +214,9 @@ The &v4l2-subdev-selection; pad references a non-existing pad, the which field references a - non-existing format, or the selection target is not - supported on the given subdev pad. + non-existing format, the selection target is not supported on + the given subdev pad or the request ID references a nonexistant + request.