From patchwork Tue May 24 16:47:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9133925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 33B02607D5 for ; Tue, 24 May 2016 16:51:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27B712823B for ; Tue, 24 May 2016 16:51:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C9812825C; Tue, 24 May 2016 16:51:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89D262823B for ; Tue, 24 May 2016 16:51:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932235AbcEXQvK (ORCPT ); Tue, 24 May 2016 12:51:10 -0400 Received: from mga04.intel.com ([192.55.52.120]:40517 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755443AbcEXQvC (ORCPT ); Tue, 24 May 2016 12:51:02 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 24 May 2016 09:51:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,360,1459839600"; d="scan'208";a="987817546" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga002.fm.intel.com with ESMTP; 24 May 2016 09:50:59 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id DD95E21309; Tue, 24 May 2016 19:50:55 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id CCE932010D; Tue, 24 May 2016 19:47:42 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl, mchehab@osg.samsung.com, Laurent Pinchart Subject: [RFC v2 19/21] DocBook: media: Document the V4L2 subdev request API Date: Tue, 24 May 2016 19:47:29 +0300 Message-Id: <1464108451-28142-20-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464108451-28142-1-git-send-email-sakari.ailus@linux.intel.com> References: <1464108451-28142-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurent Pinchart 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 | 27 +++++++++++++++++++--- .../media/v4l/vidioc-subdev-g-selection.xml | 24 +++++++++++++++---- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml index 781089c..5cf6d89 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-fmt.xml @@ -91,6 +91,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 @@ -119,7 +126,15 @@ __u32 - reserved[8] + 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. + + + __u32 + reserved[7] Reserved for future extensions. Applications and drivers must set the array to zero. @@ -142,6 +157,11 @@ 1 Active formats, applied to the hardware. + + V4L2_SUBDEV_FORMAT_REQUEST + 2 + Request formats, used with the requests API. + @@ -165,8 +185,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 faac955..c0fbfbe 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml @@ -94,6 +94,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 @@ -128,7 +135,7 @@ __u32 which - Active or try selection, from + Selection to be modified, from &v4l2-subdev-format-whence;. @@ -155,7 +162,15 @@ __u32 - reserved[8] + 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. + + + __u32 + reserved[7] Reserved for future extensions. Applications and drivers must set the array to zero. @@ -187,8 +202,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.