From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga14.intel.com ([192.55.52.115]:1297 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758250AbcEFK4n (ORCPT ); Fri, 6 May 2016 06:56:43 -0400 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 20/22] DocBook: media: Document the V4L2 subdev request API Date: Fri, 6 May 2016 13:53:29 +0300 Message-Id: <1462532011-15527-21-git-send-email-sakari.ailus@linux.intel.com> In-Reply-To: <1462532011-15527-1-git-send-email-sakari.ailus@linux.intel.com> References: <1462532011-15527-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org List-ID: 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. -- 1.9.1