From patchwork Thu Aug 22 06:29:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiaoliang X-Patchwork-Id: 13772697 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 13901C531DF for ; Thu, 22 Aug 2024 06:30:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92C8110E745; Thu, 22 Aug 2024 06:30:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="Casx9A7o"; dkim-atps=neutral Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2055.outbound.protection.outlook.com [40.107.117.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE51E10E745; Thu, 22 Aug 2024 06:30:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jIuY3Kiw3rPLakY+SxLvoNfaeSscY9Prponf2NQG2lHCHnK2c9RzoGAj6H5T6w48XffpWOFuL9ufr7v35Nc7ODb40lQha/nUjHr4BZp8LVU0ghcUio5amOpUI8EDU3bc31X4lPeV0I3zHtiPu9a6g/jjNGhEl3FXybe3ixQCabwEWx+eivkG8Hv7kcUMCf+G0W57p/EvefeyTQucPy0QP0C/BMyZNXh7LnPOWEFg7nYFm0bG+o2Wz8LFTE3gCOh+mKo/rc3qCef7Gdlmdu2tEuIOFjH4djwIntJhzzogLpNgzhpmhcnmcki0+pS5mU01zPXNghP/MmHH+fhe9O9QkQ== 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=QUl9U73AJwHEryC8rgDppbT6afUudD0s2LX+KwpTMrGZjdDfwo+uHz+CIl6FjW5Ev+56efVWhIN2n9FIKxAWf+Dix4kFTyG2NuoVhqQdXJemkLq3Eiyz6wNwNCtWfBJKXmptiS1b/LvjlX5kEtPG7xQuyMQ9RuoT7toem/R+ijMf7RUVmNZl8SH1u9nWBLXqJAUCB/EV3hjTdvmdaMc2jVRCWuHaR4BKA+TtT3pCVZiDytVhplyACyqRcp/fyJfBvlE5jyBJZxaA/ynMTmT+MoySTTnEQwog6LyGGKgS7W5c+WKW2NHQrTQpWwAu8vM1mu557T9m5uZRHRTP7IdNJA== 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=Casx9A7og4bHBeg70StAf+tn9S/wAs75FgYFR8kAaU+MIbXEKloAhHoM8Fc243GhIkyQi4Pi4X8AcBpzORE0kr7SaJofDUX9+XmUCMWRA8m/biPCuAKLCX1YWfDdt8ZrzZU8Z2L1V9bPikMApOznUXIjXKzsY5acvK+VBbYvhntxG7mGNheWrtIi+jX0mcaOF7zi8bFK8dyfZ66jqfcsjABOST+1AUCMgcHLxYnXntAbK4iizM+910yzr3Kzt5v5RhqdV9sXyVt3Nl1IIi/Jf1Wwg9ReDuvxxCCc7LdJi1nwjpHlDPMIaF5GOX11NE1O7mr/ZVgh4KVqx0XuSshaDQ== 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 JH0PR06MB6344.apcprd06.prod.outlook.com (2603:1096:990:17::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Thu, 22 Aug 2024 06:30:36 +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:30:35 +0000 From: Yu Jiaoliang To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Xinhui Pan , David Airlie , Daniel Vetter , Hamza Mahfooz , Alex Hung , Dillon Varone , Hersen Wu , 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:29:27 +0800 Message-Id: <20240822062947.1318340-2-yujiaoliang@vivo.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240822062947.1318340-1-yujiaoliang@vivo.com> References: <20240822062947.1318340-1-yujiaoliang@vivo.com> X-ClientProxiedBy: SI1PR02CA0040.apcprd02.prod.outlook.com (2603:1096:4:1f6::7) To TYZPR06MB4461.apcprd06.prod.outlook.com (2603:1096:400:82::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB4461:EE_|JH0PR06MB6344:EE_ X-MS-Office365-Filtering-Correlation-Id: c1205b15-e8e4-4c88-a444-08dcc273edfb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|7416014|1800799024|376014|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: xSdz/GEfs0DaUfGocYcR8GPvZTEXEZhDmrvloha36wc/q01YEuF6X9+9fh+zObkWPJ6OM6X/mOY22WY0fxY00iGjaVV4nB+VwKtocHWcSCx2QUIcsnWajJEy4IYL0SaMXBA2vPh1wos9QIRHfoYxBH0XbG4V1tPdfCy0gTdAUBeednscXqWuQizpZ0gqG5uU+MPxbidWsZXS0x/G2FagBZx6X3g5H2YjBJOpXqsiQjrBpm8q1lW2a1NjV6BWI58FZef9xyQzPrjr7qLZqOucU49Ra6ky+KE/cq8Gjur0CzfokqX72XiJMGh2XFZdJA1x6yIYqArF0M0aV8rw3TpnILPNZXLzaH5pq/whlgUScG6mZnKFRn4s/j3jqZ2PdkpunA/+L0tSHeJ/f/LSQPbiE8PHDoMnayjWWnZnTpCfvi8BtNOAtH3+HytOrputbwWbTWJhPYBqquSWV6F4MI+YsvohD62+b40Eo/pJCwBypc7nQmyfibQc9dqW0u/sPkzNltd7IkyNK67f6zCa+1co+HvrksKJhGlnJRb2I0cPQQohz1GFUFpMqDK/T5yq+mP1zSGIsdwqVoc2p7N6ZEAd9qC8SDM3kTMGVNZ0m5KlFw4wnA19CJTO9xcD9mRqcQHZOLb5bO+597i8NDzEehWw7YH0t21dp1gc4YrI6U3p9k/4bDmz3lUeoMc2zHKlDTg3FEZCh/xKJGkygQJLmNqBzFksgBXVl4JJPGcIPSp6rbz+gr4rxUGY9aTIyEpSQRAmt0gjSsRBpWF5P1+sc2QTp/YxIGsQR02zVkkMKLtRYPYvWF1fs4+nykbksOMbbVe9cGxBQ9esk3FIw+3FaYeO7Ufkykds8hlPqM4rguMw80zyMdpy+tZ9nxBcwCRj0DkyaLLFIwwFc5AgSXFy5xxUc8UFHr2EoRFQa/nMNCnZTw1bWCSpUf9hfv6yvMKc0vXdzHD2iVNEUDt3t7KhoH8yHUyTWrrQ3gMbjRs/Dunm03JT4otHbIfCtCC+FY5eXEk7FQZlgbUaAFPtAMA2WdIm8ULdW2tVWLa+/+nPVL4G04UybZ6e2anNa5jON5XIPwWdV1Sz13hOTc+/iPDRPe1cgDPYsxZHW5xWy9ESWOdAEpIWJ5nBpx+V3ClaMr06fD/MF/+THFSHLSMDDvETUyb0CadLEgCXm+VUvrXLtqt46h8QpBIMr2fOCQB/JM93+/NKdDX7qvG7ewihcjtrfDXHPgEi5bVxyePcA0JJB3vIRo3NeLg0auRewObvpaFgxS/qjWeDP14lcAQaeTY6KZc2KLkiNi7eOMBwfmJuQ8g9SqPTHhmzC21j1TcWbhiYLsdceh8KY9sEzEviJvt/3rlMIqGvnARv4TPkYYq7+JINs+eMUcZUF1Dx8PnbLGEb9jBP0CFeXu3pEMi4b23clSL134z7OuB2JU/j7YnjVpIXPCM= 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)(52116014)(7416014)(1800799024)(376014)(366016)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HpajFXXu7wxnbLRfKLSi6fNinUaJBI2nqmT0Ko0dMO78njzL8Pk4DWA9sFcUPFz4Rsbd2i5l5E6Tqk1zdcshHNNF7ESSD1cAoNdtbLsGAe7mZhDkKSlFASEZShHKdvpFZy6Sd+rWfoB7t52VDEyt+G5BL6+5PaJO7mHoqeoaSFPLtlcUZ4UmDtx1bZoqsl+ykhZSXd9G0nI7cQFWT+KGAtdRF1lo7tUNG1bx58DRpoRLDKfP01j2iz27qH/Wfm7vz+l4IS89tUVKQEFO408Bpqnc0Be3p5YLY0StMzK/iZsIJCV/R46/uVUnhE9p/0cO6JhfrlEaLagKmf5oqqCd5YK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CLp4r3LJjxPgR+VchGP6MWYYTxkxytBBcBoiTbv7qvu8EC7Ffhi01UPtktdmq5ouTfjmaLLBLETt4m2XIIdFQ614ES0qjCroZnBoGlvWvqYyhUqO/O6MlrCr20ENKhvL+IaREnLuAm+pvwKipGuqQF15hK+66dx5WXZl3Uh2+yEZowyn9J4ONLqcJ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1205b15-e8e4-4c88-a444-08dcc273edfb 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:30:35.1624 (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: 4L3WWfoW06rsKNiCKcah2LKPNhktKn4/zyUPM3MbxVMeevzX0h0rZTu6PgBKbu0vau6ppiRMDzgI0Z+rQZRNxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB6344 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 =