From patchwork Thu Aug 22 06:57:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiaoliang X-Patchwork-Id: 13772769 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 15A90C531DF for ; Thu, 22 Aug 2024 06:57:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9BF0E10E789; Thu, 22 Aug 2024 06:57:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="G6WGwiXm"; dkim-atps=neutral Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2050.outbound.protection.outlook.com [40.107.117.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id A223E10E789; Thu, 22 Aug 2024 06:57:44 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lIFdC3qZQk4992qbNI/Fz7MBJwjMomeSM8Vk4oUIh45cAyyYQv7Yl7eEUl/3guHWGtYCkK5sSp79wSx/f1SuXeGqhXT+UGLolISBa3WSnE43cLpaXZ2gAblWf0hdhjmz2J2IfUV2Bx1sPSju7ApWj1sTI+xggfHg0FFhaiMguoA7GT6Ug/fAHJ4eAW76EG3MUac1jxR2YBH5CZWCv/2lJlI5X1khUMUxZ7xLsZJJaUy4onTnIl2WeR/ZYBEn3frvf65JQLPjeGFNRKY0/nJ2jOP3zMqpROaKlUabaZlWuKJXVkPYpMe6Aeo13/Owhph+wtUAd4NU6zKzA53yqxwwMw== 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=AaG5MbNUU+PU5oj5mUfga4yQ1Xw2kXZCJD+gDoOUTgg=; b=sYx8mg8yXAXNRQ0ot2xV2TvfoDNhVL19hU0Ge2MRVZZV/YQSu4yrtsPrGM0UCWcYcgChJi1cBDz8dg5ba1rhZgfMDU4uYk/LuNToXTkD5RuBqxPAKfDyn5SKBhBXMJkoTSlhnOyoVWS4qYxAzKbW5DKQcWPu3ggkMiJibKSqEX/MZAnpESjjwxnc4TkjGaavxVH29M3aMrzLjCCTT7jBos6axeez3rCvdnzEL7aIyW67Opwxkru33NcalJQohp2QB/burXokmthw9npMzwYgr7z5hORp/tToSTb7SyOfHSs+Ce/yXO2mN+oURIQ5WZrIPQMXFZOZpPxRhOQMWZY5wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AaG5MbNUU+PU5oj5mUfga4yQ1Xw2kXZCJD+gDoOUTgg=; b=G6WGwiXmFgPHtLndtyKrnmDonClwby6Gl6hX/ZJH+fdIAtekeLdju8XcSgvzR3cr84K1B87u633BwvqKod6W5yp6HjTFoZJ+JRbuyo/QbLdpIsSAUdLWbYVZDhWZXIbCC7NqZesSAGtFwX4S8zS5A+GjpW5PbZdN9Qod7IuTigQRFYE6JHYJWEqV40S2ruolEeEug+5PVfRgZyMUEJZq9y3Mossl0H24lZOb5/7rGfX34PRvQSGdIBKVoWT3jd73d7Hyx+GqjKxDgGJ0YlfU6wYNlOeX8mCLlORjnqKax/2Yn+bsjgyDaDRQGrbPD1/XjOV6cj9v0HNvf8xYoj9bdw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB4461.apcprd06.prod.outlook.com (2603:1096:400:82::8) by PUZPR06MB5982.apcprd06.prod.outlook.com (2603:1096:301:112::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.19; Thu, 22 Aug 2024 06:57:42 +0000 Received: from TYZPR06MB4461.apcprd06.prod.outlook.com ([fe80::9c62:d1f5:ede3:1b70]) by TYZPR06MB4461.apcprd06.prod.outlook.com ([fe80::9c62:d1f5:ede3:1b70%7]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 06:57:42 +0000 From: Yu Jiaoliang To: Harry Wentland , Leo Li , Rodrigo Siqueira , Xinhui Pan , David Airlie , Daniel Vetter , Hamza Mahfooz , Alex Hung , Dillon Varone , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com Subject: [PATCH v1 1/6] drm/amd/display: Use max/min macro Date: Thu, 22 Aug 2024 14:57:18 +0800 Message-Id: <20240822065723.1336181-2-yujiaoliang@vivo.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240822065723.1336181-1-yujiaoliang@vivo.com> References: <20240822065723.1336181-1-yujiaoliang@vivo.com> X-ClientProxiedBy: SI1PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:1f5::18) To TYZPR06MB4461.apcprd06.prod.outlook.com (2603:1096:400:82::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB4461:EE_|PUZPR06MB5982:EE_ X-MS-Office365-Filtering-Correlation-Id: b77d6580-f358-43aa-6718-08dcc277b7b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: I0q+SS+VIvNrWTIbEm+Vfw/ORIxIJxTiYFGX0o48mkDLWiydYT2Sta+jNxn8mhDDkYvpsq/ZAuq4qjSDZcCAjnxnthSXOzzgiHRvhtAH05mFXoFUDJyAuLoig2h9Ngr3L0WW3bjGcIMHyLUj3gVZ4FPzwtBPKOATAxKzGekxaimOKzZXHWvT93dUAM4s6/CVgLtoOAKWbAyeN3juFOINfRfwD+Eq5I6NFm/MvMZj7CywPvSBja3wN4ywrulBaOgrjWM0EjT+HAGyS6cbypXArPBq4qZmBTNxCnw2OusbvtaAVJ/4H+QAQ5XQF27YMagHyTB8nuYI2slNgnRL2CZGozfrQe0UcQW3Jtfsay8hktPQxO5ZE1Vx1WpRU++6uJS9lR7UQlSOZMd35EVeqs8yFwtmeHiK8bgLCO11O7rbUGzbDb07iLamJkcRTZhuRD9/z/HfqhnQp74ldR8jzKS/9VsP9w0Z30GKkyp4Q5cu7uAaHb/kCTohpu8uHfdXiDaQIt5GTaU6nPP6bJtOSbH4XlMtex/qczIxHPPAuKdAtHe+Zn0UBAzeslZKIuPHKh3q/RJYqkPLnGz5eZcS2zTXcUmTs3Kde66lfciWT2hH+th4pa6NojDoq2ujKBi1u4dzMk0shF/ZTBMBDpjOj57u2LsdbktX8Ei+sJBuhPGxw4AaN0lNy6a6dQsRl6EjwabP/z1shSD/fd5Abl3PPWoo6923rIBFqzIC7YlkXB0YXpM5/ac9i4UpDUlq7Ip9Ai+AqP9n6QKYN4By+If3yKPQZvaonnOpg91NleQaqB+Lmy9Cd+x3kxhrCXIMZZCNWQz7kEdr/fjfu4G9sZ0gpBJYeeB658DwFN6xalyhpGNQTV29VYLasNJUj31h0cM4kIGSgL/r9dqvD9QPAP5QANI6oJolw5qjruLqn2UNrlkmIXoukJwN5Llx3OsRKp+g2AKePkEspIfu8wRx4eZfZ/9bg6/yJtvwM4EFOVdzLU0esFQpOWfV3hCPzGmDVyUxvdrGb8db+HZBDKjPTM8yn0vS67i+yDiDtj2p1Pz9/VQpsjFjeKIr4nzMsxnTa5FPTFhwWhySUBGCIgGEOLPWzt2/knXnHSe2R/THA3VTR5ZgcTezaijYuZMqWx6kH4yGyEoxDPtZRmGLcp4C6CvXHxLieX9JXzJGwMZRF8urWpRn3mpTSjyhcsXLTncfOutNcqj99QQk9bWpgGuh+3H022dlFMxetuBDLl5lQdnwXxICE67M6RBRWx7zQxd7QMQDHVy3gya/CvBcqJcdHBULVBsADmCoBZ0xx3nR4uWMrbz6zbaiOsXw8NI/aLUIIGRCKujIn+0qdE8xAYlh6CtsQqxdsp51G0TiDHqeXmniOzgunAoSIYWzKim49Jn+YD1Yxlqd78pCjTW9rk2aSXvqLThoHHb0OmCY9Iz/iuFvAeQDgKY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR06MB4461.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sYjs0V+LXl8Ut8X2SbZ7Nv7qyxYhOMbSYQOM3UA1hkGWGrjuhfnkF3RaigU4u8uQ9S718G7AcYW1e78XkxVV+SfQ9d5EmK0GrdoKCAO5r+YYFViPqvYqEI0tqbuODbK4KhZXUvR1ifUNtcNNro2tgLv6B7pCvdZ0lgN8j14+39wS5/te8+IvFDGYSKpGIKa7qYbhBbaUomMELUZWi2/8uDs3Tw5llv27AxAQIiT3w14INbTwOItoICs9HAWSaLc5dClxBU06aL+6oyHxV03CWIDkkGyqoUaNiNNHVJEFlC1pvO2WO2kAmyPIyXnpD9WPxI/dkX2M3qxYBljj+4AJrWVzmN5QkwcOjSZL/Uz/oJ3GblXK2akyG4UsJFm+v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k+zWwHArGIEMezqOjFAOl/iCWIqq/xf0lCxCq/5WpRISDm9nXiiQAi90Ck5C/t3ggNQRlFJVz885BFuoHSFs3IFzetT6hlNIOkbbj48xfcyD8cxFSavQPw63Sh6iXVdDUo/913UrllHR1s0t3+DA2uqgD X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b77d6580-f358-43aa-6718-08dcc277b7b8 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB4461.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 06:57:42.0609 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OH/wQfF2fG6ESyO2PDBAz31piNXdJNBckutnqvHsfHLg09JGjuALNzcp7R3wTFECDc/T5cqQcZ2eZmYDS3VyeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5982 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index 3bacf470f7c5..f8c1650eb21f 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c @@ -2300,8 +2300,8 @@ static enum bp_result get_integrated_info_v8( le32_to_cpu(info_v8->ulNbpStateNClkFreq[0]); for (i = 1; i < 4; ++i) info->minimum_n_clk = - info->minimum_n_clk < le32_to_cpu(info_v8->ulNbpStateNClkFreq[i]) ? - info->minimum_n_clk : le32_to_cpu(info_v8->ulNbpStateNClkFreq[i]); + min(info->minimum_n_clk, + le32_to_cpu(info_v8->ulNbpStateNClkFreq[i])); info->idle_n_clk = le32_to_cpu(info_v8->ulIdleNClk); info->ddr_dll_power_up_time =