From patchwork Wed Nov 6 06:07:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ming Qian(OSS)" X-Patchwork-Id: 13863923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9DD83D3E78D for ; Wed, 6 Nov 2024 06:12:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=t1KBz4blLYJUSN1vn0vSjwuM6Lv08zEmF9YUkX1Ekd4=; b=zM9HAGIa16f8SVvykLNGvPvMu7 DiCSmefxfTrKnmloR142IxQgxhsbphVDQm5pSQJ93ma09CFS/yw9mVr/mQhKeXIRXIrCc0g8mUkCh +fwWgWEnqsfO1ORg7eZsgZrmJ0BI06MJ4LcutbV66HzYNLnyYTimMOQRcAvj759QRMLKqzhdmIZ3R bcpqK7OLmi5WyT1ymy3G+zwn8umjtBY7QW79lEXDoF3UWf4SS1T8pcvBsToCYUSqJ8uN9I1zP/+n9 Uxz1qbhLH/onajzdJ+CjLL0Af+CZnXBZz6JPM9Bjs3aDg9ktMipFOEdSGMH1/sRzbBqsRkQKRd9bO 6nSS8ceA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8ZHB-00000001xF8-3W0f; Wed, 06 Nov 2024 06:12:21 +0000 Received: from mail-am6eur05on2060e.outbound.protection.outlook.com ([2a01:111:f403:2612::60e] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t8ZDV-00000001wZF-1G1k for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2024 06:08:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W4oV/g3OSs1cLSEsL3RpONTSjx0EvqvjvKmgSDat1wOoYFkXYNVJYnJxeurdgqBPhEyx+Ml/y6pwIw0wWEfJf5sA/iL4NLZ2vQKGh0E0NrJcLf/6BeuD5DjvoGpBQewE8Di82R3lo5/huC7fTAAQqal+HxYt14pOhV1NfuiQWWmLARs276GenMz2UUTkJhttrZufFDFnS94wKndsco6pQJTafQP8jWTujcdI03r/yPXH4o5PubDtRMM3wCvwItVMfLPLV7+cm9ybqo6m8+jBvd2VGR1w8QXQGYdzntIGs66kihvLwOI0qv0Jgz49zwSUpw7zldhE/Wx8IjZIoZeZ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t1KBz4blLYJUSN1vn0vSjwuM6Lv08zEmF9YUkX1Ekd4=; b=i85Iyx4v3Xfy2wnxB25rjfhcH3uYuCw/UgzPgpA4/6Kv+XHsLzAVGvESQSZVAPm3CX29MtJKHjX53hYZTuiZv9IQqeb/UDVb4jN8ZZyJvo0Uq3wwf+ipw1cOI/DESx96ov7Yv3jdt+JAtTmlIzTWyvx8hhdrzfu1zIsBmZNuJ/42qJkG7TEutLdqjHXSWBGOunybmAdMpvOThKZE80OpYxy1ijeT7KMO0IEZRz0SCU9aWlK6TfRCGR2HMRXgsfP6QZwqVAya/I3S8e4RyEJ0iVmZLqJNNP0APvPjLfE8xK5aqDr61ysQ3goI3lsBQc862CbAVd7H+SUq82OTv8uumA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t1KBz4blLYJUSN1vn0vSjwuM6Lv08zEmF9YUkX1Ekd4=; b=gsBaj9iv7RyoD46eqbukoP0z1WGionqGym4TsEN56yu7uUu4f/C5fqKzSYU6ry7sWA+Ht5ge5BSmLHGnVRQUNCYhWVfCuFEzXEbq+VleJWx6Bsh123YvVTOet/b+IIKVQuHrpQtNDIWHA4bhK7T2eqW0AeSWuLomeyqCo+lXKf7es1IJJVX6SHRKGRs/YKtD6DseSb1JhHHN40X8m5hwsCXcspCZ/sPFDQe+3BdBLkzZ6l+iu+Ef4fB0Kj9w1y3rIEYiiZvgf6EJAfkzCs7/+Nelv1g0qqJWqNXQsdBiFICqdshfG1XlJRNpPXvTBPSORLgUD13udvmyYtHF3nPI/g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) by PA2PR04MB10506.eurprd04.prod.outlook.com (2603:10a6:102:41e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Wed, 6 Nov 2024 06:08:28 +0000 Received: from PAXPR04MB8254.eurprd04.prod.outlook.com ([fe80::2755:55ac:5d6f:4f87]) by PAXPR04MB8254.eurprd04.prod.outlook.com ([fe80::2755:55ac:5d6f:4f87%3]) with mapi id 15.20.8114.031; Wed, 6 Nov 2024 06:08:28 +0000 From: ming.qian@oss.nxp.com To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: yunkec@google.com, nicolas@ndufresne.ca, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, ming.zhou@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, ming.qian@nxp.com, imx@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 1/4] media: v4l2_ctrl: Add V4L2_CTRL_TYPE_RECT Date: Wed, 6 Nov 2024 15:07:49 +0900 Message-ID: <20241106060752.205074-2-ming.qian@oss.nxp.com> X-Mailer: git-send-email 2.43.0-rc1 In-Reply-To: <20241106060752.205074-1-ming.qian@oss.nxp.com> References: <20241106060752.205074-1-ming.qian@oss.nxp.com> X-ClientProxiedBy: SI2PR01CA0013.apcprd01.prod.exchangelabs.com (2603:1096:4:191::9) To PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8254:EE_|PA2PR04MB10506:EE_ X-MS-Office365-Filtering-Correlation-Id: cecb7cd1-ad32-40bf-208a-08dcfe296e56 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|7416014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: 9dgZVtxU1CFQTmGbLJx3Ft88+BmTYYVlZlGb5AE1EuR7VWC/OUPlkT78uB3xjmXKxzufcKtp203yuWkhVrVSzas6lRbzuh9+bjt37ZeKa1wG8ptruEAZ7/iyHfoWExB/ZySZYOvKEMJC6yE9y+v4/6eWq+QlEZ4lyeihJcVNzdwNJZkk4uxv/PjZ+tqdrNRPV7YZ+ws1eDMdflI4EkOLVETCOI+Rdct0oZwYPrAEUMUd5alpgUodRvCf/yqaTAbbGsXEd+YyvBx4hX+/NJ1lUIGeKpNWCEUe6LcEJxV49XwjeeOzZf6N0435SYy9QngcBXYroRjbsarjR/lQqVXmAk0TyWKgE0tDnBhkFnKy14ymoRYfJN64WVQMylYag98vFy6PQeOCCHYYPDWqtmwXXVf3gYikCD0xMjY54WVp3+zn/1eQF1mS0jb6fkwGD30sYiaopb00HDeDUWsJljzwQp6yvsJ/sIEkP/jfXQrRH4hbl+p3H0CuV5aUQCW6QtUrUvRlMgDpArIo8WnBXt1SlaPiZ6rXu03t49IScX22ajZLf3zikZc5XtRKgXUR2xRCiHNiJr13eMqEu4qmFAwFeZEdRIebx4npKFNTgt2RcCQ6ddCdecn1DVSLPDEzE797uGjZG2B4gTbgkNduM7UVpMY1UR0v/6KuyUA9/s0X9DDova5/aLWtzj/HbTkuNa3IeliZBpUiziAvjZU6Z9vbZ7BzC1sNwCHGfvYzWSzdtKatbPbsbtjHCk/0YUlu31SdgZHX0KP4szKEmiit+HTG2F6AriZzi7cr2anEGddSxFOqc1Ro48MDUuPdS/35GUEyK1uk12MLtGABxbAfbZpywUJfzwXdLHrwz8C0AzlVrbbmXLe85ABZKdhoGmYCf4oJZE+BCQg1hW5/NgLv7lFTQjDKJziqG7TPrr1E7p0Y2Ub/nTp3JEiWAT4wOhHYv2n/dBFR5APFfQ1mjgFKP4kyDE1FZkpFwl2GTnDTzPhRf/oZcSIAM4/dxWVduLbpX1dEeRhI5XRrcnENcJZ6Qs4ahE6iVc5na2EhGxV7XUTrLHC6MkruVQ+WIwltSmLpvxxphhuma9+G2Jcdq0qnzmzAN91nkLd9ZI5fOBLN/spbdj39DSeSwYISW3FqyQ+S+IyKEN7druVP9A3VPiOh+FFgZDoL7Jm9mRHv0McjerBvJUQEqxQo/MziWVjjRW7L59wm0HpFNkgrLw/p7TQDPBBuZpqDATjkk7sM6SnaFAEziMQ95k8qz9C/LMOm8OuQl9DmGU81LaCtODDI4zUYAZ7P/LowcPsemRBzjnGjSg6JJ+k5ERT7ayyKLpzih7l/JzltkuPOmck6IYrbzoHrJQoDKYIr/4FnF6nNN/uT6qQ6oQ4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8254.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(7416014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: W1kKz28sHjWk0utY3ZDGfglNVR8vUeCRJRMU2NZo2qpC9IHiUIw7XxCL1ybzoPN4VAJaz8JxMMxX/TDFrghroCcMuXlQOBfa2Fc3fiqbIqoTT/e45y1/DiCs+4QqSm0TgvhBDqgEH5BJbU+p5P4EFhRParitA0cPjeMNLZ8Kj2jBzShhaI7lwr69xxDWA+T/wBdlm0q8b3NbUYAbUKMVt88v3efknwO6hazuZZGCSQQXN2KjxPYJXKkw6RSmP647f3gjwfHB+4h0Fp2YtwPzv0x/IVSvyO7dJNQys9MpL0/X6LIuYeiTvc2dVhZt2TBH5SJQXbMhECVgvrWqifde/cj8vjlu3TtdxLI/FwRdYunZFpR66SxsStQ/xntGMJdj6ai0el0WPujZHTRqIT0kva4e0dChx1QyOzEJyt/EmFMDxFZ2mC5K0hMxowlEQHoSAud2SIcyXIXvu4KOXlLwVIzVwMFgq9EQ3T/bMi38UytmXtxWd8Qqctn3CgxyBoCnX1+TgqMDrZva3L88WGoygPXw9ysbNZI76S/65cOLn7Z4zLonCKBztaefpTbqjPm6z5DtID84Tc5tzRdH/9i+qGc2AY3qzm1BLudRSRrHjMel3qG3X+YRUfFdYQEqj3j2jwVf5fdKWlPiimHcF2wNmUMfEag9gauY/JoCUEGAMwYEJjMHcRhVWiHLGHE5xqA13a5Xq950noC+m/FWhk7xFxmiB33nxUmIhwOmLD1vECgt8dvyx7rx3VOPJXc5NS0n++Hio3bFvzFVu9hgpRX0oKo/mVvNa4udtQ0cQWLPrE0K+yGgfU51DrjxW8LDcXoaGNxSlLYI+0iuW3duaAnAsJxTuQwWTka3Zl2wQwSioU0w2IMRl+I6ElV+QsAicgF8dSExGct7/OY4wre4lihny02qJLVEFCL+GsG+z3BDbrsyoD35hNECPYTMo5sSzPFsLkWlDwg50b/1oJVYSAwtu4FKfSSz9xS+0k3aD8sIVtYPGllA3Qoicvm4ll3QrVFWHvOLOK6G2A3CZ1B8cB39fApLi99QotNdsKhi+dz+ZPzKncV4yp/SI0eO8xOMirR3FK5QR27QTjPqbCUsah/5xIGh5YSFuCnWbIgOujSnNO6+G6508fB18mTF1kBRSIxaq1CSDRlKAh8iqtebWq2TRrTeiETGP3+diAN0JB3n4KYm9WEer4MvppMgMtXWAQcTuFC+NNfLgR0EUN/4mTLcqS2ZvqX1+WRKoQQ41qCINvRm0aW2O3YteQWT9mh9GwxBFNNL5h1ApZgQXfxpVLBiFE2mmbweC/6grWSqkgAGWXJyhHXo6B/pGadMxPRQ6S0lGbThsRQfN8Am167rFuOboDEABedccdgOx7KMSWSzoyDK1E4gRZPvbMA8j7Tsnz4XFsJ8U++nApb5yDyse0WGMzMEphARp6ZHB5eDAF7dCT5vzMFML/1zsve60ZyfTIEXZfKxudGRbJmbdqyEmzIq+QNPH1Kc/FTdNbWcd8wcYEyCawbvXNj+t363qj3ILWSINiW/+8QSjPa/sttZh7A4GnwWaAr9eo/Q5GKf5NS/3gE8loDDWAeWYOPrf+BLWITJ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cecb7cd1-ad32-40bf-208a-08dcfe296e56 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8254.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2024 06:08:28.0863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Wr9f8reWy9YU2IJZBGF0jscsLpm9cZMytNqUe0wJrI5gEfLLhDlzgXh+2qzvFt+kwc9tfjCxdZu/BBbWty/YRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10506 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241105_220833_546108_A1F8A857 X-CRM114-Status: GOOD ( 16.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yunke Cao Add p_rect to struct v4l2_ext_control with basic support in v4l2-ctrls. Reviewed-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Reviewed-by: Sergey Senozhatsky Reviewed-by: Daniel Scally Signed-off-by: Yunke Cao Reviewed-by: Hans Verkuil --- .../media/v4l/vidioc-g-ext-ctrls.rst | 4 ++++ .../userspace-api/media/v4l/vidioc-queryctrl.rst | 7 +++++++ .../media/videodev2.h.rst.exceptions | 1 + drivers/media/v4l2-core/v4l2-ctrls-core.c | 15 ++++++++++++++- include/media/v4l2-ctrls.h | 2 ++ include/uapi/linux/videodev2.h | 2 ++ 6 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst index 4d56c0528ad7..b74a74ac06fc 100644 --- a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst +++ b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst @@ -199,6 +199,10 @@ still cause this situation. - ``p_area`` - A pointer to a struct :c:type:`v4l2_area`. Valid if this control is of type ``V4L2_CTRL_TYPE_AREA``. + * - struct :c:type:`v4l2_rect` * + - ``p_rect`` + - A pointer to a struct :c:type:`v4l2_rect`. Valid if this control is + of type ``V4L2_CTRL_TYPE_RECT``. * - struct :c:type:`v4l2_ctrl_h264_sps` * - ``p_h264_sps`` - A pointer to a struct :c:type:`v4l2_ctrl_h264_sps`. Valid if this control is diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst index 4d38acafe8e1..56d5c8b0b88b 100644 --- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst +++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst @@ -441,6 +441,13 @@ See also the examples in :ref:`control`. - n/a - A struct :c:type:`v4l2_area`, containing the width and the height of a rectangular area. Units depend on the use case. + * - ``V4L2_CTRL_TYPE_RECT`` + - n/a + - n/a + - n/a + - A struct :c:type:`v4l2_rect`, containing a rectangle described by + the position of its top-left corner, the width and the height. Units + depend on the use case. * - ``V4L2_CTRL_TYPE_H264_SPS`` - n/a - n/a diff --git a/Documentation/userspace-api/media/videodev2.h.rst.exceptions b/Documentation/userspace-api/media/videodev2.h.rst.exceptions index 429b5cdf05c3..3cf1380b52b0 100644 --- a/Documentation/userspace-api/media/videodev2.h.rst.exceptions +++ b/Documentation/userspace-api/media/videodev2.h.rst.exceptions @@ -150,6 +150,7 @@ replace symbol V4L2_CTRL_TYPE_HEVC_SPS :c:type:`v4l2_ctrl_type` replace symbol V4L2_CTRL_TYPE_HEVC_PPS :c:type:`v4l2_ctrl_type` replace symbol V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS :c:type:`v4l2_ctrl_type` replace symbol V4L2_CTRL_TYPE_AREA :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_RECT :c:type:`v4l2_ctrl_type` replace symbol V4L2_CTRL_TYPE_FWHT_PARAMS :c:type:`v4l2_ctrl_type` replace symbol V4L2_CTRL_TYPE_VP8_FRAME :c:type:`v4l2_ctrl_type` replace symbol V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR :c:type:`v4l2_ctrl_type` diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c index eeab6a5eb7ba..d07869d55a96 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c @@ -370,7 +370,10 @@ void v4l2_ctrl_type_op_log(const struct v4l2_ctrl *ctrl) case V4L2_CTRL_TYPE_AV1_FILM_GRAIN: pr_cont("AV1_FILM_GRAIN"); break; - + case V4L2_CTRL_TYPE_RECT: + pr_cont("(%d,%d)/%ux%u", + ptr.p_rect->left, ptr.p_rect->top, ptr.p_rect->width, ptr.p_rect->height); + break; default: pr_cont("unknown type %d", ctrl->type); break; @@ -815,6 +818,7 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx, struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering; struct v4l2_ctrl_hevc_decode_params *p_hevc_decode_params; struct v4l2_area *area; + struct v4l2_rect *rect; void *p = ptr.p + idx * ctrl->elem_size; unsigned int i; @@ -1172,6 +1176,12 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx, return -EINVAL; break; + case V4L2_CTRL_TYPE_RECT: + rect = p; + if (!rect->width || !rect->height) + return -EINVAL; + break; + default: return -EINVAL; } @@ -1872,6 +1882,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, case V4L2_CTRL_TYPE_AREA: elem_size = sizeof(struct v4l2_area); break; + case V4L2_CTRL_TYPE_RECT: + elem_size = sizeof(struct v4l2_rect); + break; default: if (type < V4L2_CTRL_COMPOUND_TYPES) elem_size = sizeof(s32); diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 59679a42b3e7..b0db167a3ac4 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -56,6 +56,7 @@ struct video_device; * @p_av1_tile_group_entry: Pointer to an AV1 tile group entry structure. * @p_av1_frame: Pointer to an AV1 frame structure. * @p_av1_film_grain: Pointer to an AV1 film grain structure. + * @p_rect: Pointer to a rectangle. * @p: Pointer to a compound value. * @p_const: Pointer to a constant compound value. */ @@ -89,6 +90,7 @@ union v4l2_ctrl_ptr { struct v4l2_ctrl_av1_tile_group_entry *p_av1_tile_group_entry; struct v4l2_ctrl_av1_frame *p_av1_frame; struct v4l2_ctrl_av1_film_grain *p_av1_film_grain; + struct v4l2_rect *p_rect; void *p; const void *p_const; }; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index e7c4dce39007..c1c2ae150d30 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1859,6 +1859,7 @@ struct v4l2_ext_control { __s32 __user *p_s32; __s64 __user *p_s64; struct v4l2_area __user *p_area; + struct v4l2_rect __user *p_rect; struct v4l2_ctrl_h264_sps __user *p_h264_sps; struct v4l2_ctrl_h264_pps __user *p_h264_pps; struct v4l2_ctrl_h264_scaling_matrix __user *p_h264_scaling_matrix; @@ -1929,6 +1930,7 @@ enum v4l2_ctrl_type { V4L2_CTRL_TYPE_U16 = 0x0101, V4L2_CTRL_TYPE_U32 = 0x0102, V4L2_CTRL_TYPE_AREA = 0x0106, + V4L2_CTRL_TYPE_RECT = 0x0107, V4L2_CTRL_TYPE_HDR10_CLL_INFO = 0x0110, V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY = 0x0111,