Message ID | 20240822065723.1336181-3-yujiaoliang@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> 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 7D7ABC531DF for <dri-devel@archiver.kernel.org>; Thu, 22 Aug 2024 06:58:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0ACBB10E788; Thu, 22 Aug 2024 06:58:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="FndzF8gg"; dkim-atps=neutral Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2078.outbound.protection.outlook.com [40.107.215.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id E020410E788; Thu, 22 Aug 2024 06:58:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BOsh81T83NAHfPE0/Hx4IT3K/lvj66SemP8Sf0xllAWDkXqszeHNxA23JJL2FaXQNjO0YZ3QfcuBgxOy2H4TJfWpLMF6br4DoJAGgVE1DDsBpzX+9GW6q2vpbZWyYd1VQVPDdpYD8KE2ES/7ChqezDzryHFvVj7Ka5SPiBGhX9NTHhbHhHLn59qIAwxvtEMRAo6sDY/cReQsKoDCFz66t3aMFodBjqM+R4KbuqrO+b2QjxGRjobGZHOJHjjDkeAVnfg16n6k/U6dgkafEUuHoCTFSkQ+N68BRUzCYcsIcUTG5iMTgv0A7WzPQBY5U67ixhp3L1zm2wZMkww/INcn5w== 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=KDzZO710rFLkj1elfDytM9c007FIqcUXwciJ5i4GCmw=; b=HfSZJW4hAQoDPqEbR7TTxSUsgul6z/H2NYNgOVReGDuwMudS0acIC7g3YQsln8eiCysqkFySlu9Qxi4AwXtu3jdZWUxvx61FfsMsNlFJYjf35yjgOgZqnZ6cP2pZswGJYU4E7sx2BquJ/ZScGnJxPUvo8Wh/3riwl2Ctm4Nj0vBcDSYrEtz5OmQtJHcIM1KIfLKOpOMNdvVQu80WB1b566XwENsHsOJOnCh+tKeMpXHT2QnMQNHPAaMlvLseNKShOLOpS6EDoAUDcRHBVvLPVfxbT3VerAFhcKzsql6tzKyHOqXbjHrYa5HS846dQ5id8P4rYq+daIaPEv33k1vbyg== 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=KDzZO710rFLkj1elfDytM9c007FIqcUXwciJ5i4GCmw=; b=FndzF8gg3Hxhe+7knGAVeWWe250+xSztjhCUQbYElaEn2ilO/ZBNtDXayltjueb5U7dHVI9Pl2+nN1xHZf3cgUAIOoEjRC2hn4hAVJwnA/xi5DjSB03MDpiiwjbW7Irio25G//U5DqyzCw1lfJ37MjTjC0Oj9CKXrCLAB5AiIwD32n/1zzWGrHXOMhFdNqMZhFit3+aAH7HxEEaMMbK06KvsvUsMCNMnSoGs1zz5XR2hfMajc+T2JQU+dV9S21R1ih0jc9jcTFrK/Aar0AWqZgMmKlMSWclsXxvxlbLzj5eWDmRQZ7I+qucSWKyf/q4+M4JuuewOM2Z+QjRCkw7B/g== 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:58:03 +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:58:03 +0000 From: Yu Jiaoliang <yujiaoliang@vivo.com> To: Harry Wentland <harry.wentland@amd.com>, Leo Li <sunpeng.li@amd.com>, Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>, Xinhui Pan <Xinhui.Pan@amd.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Hamza Mahfooz <hamza.mahfooz@amd.com>, Alex Hung <alex.hung@amd.com>, Dillon Varone <dillon.varone@amd.com>, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com Subject: [PATCH v1 2/6] drm/amd/display: Use max/min macro Date: Thu, 22 Aug 2024 14:57:19 +0800 Message-Id: <20240822065723.1336181-3-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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: 008e3275-4452-4c86-60e9-08dcc277c436 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: R/b0Pe+ES63IhXplpner79lhqJQ0+1B/KUUTGmMWxtcCpa3k7140ZL4wIn8fPGRm+sVE//u4BqHHvVrDLl8mEpLvERLAQF/2KCJr14plzARbtzHwKINxNKALXC20fvZJZU0+FFp4HS0YKJO/7mF0jRzCVuEHYJWqsLOzTwJ/hy/+jd+UvthQlSypSokvnnf/DGpSK/mvsmtCYYteJfGNMBlqqz5e5GAOxHN7Z1Zi7ntXDrBkVzB9GtZyBJhLqtFlFeGNphnebu7/Vm4R/l/JW4FbZ4mkPa3lWL9R/xW1Fxg0FKwliNBmtKAzHqvKgK4ioDE/nQL/2Igx4A/VKPI3OvfknRIftm9+mLD/lgeMPoTRhDlIuHzgOtaXO4HLrahM4Fajr9+ouMjJsL7K97ZieAHbQAjF238NwElgsAIiBBt7J+THXMmMQEw95wBcg/hpkHkAMINvONK+cYM5SbuLu1Qmjb0Fp4g2GRsWldvw1pcrVZb8HZaxGOfBZHk5xwbUQ50ArrbIaZFtnJG6MmStGHLqDgnRuSfovNcmCc0vgpO5OqPySW7vgenx0HPSEo2e2Hd1cAP2g0QHrYS0lw4yqvDsZDmZf6No8pAN0+fozKl3YL0CHR5YeXF/VVEvmkaI/LoLv3fCODxLRSHW0dugKKTFhs2EVxdtklE4e18lU+afZF75+oatjlcWwQbAnwNffFXvnU8H9DN7mV5xmrJ5/6WqfnshW7GqkAefH6AHVUtm3IE2S8NFlF7/e2m7TqTexEqW0hbH0TANiaEs+ae82il2TKRvEjkh2oz4AGQwfUW7oXTtd0QVIpXPDnVHKYdu/n43FpxF9wGUrz4hspuMSTYwH7SuchnIZQz2pMtmsj07I1h5dTnjqZxhkUBMOorg2DQoBmHykEuSQwmc/WxFs8lYEuXrA8E1pTrp3vb8jNA3jfMsRppqVK2KwHrcDxmqWkHahaUNcZ/wqgLl+lTQ83pvoUurChDX6HxmpJ4ulRFfuKtKTdjBMssOmem8wEORcZQ5WBBvaWn00Tw+0I+RTP6Y5EZSlGXT0vBvE6QHq7IHO48LDxcZu71DOdmT1MZDAe0zwTq0CJsT3UwZuEwYHEjeEBVYxUuyi+afNWql2nHjpLjI6WYtb14CyAySptCX+e32VsHhSMkvEM3923O3R0kLs6Z4xR+CXNTOz/c7hhA0YxQUyNpPIR3bIZo/CRq9PGW4bVBkaSyhSy7XdOMmewlN2hXXlLJc1cDO3oUYEya4gp9rGATIim64/sd3N5uEkTFXk6zsCV3yX46ZoSP+dD/+cNSJvhk/OE0nTLBXOHgcaiLEEiSOJqVeoJT6IczY5PAIpgKtBuiSKEK+I7X/O66ZBF55G1yPDOHM6suspO9fX4aDX2h0QUCVt4bwHWjcFsRNm/g0j3sg8M957vA2NWJUVHuPSVE92MkBFv48Bjo= 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: s3Plp0pPgCziqL2v1Fq53wUIb0JAsvX6B76VPL179xJyt859eSTh5P+MLQATHgn2QGwKEOrb953E2r5s2yVOtq/PFxJ8tyE8y4HRFR/LKZBeb0t1njEHjc976fbBYMXJE5F/IXGQEm34fVXneXU1gQLq0XTBioLIYA6YjauGo8sKorh7urReB/htSa/A00mHQU8Tc3kpzHWGv7GjqIPgR/MWK7EmepMPLLF+H7NPE3vsex3f06fyX+irf7N9daDMV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0/AtBcpNcvGQ8b8X5rD0wALE0RjjkNriHwKaHGaMqJeT/X1adumhxNDP1PAXrdX8lURBTCG7vmG/CVw34k4R+ivALP6V0Muybx1m1SoxZ46HezPqwIDMJKk5w7B9nlrFsGFIHf1S+R8LynwExhN0pLFC4sVfTyzl5kN4aAwazNjrI7b41Ktrp7dlogyrEiM1Cf1EZS7lIp6VOWRhW0CB6x9DOpYcigC2doGswcIPheFPeGm2/l2dlUggRyKFQmuPO3vgYSfXlVF6kPM X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 008e3275-4452-4c86-60e9-08dcc277c436 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:58:03.0240 (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: 3rZbTjc5tG/f8I6Ue7f4UIUwCb1NJfixVckB+f6BCcGMvRsU5usGSiYF7ugsgesRzNkzYupLG7aLQtUEPBb89g== 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 <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
drm/amd/display: Use max/min macro
|
expand
|
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c index bb4f3bd7532e..4975d47b66d8 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c @@ -311,7 +311,9 @@ void dcn2_update_clocks(struct clk_mgr *clk_mgr_base, new_clocks->disp_dpp_voltage_level_khz = new_clocks->dppclk_khz; if (update_dispclk) - new_clocks->disp_dpp_voltage_level_khz = new_clocks->dispclk_khz > new_clocks->dppclk_khz ? new_clocks->dispclk_khz : new_clocks->dppclk_khz; + new_clocks->disp_dpp_voltage_level_khz = + max(new_clocks->dispclk_khz, + new_clocks->dppclk_khz); clk_mgr_base->clks.disp_dpp_voltage_level_khz = new_clocks->disp_dpp_voltage_level_khz; if (pp_smu && pp_smu->set_voltage_by_freq)
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com> --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)