From patchwork Wed May 8 09:17:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 795561 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2056.outbound.protection.outlook.com [40.107.236.56]) (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 932081A2C03; Wed, 8 May 2024 09:18:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715159934; cv=fail; b=PjlWuhwB8k/cn/EAp73H0OPDzBBw56aMo1G/V2Hw7LX+NtKyztY3mk/yahu74oEm9udqLXUdVVg0xL0rRE6HUggeS4ZW6JrLfPdkvM/DDFar2IPuEiO+GSefYR8TBcghIG86TPrc7uflDZXzjNBdNLQqrdKVUPzclW+pAH0Jycg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715159934; c=relaxed/simple; bh=wmwNt+vVkf5rSiy4hPWhhqYWAHMIsOykoB64/rq2smA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UOsJEMQ5evYuLCrn/zkzVjjbtZu3kPnZ8gswVLMxaiVes8kOd6wD9o+UnPTOq+DiysYB+D7oElB7csLblQFCyntE9KblyBqIC0L45qiP2Gm/sz1wPrk1mZa1NGY6CdQJ194MHE5+fvtD+vrjsOkxDVtD+bcTAVI+lfdMoctEvt0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=k3384num; arc=fail smtp.client-ip=40.107.236.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="k3384num" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C+6pJtXiqto3khdnhVcFK07cFc7Tp9RaFEyVfXx8rToH68R9jmxPIROSMPMIV+jjwg5T/DUtYR/d7USM00gsnZNVf7vzt8hSdRNfobYsKkt/Tjrivad4dNd5bsysiHdwoqj8RYkMonypVfyZyvHaPkO3rtHEV7MomSX6fH8gAckeKdFxGEG+IX7zv9zHFASej0yEVP97j0IlN5CjfP8VtsRsKdxDaWKKDqIa/P0tZvk3ei1H3T+pB9ESjozPELoSyBbfGUTtXpmyDHD6WZukHl0XesRSpHDyj0AzGDmJdG4zzrxgWZOrnJSuvvJsmLx7iOJMPpiwOJ8nwGEMVC1vIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=NQB9/+jg1Bs2CI14TO/laXC/4HAg9S3POaQr+xhNlXE=; b=aBsdj3b2D+Ni4lFKQm1QwduxEZldLaf5SAulJInpUEjWd7ozVvNAe3H6z2tBxSqq1BeM2qjYNvTbkzwSRk/wAItUBgR3geg//Eo5pIyhZV/qf1a5q8y1Lvd2qnU5MjHrRpaLADJR2QdxBOtG5kiebXf+Q1CbJvil7BDOw8+hI/MvUa9xBu3sJTn7NUTF+9xW9efybe4MqEi09MI+Vt4VRs57bGjgsmBLH7Vd1dz8uRFrT/0VJMAhRZHDHQ8HW9uVKEIjfeIWJ5Gn0qEqonD3Hx3maRtNjsL5UbPTjqJqbjUuD2qi4SqFISAzasmJfaywZPN1EBy3BqTDUqz9Z+LTpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=gmail.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NQB9/+jg1Bs2CI14TO/laXC/4HAg9S3POaQr+xhNlXE=; b=k3384numg5GUu339VTIKy81gveNSY7Uci48ljyvUNQNRgPPiIHanbMvJJyA0QGG5a8dY2+8EPddFW/ChJwQrqjyxEbZcJDiygz9kmmPunxx5b0ytO4C/T+3uAOILEjsknIwAyUCMQBcxH8sBraJgSpmLXTaxRZPW6cchse9owwbDcMFTSgcsEOyL7NevnGsw2aTgMhjoJAbZtoOpdeN2MSd1lR31/SpdCgU3aeXAlFHtAcmfLnsxIwg3HWHjoB1VLGjWVdeXgj522qnGO+V3+z3GVXmBlzBdbhEcX1n8Kh3yrMagl7rfVogH2zAZ/ZTMU1qzUZ8sY6q5OEr8ioNAjw== Received: from MW4PR04CA0288.namprd04.prod.outlook.com (2603:10b6:303:89::23) by DM3PR12MB9352.namprd12.prod.outlook.com (2603:10b6:0:4a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Wed, 8 May 2024 09:18:42 +0000 Received: from CO1PEPF000042A7.namprd03.prod.outlook.com (2603:10b6:303:89:cafe::5e) by MW4PR04CA0288.outlook.office365.com (2603:10b6:303:89::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42 via Frontend Transport; Wed, 8 May 2024 09:18:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000042A7.mail.protection.outlook.com (10.167.243.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Wed, 8 May 2024 09:18:42 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 8 May 2024 02:18:26 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 8 May 2024 02:18:25 -0700 Received: from moonraker.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 8 May 2024 02:18:23 -0700 From: Jon Hunter To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , David Airlie , Daniel Vetter CC: , , , , Jon Hunter Subject: [PATCH] drm/msm: Fix gen_header.py for python earlier than v3.9 Date: Wed, 8 May 2024 10:17:51 +0100 Message-ID: <20240508091751.336654-1-jonathanh@nvidia.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042A7:EE_|DM3PR12MB9352:EE_ X-MS-Office365-Filtering-Correlation-Id: eb34d998-5700-4cde-cff7-08dc6f3fdaa8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|36860700004|376005|1800799015|82310400017; X-Microsoft-Antispam-Message-Info: XeoF4xTLUJ9PP3osw973EMcRXxHm8sHbIEYZb6CZD+UpQirkM6yTdEeKn655W2z8k6gljrS2Yud1Ti+ZcqtYJUhaUKwDW11PyDK2idrkKjg72F1ycgoR8lvctf5O2Tqy3YqIihgvvNslJZfEQTRBApDDckdxvPBM3oJ/vZOq/jPL2gZk1CnUxahXm6BzYHRtyrXCBABavChCeyUOXIwR6bPBLQmF6trb0JQyznKVHW6+d7RrRVN0ocX31ZAi9gznkwWdf6kiey1Ag3uLBS5fUMwTUX8pCE4O4eIMKZrdjyLdahrWGiiHiEyYOJsr1KiUy5nNYP3RRsUPEOG+OQPfSTs5+pcZE5DSK68eTqOeX1ApilW9fFWAQcHaM9U461TQkDYLhXcay/p9hLfhlS6cIXY/6vY5+UI6YDNueXrr57iPjp4fD5kqGArXtI31J3LLBkCEdk009HfuxGBv/pa9M+trxoV3/J4gXlYoFGsJNvMQtWWRkwHkFX7tYTEjqS6T40xu88o2HdQ6cWk6JT2m8n7nUCUMCGceLvcfygnaGJGjJWnuq8vf4g5azVRlCCTFgdhBXT2GKozFS8EWDprSViPdkwCNYrR+l+EyvtPb2SzLvImACURHJWQ4NptFA7lrwVASRh/8OtUDuCWS2I7zj1JVCh/3KQ9sOjEr5ZowUS7lhHDJ4IIOT4X5iZcyfh9PTtDtmz9m04SsSmvGMH6qGmu7G37VwKV4s+Z6skJRA0KiCiEPa9SGw13+jbhH5y11nqYhBGvhaqgxjetNvRAvvuWnRshmy502ajnizmTeDzSLOH6Z6t1QHDBiuo4bv/3ZbrlrrgQRvq6+x4bXbfYVrYwsmUAmSrMdirRtjoUoSU/Po0DoZVF4ULqzeMOLyDY8AV38Kw8q71ShJb4pTIn8ncOjIQwe29D2Q/9G9LmXOuN053piyyo3F2Q+b5kdlqCHFPUDh805kfBVM69SSsrXadZBWSK8lzZ4H/OFVXkvvPRj+Dd5hWDEbUiEUtij7EF4lXVfX5k8TjaPiIAGBgVCX9ZQxbqsmKdSQhJ1nwALPzdM4o6KFwwVuIxMlhvCWNa7M4UUartkRSasKRkHVDZ1U+vJzj1zRmae+1Yfq5YQCypDFwSxA1RB5nt1oNXy8/R+ii9kf+wTYlq1GJyj4OevNJ4qGCj3c0SEWEriQXeTR8rY8chJQpvnWfZtAIdvSQxVaAPF/KDHu9mCFt7fGRN1ibZnmnMLcAoFWVGtqCJ6sm9vtei/mAx9USqV1zFKsviVh9OldG4raqOvIVwoqlblXFWhA3wHSsHcYPYJLP2IZ7tAmGQ8AXWvZAkHpu3zCNFpidCo885Vx++F4CHCMwYVpv0s6Z7OlW3a6pT5Qc8dWNf7foBurvpheyTp+O5yrnFA X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(1800799015)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2024 09:18:42.0324 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb34d998-5700-4cde-cff7-08dc6f3fdaa8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042A7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9352 Building the kernel with python3 versions earlier than v3.9 fails with ... Traceback (most recent call last): File "drivers/gpu/drm/msm/registers/gen_header.py", line 970, in main() File "drivers/gpu/drm/msm/registers/gen_header.py", line 951, in main parser.add_argument('--validate', action=argparse.BooleanOptionalAction) AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction' The argparse attribute 'BooleanOptionalAction' is only supported for python v3.9 and later. Fix support for earlier python3 versions by explicitly defining '--validate' and '--no-validate' arguments. Signed-off-by: Jon Hunter --- drivers/gpu/drm/msm/registers/gen_header.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/registers/gen_header.py b/drivers/gpu/drm/msm/registers/gen_header.py index fc3bfdc991d2..64f67d2e3f1c 100644 --- a/drivers/gpu/drm/msm/registers/gen_header.py +++ b/drivers/gpu/drm/msm/registers/gen_header.py @@ -948,7 +948,8 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument('--rnn', type=str, required=True) parser.add_argument('--xml', type=str, required=True) - parser.add_argument('--validate', action=argparse.BooleanOptionalAction) + parser.add_argument('--validate', dest='validate', action='store_true') + parser.add_argument('--no-validate', dest='validate', action='store_false') subparsers = parser.add_subparsers() subparsers.required = True