From patchwork Thu Dec 17 08:40:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 7870881 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 E3CF1BEEE5 for ; Thu, 17 Dec 2015 08:42:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 129C7203ED for ; Thu, 17 Dec 2015 08:42:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2CFE1203E9 for ; Thu, 17 Dec 2015 08:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933717AbbLQIlI (ORCPT ); Thu, 17 Dec 2015 03:41:08 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:44652 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933374AbbLQIlH (ORCPT ); Thu, 17 Dec 2015 03:41:07 -0500 Received: from avalon.ideasonboard.com (unknown [207.140.26.138]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 9584820395; Thu, 17 Dec 2015 09:41:03 +0100 (CET) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH/RFC 27/48] v4l2-subdev.h: Add request field to format and selection structures Date: Thu, 17 Dec 2015 10:40:05 +0200 Message-Id: <1450341626-6695-28-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 Let userspace specify a request ID when getting or setting formats or selection rectangles. From a userspace point of view the API change is minimized and doesn't require any new ioctl. Signed-off-by: Laurent Pinchart --- include/uapi/linux/v4l2-subdev.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h index dbce2b554e02..2f1691ce9df5 100644 --- a/include/uapi/linux/v4l2-subdev.h +++ b/include/uapi/linux/v4l2-subdev.h @@ -32,10 +32,12 @@ * enum v4l2_subdev_format_whence - Media bus format type * @V4L2_SUBDEV_FORMAT_TRY: try format, for negotiation only * @V4L2_SUBDEV_FORMAT_ACTIVE: active format, applied to the device + * @V4L2_SUBDEV_FORMAT_REQUEST: format stored in request */ enum v4l2_subdev_format_whence { V4L2_SUBDEV_FORMAT_TRY = 0, V4L2_SUBDEV_FORMAT_ACTIVE = 1, + V4L2_SUBDEV_FORMAT_REQUEST = 2, }; /** @@ -43,12 +45,17 @@ enum v4l2_subdev_format_whence { * @which: format type (from enum v4l2_subdev_format_whence) * @pad: pad number, as reported by the media API * @format: media bus format (format code and frame size) + * @request: request ID (when which is set to V4L2_SUBDEV_FORMAT_REQUEST) + * @reserved2: for future use, set to zero for now + * @reserved: for future use, set to zero for now */ struct v4l2_subdev_format { __u32 which; __u32 pad; struct v4l2_mbus_framefmt format; - __u32 reserved[8]; + __u16 request; + __u16 reserved2; + __u32 reserved[7]; }; /** @@ -139,6 +146,8 @@ struct v4l2_subdev_frame_interval_enum { * defined in v4l2-common.h; V4L2_SEL_TGT_* . * @flags: constraint flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*. * @r: coordinates of the selection window + * @request: request ID (when which is set to V4L2_SUBDEV_FORMAT_REQUEST) + * @reserved2: for future use, set to zero for now * @reserved: for future use, set to zero for now * * Hardware may use multiple helper windows to process a video stream. @@ -151,7 +160,9 @@ struct v4l2_subdev_selection { __u32 target; __u32 flags; struct v4l2_rect r; - __u32 reserved[8]; + __u16 request; + __u16 reserved2; + __u32 reserved[7]; }; /* Backwards compatibility define --- to be removed */