From patchwork Tue Oct 22 08:40:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 13845331 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 2DFFAD1CDB8 for ; Tue, 22 Oct 2024 08:44:45 +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=3co966d8lg7YhJGpW2PyDhINGAAkGT+8kwYcfIKNyhI=; b=WC5B2J1J1zZ+9H1/raisZvQBBo t9ET3UP1ra+FffcAY77pBUj8sdx0Nj4Yw78PxZF+xSUTnZ7FHreXLL3LAVIlIOlKMQlRPerm3twjZ AwiACniMQr6B1F6Ac7q1OGG30Ofqk0RQ4dRVkGi6ARY1Hyg2DcqlDs+p9tYDA/r2Z5HS85aTr9jg7 wc9krFnLGxoTOgBJuf1D0q9zdEzw2RPJPJkrWmfmNMROCYGd0AiZNy495yyDXhzWEboNUA7JTLpqi Hi9XD+r68AIGzY6K3xZSTBvMinTyFBT10Y6IsYLjFnQPaoURFcBNSThffKY8BW5HwizdGnb+CXqAT 5P7g9LJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3AVA-0000000ADFK-1gn7; Tue, 22 Oct 2024 08:44:28 +0000 Received: from mail-northeuropeazlp170110001.outbound.protection.outlook.com ([2a01:111:f403:c200::1] helo=DB3PR0202CU003.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3AS7-0000000ACPn-1bso for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 08:41:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qvJpaYYNR+qPf7FMqEnRUq9xuWxLNwUBMhx7qFwBHF3wS/LQzjR8mXp09sPndWH4tq18oRNCKTw47dg/jFtL18U/ie6eZiJIpffWawKOzz47K6TJeS4msLg0PApNk6fB+sQHIEnj73/NwgEk6OFDI4/kk6qPL9A7S/+TdhD0vHknNGV4GKMqqK1omI9tpEV+DzmzxWolkyFgW1HkMryDjrCp38pI+Gs+gCexav+QnaNbxOWD7iAoanhjgnAmcpk8zJ1Zg5S4ivZuf3bcBcsgsy/0ZTYx6ZxtuQq4GP2gECw+sS0ls1i4djsErpnObq+i88bSlesLblJmEelVbK0PxQ== 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=3co966d8lg7YhJGpW2PyDhINGAAkGT+8kwYcfIKNyhI=; b=JnvgCedhLOgs4DxtklTrS603Dh/XoIPe5yyE70Oxe36hx6Eyf3vTvIpLsdH7/2aLQUAk/OnGSS2MRNTRmB2S+SfMsnJgNuFL4117NReouhRl6oVGdtq19lPy8ZtCsbL3N+dipz3swHFAgzJilDL/0riVRX/xSAEWYwIHxvGuS22d4mL4pGAm8ugEBpse1/zO+PITIJ1UBqXa+RzlOFUesVeqm4PMNaIUgjedemMGFJHSF1pOFBSZZivVNdAJMztgeq2tmEQ1P3n/WHgB+rl7WmJ5/hRvNY5oJt6dUVNWWzDZTDUX6W4MNANOMhzPIjgA8JdJA9nqAX/XLjjHZPB3tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3co966d8lg7YhJGpW2PyDhINGAAkGT+8kwYcfIKNyhI=; b=j5Ds5R1UpauzqyeRd9YcB3phbW9uers8ObQsJBHfQ+7LCwKQ6VMg6LwP4NqLb5Hp8hJ4T1LsPZB6Thb0/04/kJI07dhX54C0bLYfcdNxlo8ihp+G6Fv2z8wax8iVBU7w8Coii8rDYWnogIqKMGhTu/aobFl2Hohbhv+N7IKr8JhZxRh5bYQl45t1x4Mr8m0aHCOUw9Wv1zPyF9Y9deq7t41eIhGwZ5RD9cyfWe5eiaWZGor0L+evdAMApPbVRzUENVZVZ7uA/za/m9kJ85LLSeqFB3+hXZlPPrlG/g/21wQLSEjfsx4w3gAbh17cDyuBd2yV2iPqPmMgUnr4P8Ou4Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) by AS8PR04MB7831.eurprd04.prod.outlook.com (2603:10a6:20b:2a8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Tue, 22 Oct 2024 08:41:10 +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.8069.027; Tue, 22 Oct 2024 08:41:10 +0000 From: Ming Qian 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@oss.nxp.com, imx@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC v3 1/4] media: v4l2_ctrl: Add V4L2_CTRL_TYPE_RECT Date: Tue, 22 Oct 2024 17:40:37 +0900 Message-ID: <20241022084040.3390878-2-ming.qian@nxp.com> X-Mailer: git-send-email 2.43.0-rc1 In-Reply-To: <20241022084040.3390878-1-ming.qian@nxp.com> References: <20241022084040.3390878-1-ming.qian@nxp.com> X-ClientProxiedBy: SG2P153CA0007.APCP153.PROD.OUTLOOK.COM (2603:1096::17) To PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8254:EE_|AS8PR04MB7831:EE_ X-MS-Office365-Filtering-Correlation-Id: 87d2e0a4-fe54-4d2e-f470-08dcf2754755 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: UYE8KXw2aw2fZW8M8wQ6FRtyh+cHFHZAVbD2aXiWp+WJZZ7y7wxwk5nlKVi4YbqBIFjZPhtlzm79byyxrmQm6YpyzwYZ8DtK0KnMAc6SOQ8/xNd72UEyP2+xPEurR+hC8e5EkudseSWw1wx2YBTwuUfvtE1rLjqD1A1Zih/zOVjjcwsq0TVjhheVSnSwPe3nWPTimou8C27nBG9fCMEIyhvhoiwUqY6V+3UT6nmljb+Zu6FvtfFDjEcT8Acp8Mz0RBA1WX0yqiq8Q81qHi1ZPfvAHBswmCCuBmK2NfbzBAIvnvqEr4dX7or2lFZZ2GugOs8OnDLmgP5NR61agOyvJUDhIQ3yrm6zo5Vj/sLlCQJNbtWXRr3YkjbmepeLhnT7wAcSbbbrJl9KLcZgd3kuTkKZaDKjdr2l3vrHlS7+xBqP8Nr7//dBc5QlgB7oXcuopuE8cMQNA44Iyk7dNsXiw9UQhnjcyYpzW1qRtQDABmdXZa2IMbBm4HHNrWfMdn5tUvHnfrvm517jXto21+XsPHPgKE3cvHm5yxTnEHOL/lBa3brVaWY64DmS7J8Az600wPMgMDQW9w7OPqDTH3qumkogv+8tuG/C1YVdLdAkwOmDLiC9vQeI+zwPBhmmpcVxUlclcZft8AKg/By0eOrVXCniz1D1yIqsX4DuBa0Nc6m883X64xQ6StL+qEEr5xa0q/ouCZyC1tLDi+/J0aaUwexKCBSWszfF9cc40FvqDN+3anEXIjd4FzNTObdt1ZqavkymCMLKuOBTOPXKystDTOKBJ0ts+CyGnb4yDVH09bJqB9wInZv2X5DRJRjPUCwG9dGvpsFHNGhCegHkteCxB7gKW3ixwjbuBAj7NGZoVYyGKpD/LddRhtb8CKxKwR4/vK/7sDmSG+eoiFAVS7unTxtFr0qMDxx8P6tBh0SsggkpPJV1H2tnLtTjUWUamsUtQykTadjv4nu0A7/k7mkg6YP/gv9hDyOtJDxykSfP9HrLvTvCXJ45U6jlAZKlkhml1rjL1mgr2b454QB5P+d8GYsuEDub36PXBgFEspP9e4QZiOoRDpsIy37WOSW1eArhNOpdQ14bTRjwuZ8QIcxQwLv8rRZg/qANXsGm4rGxauEDgRd0TQ1N17qvr0Lj6P2s1T1xkhPjxzfxSecG3hRcMlKlEiHvsFHGQ06nqwO6tymtoWf7lgHcvmqSr9LdumFcsJc+T6YESZiJ0MwkDyHBtPnVFXN+9Osz7vMgQjQKqvvYe+mWmO/Gvb5c+OGhrhlyv1uE5lMlUbG5TjyvJqri3tiRk2PUK0u+ngRZ/z7V3XBktNMeGBXFV0xhLWX7y5jOMre7V/0Hml6eBWxQ7tknBSFMPMiP/iaXiWfEvfXC+5w= 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)(1800799024)(366016)(7416014)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dD0DL/l9IteabI8952yCnh+CoS1r1L0+bm6TmkzzKIlErabI4x+UoY0myRb2ESXoheIT6sZehA9CWNfu0rs+hSf5odrRx9ovOk8AEKStD04TEhdmGjFJUmgqD7P+UlTDFjMmhTHg3n/OKQHMKDvUQwMNdWd3yla+c9mxIOFICVdjL7YlxaLitDIFeUanqjlu1MhOUSdcyBP132qGo3fr0athILRnkeReF6NCGhn7kD3wixrdXj4KlRs8Ao9e9/74NqNwyoIbfhI3ouH/VWL/oWZiu0BqrPhswHH11Yj8XamcDvs9xzc7gHJ77c7xFR8+AJfNjoh2idMJ5EzFbSqsANXjsoHuF+er7z1V/iA0nbadXdLHa+dNZI8s2kQUmstdc7LjHkkOaIBP/msX7ECUhaCS5q8G2aboQy4Uf/0uznZIXbd6T8ie1LNoJ0BshSocbcaNu7I3eO5IEcoh8/+RStqh8yBVwa4nLIaX7fNiBZj3x7+RfPsI2fc3FtvN3JKozvvPElP4x9bs2Kr3JdKskADscN9oOqErQ4rEkBxFIpYjwHLk26Vzfbtw71lkXEqdhhCJ0TWdF2uNjqpjGo4gxZhXQaoWaYQlUutW8obIy7cCBefqqe8fZDxgmlFilg68HpteegQbdrH0XQ85l/Uc5pVooDeRK17o2ob9t7LUoNGNGAg5yagOIpjf4OU0B7jIm/V8kLB+3orysy0D3wsEu5Q92x1SZ9ZW224mx3wY2GnAKZtVuaFKxwcCbUiZm+1MCrDz4fnd+7LhouX+WZ+d9EzqASGQ0BUWxbfYKKiqcWXxMze18nAKfNVfrJH2wmayok2HlAQUaAxcux+Ira9UazkfM9FkcxO17Q33Qv1TYUqTkg10BARi45fmp5dphr1QTLZiQsGMsaowcOpegZazq+QG7Jm8TujvI71H5mcjR220ZRtGG0lbbX2e+SEWoVmnZ2+QYekNGXzPRLqpViVNVtcYG4s3/AIyqJhG6sGuMZd2zd6Qz+t6NBmNwRY7Dcmv8yfJEBRqeIye+8Yt6xS2ts2y79mjyfZLcNW/1FBdrCjshizHk0XdutkX9lxPeUVbq7ohT1EBVGRoNzUBkkDVUQLkWWo5Hn67RpuXalgZIywnErk9etciMkdjGW9YPqvwsk08CQ83fXfIPYSNIj0F4v5E+0wi7zlpFdqD9N0cuLGELWjYItErFMT2WAmndFpLp83VFJEr8LydyHWvaPkEOWnBnLeBQGFKoTwhXYX3di+TEDwuLz7VX+q34sZlH05pnBa6qPtDIfjaLwCFrigxha42jrOW9Re0VLQV0zGVOI9RZV6zOeQ1HrNxc+4wcXXXLdPPnRPzJSvqr6ob3IjKyu+fQiz5DjS2z6/0B1X2hcu5z8y+SQ5wFV4GKCVsTBRNqFveFOKW0su2cKVLdJPT+zPaC7RqkN+ArkTc6EgNe8scOugbmen5SowVeiMp088dkeILs1k7DQMhrhYf1/+vVaq2Z3VMBZ4E7D7vYoOGlRaO0NXafjP1fpzqVXzNciDwV0oPQgThJYrr8ajiRYj/0TdmeDCaa8R8+ARkLdx65z7mndWF1/EX6Lqfe+PaduFA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87d2e0a4-fe54-4d2e-f470-08dcf2754755 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8254.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 08:41:10.3702 (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: dgbvxXuKe0qi7zTRbpI2MaudruAjbSs0TTTFmwWgX7cj8voV5xXwWo59aHunUKp1aU6MKKy+Gru2PNIgckiHvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7831 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241022_014119_462406_0C5259AB X-CRM114-Status: GOOD ( 17.65 ) 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 | 16 +++++++++++++++- include/media/v4l2-ctrls.h | 2 ++ include/uapi/linux/videodev2.h | 2 ++ 6 files changed, 31 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..4c8744c8cd96 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c @@ -370,7 +370,11 @@ 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("%ux%u@%dx%d", + ptr.p_rect->width, ptr.p_rect->height, + ptr.p_rect->left, ptr.p_rect->top); + break; default: pr_cont("unknown type %d", ctrl->type); break; @@ -815,6 +819,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 +1177,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 +1883,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,