From patchwork Wed Oct 30 02:43:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 839992 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2084.outbound.protection.outlook.com [40.107.21.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A96F1946D0 for ; Wed, 30 Oct 2024 02:44:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730256265; cv=fail; b=eOwwR+pHN7+2I2x0Uexsjjj9slNdduG1BwSyMuPTohW6bOXGmF7nSffVs89M6yLvU01Q1AeVoOUIV3aGxVhrHU+dOVxmgY26K0pOVHJnwPv0jaUBLFnciVLA2Fd6L/5jRIQfjHtWCzy3XCBavB3RkUV0sUv86BHVZlVl9hPprCc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730256265; c=relaxed/simple; bh=ivRJYMbM84wlwp6uoS2CN9T6O0uhk/AnaPNw28E4t3I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=AP2E0TeRtyVkx3HTz8KFhgXkbUpleScpM5jHqEYG+vErl+kVzNkfXdsz9cYsHK9eI0gWLAhafjV6vGp7VTyd1sWaMzHZXWD8V0DlbZP4jFmmNFiQLtURaBciPdhD8RTztyRCX4Hmv0729gkceMHvRI3/CKCPSThtl4gOllFThM4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=WtwnaD1B; arc=fail smtp.client-ip=40.107.21.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="WtwnaD1B" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iHXatLrYWcjztKjZsf0ug5B17T3y3kKxQExX4JOayUMRgR2a64enaeYAp3dv0y007w3UpP2as7nRKx49FiS3t+EEQpIzUCJl4HiQhBxOtOfiAedms67chlLt2sGgB/22O22BaO0+suzUjJy2Fcka9z/4wbcrA0TG8f9hy5AQkzGCQXJnoD+PFiTmv1BeOZsGirKQ8wZAqvsNUzqvCWSM2qOJcAIOPlStVI+SJ3ns8ToFamWgNaFZEhQ/dkLl8EqKw7s5H6W7WGRh1gMPSmonaS90USbMdaVn+2tzX1BsUhDpNwaiObxEhEIXpsJhqFnaZK57Gd/6PMi07lGHc6FRHg== 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=iffvyjG6tA622hD79Q1t/g9sqjsxD4ekfSLnY/n5LZs=; b=yPJU0d+tAVUjMYqr3ORkFBev4nEODYnI8YGX23/xTrAlmQOBwiu5EMbXkNlaOT217NzbThTunORO5gnHSCVvpNZ2354qcXw6tFI70nNdbnS4LOYYFzrhWGHZAlOcuwi7xwlJ64USPVb8DnBD38//XUwITmCcboWCxRoFz6c5TKQ8d22FanJvtI0sVnVRg8S5M1iurioObgejYSAnOhHz4HWnT4XRtiV9+Drg5OwkqHhQdS2lfMOjN9ot9bdI2zAFzv4D1kJNkYmGCEE7pRYdS2fw2a90Ea8Kb5Q8aBAKj06DK+xwDrn9Y1EWEkfM5QWdHMVOQ04vxjCHkBM+xmPyhg== 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=iffvyjG6tA622hD79Q1t/g9sqjsxD4ekfSLnY/n5LZs=; b=WtwnaD1B686a/9+cRz0t6t0HBjWRq1RgW7QtAW6cO0kepZsKq6eONvXZDN09q/lE6mWl6nbzDLgi2C/pFvetVElh1s7TG69ovWNwDtOz0rLlBu7WKBLN/Y5ye9zgUdVaSwww1gab1yB0rshc+i6JIMJ+Sck44hsplL+K3eSyTYJQlQa/mXjloWkz32ac488VuwO9AeadWOc7Cx4RHk7puawnV1lA6urN80ch/3X94yRQ5+czwl7dfJO6Qt0KGm2XTeRNDlpSvTrZ9O0/ofIYccu0WBpG+G9hZd6GiyJJXNHHsuYX5pGjgLtxLInn2MbA1HRMXenLqEmRez1LRUTPHA== 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 GVXPR04MB10729.eurprd04.prod.outlook.com (2603:10a6:150:226::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Wed, 30 Oct 2024 02:44:18 +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.8093.027; Wed, 30 Oct 2024 02:44:18 +0000 From: ming.qian@oss.nxp.com To: linux-media@vger.Kernel.org, hverkuil-cisco@xs4all.nl Cc: laurent.pinchart@ideasonboard.com, tfiga@chromium.org, ribalda@chromium.org, yunkec@google.com, xiahong.bao@nxp.com, ming.zhou@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, ming.qian@nxp.com Subject: [PATCH v2 1/3] v4l-utils: Define V4L2_CTRL_TYPE_RECT Date: Wed, 30 Oct 2024 11:43:05 +0900 Message-ID: <20241030024307.1114787-2-ming.qian@oss.nxp.com> X-Mailer: git-send-email 2.43.0-rc1 In-Reply-To: <20241030024307.1114787-1-ming.qian@oss.nxp.com> References: <20241030024307.1114787-1-ming.qian@oss.nxp.com> X-ClientProxiedBy: SG2PR04CA0172.apcprd04.prod.outlook.com (2603:1096:4::34) To PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8254:EE_|GVXPR04MB10729:EE_ X-MS-Office365-Filtering-Correlation-Id: 514b9e16-0512-4e6f-126b-08dcf88cc052 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: HJ/Nigi8uvlpKdhU/TQwvvXi7eGXy3oecW7133NriVjk5KoNp5QBmuuanG2OrDArGXD7mmfx84jYTlZVa1kPpsVV2N+SLRGmPBDm+5mASqJjzK1TjKV7mkY6DuTH2gIutbITTTtRnYPD+L2g9cIUdC4E4sTpu8H6Mw4HfdcdzG58d6pKL+wE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HRZT+Eg37OcJbx69FZK7MqsIyprS/sPL6qILRPgIZi7ffTktaHnwhOqEHITLrwj+I46ign8Z1uREVl9Y4mSWp7sEyekrSllLatV8W1TW7tOsScUX7jmup/t4aU= 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)(52116014)(376014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zZm8YRqEtC0u/qHde4PpGv62wy0UA0uWAm8zkgbfu/BCPOXDuPR/Vhnm0TESKqFZtzoRouMURLepQvVoNUZTIVE0mubs7TiotY8iWuuMsg2BNB/tSzGpXji9ABAS4IDaKUD/vlYTXbnr+Smgf5s0+VAE4mXXGEg4ylcxoMHfbSZMTyRZh5C5mokSBUNjFUUQMkIp45iaGBG+iTEBT81/nGreK8CKywuCaLHZ6BrP4YoNO89dd0ind+Ev7aPeT8ion81ibSZr/S5qBiElTtij/s2CMLBb/FTurREYCmnkXYWptqVtUz/AlNE/BLPmZH2yxqvyaNaKZ6JzfZZyGN/TX0qJJe4b9AzrDMYYKi0+JnG0YLhK7gxkbCN8rajef5iyaCrfpl64lQDR/r3Mn7XyloK/bL19Vz08/MzHmj5Qs+Ugucz+xSrsoosejM6wR4Rt3cGf6SemeZCzwBKcJc9YZMlgxBOL73pgvTwhmM5+Enj3FL+oXnJmTnHVd391pc9M9/aZr3Bh02sDDNP/I9ZslFlwl+NbBP+eoMtXVsDuMOuMnikAzd7C3425jnEMNcR4FiT+Xc+YmerWvo4YnUTBpeb9G43uq57hO2nXEprvK4JKd+TwxVo7VUdTkpVskUQsbPLytTrj7DEvXS7eCBVcta4FxxOnK0/Pb2LJT81XdjwRhlBC0HITbbdERklFkSfqZqtl9vTap/8wBC4lCWuOtsBF6WqEQUPP9lR0nutgmkKYkfDgUJGDIgQFGOjSD09IvAsJ6zu7nJTd1OyIcejnGabt/UTUSuOhamjb2zQH8dD1fD9ipG6CO0dpsZr98Y6kW4eY7F7C/WoqPpl4gjwB44i6oWLufKR7I1sLnckNVFVVUngN0UyNiovYb/5aW+0hTfLTJiBeS8/tCWHXLolJJBPw3yKrtIABG12Y1STZEbeYXhqZaba7UwRLej3VYq9lTXYV34wGb5UHLcsb7PDBwWNmNqdfqmcZUGOJ4xR9f8W3sqwbaqbfxH3LH7Ym9+i+PKFdnm9ENOcNl/fyNWV7i9ZZbLB/9rGbo4SXdmOb7Fqb7Wlg4J9ZxU7WE21OHYRexR4sU9uwrgxwZjP/jdGXBReequ6Fe+bFiTXG5qpja4ig+lsFqE8yyPuoeo1DEhYm7ljV5sdkh9AetgQhtVY5r5gBLzZRovHvAwQFOTjurWTDnqGIdNylt9SUU2VMyK58YwFNq4WYdJUudAYmWNyZP0Gn6SxPsLVdkRtWZ8vnpPjqqzLmm2q2K/JU+H+PqaxLCreBtzei2ocYfMQwe+WwZ80BcR7aFMO2a8HuXwm1mdOjvEOzxnnpZRHpGgsP2oFctAaNYlFEwGeFBpSmy6rgsSRtJMOnWVB5hOMC3LXKwjLSqecnR28e6rIfXocoYKUeUsimMcaGJwkWiNsYp5zhkdUt3/V6JWmRn2mYD7SpOCc8AKbhwiSUfqTwsfwf5qL1np6lD1qdWn/jSwWJzjd8U5c3+kXLbNiAWwBU+sKeJDxg4jz1R5TXFo1jSityHR30I0znxhOzs3sESl52blcjVA9y25yJMScb8c/mXs7eiABqn+z7w6YpEBCqeoy25aCN X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 514b9e16-0512-4e6f-126b-08dcf88cc052 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8254.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 02:44:18.8228 (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: 35d88eAwjuK3byGCAjAi7WpIR4f17EAvG8UPJHuBcQScOYuCh4MczkFOQ/SWPqL/hFLmQVnMvmGuWl+G+tYuxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10729 From: Ming Qian Define V4L2_CTRL_TYPE_RECT and V4L2_CTRL_WHICH_MIN/MAX_VAL in videodev2.h This is a temporary patch Signed-off-by: Ming Qian --- include/linux/videodev2.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 23db72afdf60..6aae7e10e90c 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1816,6 +1816,7 @@ struct v4l2_ext_control { struct v4l2_ctrl_av1_film_grain *p_av1_film_grain; struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll_info; struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering_display; + struct v4l2_rect *p_rect; void *ptr; } __attribute__ ((packed)); } __attribute__ ((packed)); @@ -1840,6 +1841,8 @@ struct v4l2_ext_controls { #define V4L2_CTRL_WHICH_CUR_VAL 0 #define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 #define V4L2_CTRL_WHICH_REQUEST_VAL 0x0f010000 +#define V4L2_CTRL_WHICH_MIN_VAL 0x0f020000 +#define V4L2_CTRL_WHICH_MAX_VAL 0x0f030000 enum v4l2_ctrl_type { V4L2_CTRL_TYPE_INTEGER = 1, @@ -1858,6 +1861,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, @@ -1946,6 +1950,7 @@ struct v4l2_querymenu { #define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE 0x0200 #define V4L2_CTRL_FLAG_MODIFY_LAYOUT 0x0400 #define V4L2_CTRL_FLAG_DYNAMIC_ARRAY 0x0800 +#define V4L2_CTRL_FLAG_HAS_WHICH_MIN_MAX 0x1000 /* Query flags, to be ORed with the control ID */ #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000