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 = From patchwork Thu Aug 22 06:57:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiaoliang X-Patchwork-Id: 13772770 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 7D7ABC531DF for ; 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 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 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> 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/IXGQEm34fVXneXU1gQLq0XTBioLIYA6YjauGo8s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zebGyYsWr5MQGZRvEtocH0cDyT+YkVJMJJo4VdNaNOPNGrSm4uA9gSEOB2eFDT4pi7C1+QIicp/LySA37+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 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/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) From patchwork Thu Aug 22 06:57:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiaoliang X-Patchwork-Id: 13772771 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 06E0FC531DF for ; Thu, 22 Aug 2024 06:58:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8266410E78A; Thu, 22 Aug 2024 06:58:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="OIaJfNVV"; dkim-atps=neutral Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2042.outbound.protection.outlook.com [40.107.215.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2919610E78A; Thu, 22 Aug 2024 06:58:10 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PEyAiAKVnisnRvdOLjH+LetB3QR/4FKoy3LrcHAmRn6t15myFc3+ppJHxIAdpJyS+9MS8DaZ2Q6+yz/BvT4hPBAp1xsbtalVqtGfscQSiZibgy6JVsckCSwLGEgJ3LezP+5M/LZnRludGJYW7SG/Cj29qZGADvFl1PzJujMMK088WhsJ1hkUpI8KI8H27DXxJ5DnECKH98zcOhPy76wug7Ih3oRmSTd65LCfJZQAi1Uc2eieJjJ5JBLTaJRq8npiwhGpcMTwf1tGCHbUGNoL0gAh3Vpbz63FYaRe6Pki2OvjcTQgd8TAWLqJmZiO6T7QOGhpyCCvFe0I7If0KHpGEw== 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=WPHFiCX2D8HefJU2ksWv8ccMuI1S9KxOQ2E/bdwcOTg=; b=IbazQVhYa4afpmtpBgr/mRsBhC10v/UUKVhJu4HHTcJypkDSNDDHidRnLv0kH1TA4e+YzzLtV95g7aqvgJ5GjofRXH45Ws5fRAplX3FlQyZo+4dueK1RP8FstGdcRIe2zksE2d76Pe8tS5Dp/6UGt2siPd4sOGFmbWxrj2VI+QNr2v6Z3AkOKzK1Zg9PdWSIpxZuiq6ybnQQY1HETNEptA5hnqv/vVBgLkyLFpxIgcDEhkwbNQ28WE2B3acncMMMAEZqrq855G4byYrllmAb1lIkeXzx1WGz5SR2QGP34AKenaXuJKQ4TqI8F8uhkW+3JDWXjGkm3t+kvtpco7vF1w== 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=WPHFiCX2D8HefJU2ksWv8ccMuI1S9KxOQ2E/bdwcOTg=; b=OIaJfNVVFIDpxp1xSNNJ79b0qW7fXNsItkqm3S4BcwXWGLGjmjMSYd9vjm78s/d8xsQGyPe7Si5Sm0FCZFdWAm3D5v2wq4kh1qQoq7DTFTu9zQJO/5n5XHiUxYXuTD4jsV4sELaO/usOgv25+CFyVErJnEBihGmeHe4T34N+Ir/zxPyt3CYd2cO7vjO1RoA2gHba+p6noS1tbG0q8Eqf1FcI8r4CVu/u7dtkUl333UoagL8XC/nEpdl1pcLfGeP+MhQk4gXpwEr10RY+yubAZeiseojKbctVM6KrCj9KoMt7YxSDfIVFMoGUhSCDk6yNI+DF5w6mPa1Rr46Dd2CGiw== 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:06 +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:06 +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 3/6] drm/amd/display: Use max/min macro Date: Thu, 22 Aug 2024 14:57:20 +0800 Message-Id: <20240822065723.1336181-4-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: f2e01031-52a6-40d1-2581-08dcc277c62b 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: 26aEPKw2VQsGPqlZyaAH6jxoMgIqtjZozWAbm5AfGiQLgRWJJGPcM0zG4XjEo3+5JCI2KcXSNaJ8VXo9/kliw/epjengwHl5DG/qrlfVsd+pJU60UzE8BXvpT9LissiagM4bLjtNO3BVanRyc8+Yj5/ucPF9YD3ai4/DR/7iLCh2+Bp9yN4NPxoyVeicqDKuNJIzSyFyaXtQNa5Ifh/OpUUNUdJD7sG9v5T7xc+O8XfaPYJwuY4nltdfYM8P3hOoLtMnwuAgo4rG+9dTOE2TZpudR931gEbzP0LpdzLNtGtf0M3dTG+xQVbfC1EGP1pZuo/PNBMr3EVnXHFGzbCrieBAJPZSZTN9lzWwAwai7JpZ3vbbwd6IfzjuLOhuImZOGHWK2QaCiA4PFAu+kvn7Foz8+msVuMSawz53NXrivVpMWL7KSUknd2fnzHT0KF1g9m5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prd06.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: 3UNe0DLxZDdM7Aa9Aa84GOPiiO4yB0sA26n9hRCDgLG9pE/tNx7qlVL+Z7e+5tpsS7F00fNdWpK14UAHugsKrPerhDXqJsrYD9a70L2xOrK6gUC39qo6dEmxozZTlUFZ20SJjbIfnSkU+r7nAipGoH24fkWHugXdzY189clV+c6ZstYjdglWQOcrS9J4B0LADakfunXUsFjnb5S1ZjV6bm9Z6mTBIFcQNDH8DTT0q0LrmmB2tB/WLMyxJBJQ1RQ4ODtHYzwcwSF+bNj3RO+vzSnIt+YGaZwnDNKDyOTsGLebrWBraHjM1ih3QTscOMuRPzi/4pjwmlmcRnssLPKQWmfmIQ0Tcj2l3NITOlZexlZjyzvzQiccYlbH55SfdVZG3LeZg3fB0axrla6vKo+hG8tOI72lbjJ/TtaXXoz9OvtW7n6zf3izBbzb397izwQ7OjvN0WcNN7OSeR69vqxfOiX3ecgNH9qw8O0u9bugmLPN883Ksx8TiOgE5KsLfvfz0e+je7k3R7wtptcoKbWEhcJ2Gy/IEoG2bnXU7p3H1Szw6YWn0UHuZIMs0B8b5E8ictNNYuvHhymLUpFStSlexkwAkzc3hV6H+pkS2nyjmieSEYFFlimFXfcFSdkPZygNusfxloRBbFKoFKyZ3DlwhLenwaWDF6xxYJnMpYE1vDcxhmMWwBS8HABX4mVqfZxs1xr17QTl/haO+UGXvJa9RJIi5EWXAOQx5vUA5n+ARjBr0NN9BRDh77Z/slfqDZ/gW3nWYdCGN1vTRliuwDgloK2D5KxhoLDp4VaNM4WR/iPrLx5jHE+KSsu/+dJ03ZQu8MKqmvgsJG5eptXuZhhKhhTCgZxTMjTVKAE/EWfSw9a89UfNov54VrNSQKCiHk/9bCLGFO4zqQgOMZBwGVibWn/Sg1RZ7QoQaZJ8IYlvCJxiHSbEnCH4AB8o8VMq0VuX/KQKsg8JxbkduNHFxRxVPk3/4eanp1FGEvREflxcvdrmdN+P7oDr1uMwb+mkXmrsv+0Mm/UPHNzdFJ55T4mVrA2MryAvebeNGEggYhjnbIg2yTD/qgtZxDv03qvLB7wufFVJCZAvbeCbFa76jehMBLd3jmBh6PNhbarTFl/eek3aVLuu+UrK/auMlrUZh6iqsXPi84+eRLGjoyNhAYgOEtKuidNbv4S74d4jGHAmT+dI+pETULNP4aRmn0buTLZEaU6izCD11lVv6fmOEv2zGbcqI07ynl0b5Szfq5Xbrap4qtANvS9s1yev31tLa2diDBtaHwSoqX21TFhl1zdjX9wpSiQPBPqxc1m/Jtn/uQtbVJJzQ3w/YddfFUhJfVe0NA+kK8z/4J/2kW+j6e3qxYQQiXa7xJ8vhfer9rrvThr89MkU3qTzSNezA/s0GSLks2lYIl5u0/C/D0sg4NeEdBSuM9KG24S7cuKVFgYklnFYxb7iEBIHDQI21ijT0PMQKH9WQ2R33EcAOJFYkgBYqKQj5HI9ZNkAW+U4JJykekq73hGyuKraeJXQgKgIRbysNZi9RMQyh6kGJXamLlMgYr7Wu6tdruvAx9fu7ntK9G6ECnCpcvily/Gw5hytGgb4 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2e01031-52a6-40d1-2581-08dcc277c62b 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:06.2919 (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: qwSD6oG6wAKy4eibIN3hysK9n+P5yr9Z6qMQmnlYS6Ufpvf9uxeVqRsR3UsYnGo2GhAJnqMWfuLCG9N9dDrCnw== 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/core/dc_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index b38340c690c6..5d40f61261ad 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -797,9 +797,9 @@ static struct rect intersect_rec(const struct rect *r0, const struct rect *r1) int r0_y_end = r0->y + r0->height; int r1_y_end = r1->y + r1->height; - rec.x = r0->x > r1->x ? r0->x : r1->x; + rec.x = max(r0->x, r1->x); rec.width = r0_x_end > r1_x_end ? r1_x_end - rec.x : r0_x_end - rec.x; - rec.y = r0->y > r1->y ? r0->y : r1->y; + rec.y = max(r0->y, r1->y); rec.height = r0_y_end > r1_y_end ? r1_y_end - rec.y : r0_y_end - rec.y; /* in case that there is no intersection */ From patchwork Thu Aug 22 06:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiaoliang X-Patchwork-Id: 13772772 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 849D0C3DA4A for ; Thu, 22 Aug 2024 06:58:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AFC210E78D; Thu, 22 Aug 2024 06:58:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="M1RMuZZs"; dkim-atps=neutral Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2072.outbound.protection.outlook.com [40.107.215.72]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3118A10E78D; Thu, 22 Aug 2024 06:58:12 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cjZjhjR88VC/q7HrLKEc9OSgNGWLZ10zf1Vgjorxqiiqq+N+WRyWofCxSBp7egU0/crnOUwLcbGC0PPz2iXTD5LvdDBZA6nLBMmbCazWz0OjWEphdKJLGnq7b3WGpgUDAuPr+uGACd+BHuY47scz8nn2wXhTTbJ9s8t+tGCoGG32NmUrWvq4mwdmRtUc/JiXnaw/LeUm8PHPZt8SafgQXqz9/Uf/7VAyKbl5wSQ2oR6fsgnKjWXBX090rtlN0ZrspTfDqO6vk94ezO/PnHjhp4JnpPHqqMmZCDtbwyPIyHyMEQMIbfmRWdgLT9m1jz9Sky1Khb2UonRGM5RIOEQsrg== 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=mTsu0wrvbdIEE6vA3MQgBXlaN79AI4+N6lS1tqsz9ss=; b=eUfaKqImEAQyW171bhjaQ3XZS/VTewctBra6VSY78tqJMWRooeK8UP4R0mINSkyTVL7fQ7RAU7pVyG8OC0Tko4PnWmZ/MWAxpJjdgLcIABEr173cM/s4KIKRf5JhFbE69JxlD6t3B0igs7irjD2VhlwZj4MSgyQ6Zbal7m7G/GZEk3XTisbGQ1HSnxtCc4DHUmCu6oPEEopIBv3VSFF/Mep7TH3po0wLMhjLLim565YYMw4ka7dTE8CjCo9HPsC7NHX4JlVw+qiiZ9BmguPv3DB3Y6tMlHaeP0NrM4TM4n/b7rwiPdkFUjdFEneogil8NVcOFnsDRg+O8u6A6UhRrA== 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=mTsu0wrvbdIEE6vA3MQgBXlaN79AI4+N6lS1tqsz9ss=; b=M1RMuZZs05ZAGfM/evNuF3mFCjZvLbVbh3Vpgto3T3XDUrwlko8aOFm47/dXD/eak22SBLCmFgENgC06Pvl6KFTguwdZKj36CV/DIXfADd1Ou/ChHn14fXoI9rG1MyihuX3tmAN09r38b346gWrxzi4e2w80u4NdCki2pADmf+p3EHwzOwulHGcLW/5rS0F5SYyVkxSoI173NnsDxZpa27Szjop6pCQZ+xfp7WxcbfVGHULWdLR9eR5rQ1f4UXyAXn91E2lgOazMqhKHQvjHWNbLgWy+/tIxkyZjewrox67V8/SUzz97aglmZ1yHbY7q+jUpma6csE+ag5h3HVYmMQ== 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:09 +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:09 +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 4/6] drm/amd/display: Use max/min macro Date: Thu, 22 Aug 2024 14:57:21 +0800 Message-Id: <20240822065723.1336181-5-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: d4d45a7d-1d94-4538-5a5c-08dcc277c826 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: Qt5qY8xaYneybMEkK5+XF17QlP3ctUHZ00AwIHam+emz56q8jDwKEF2js6DI2K4jkWhtFZu1YFoVujF7nUWBZDXV1M+p/PcPk94ZbwYg6Ay792rAfVeSNsNZyxIsRfGIYWNNXbbfZdvtrTH/84kfHJUDGJ4+pqHAAs2cJpSca/qoXpQ07BaFZArPC2a32lcmvaNafOlyXLlMcQruiTp0blGM/aXjdmVFNiPI4K/mi1FNLAIOG6ErGUqWFPIIy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IQq6LJUNrp64uypPJBCNCC8wtNuYVnIlpCMTNQKLNlAjKbkv00pzKw3b41vY5zei2uqypkauKTqQNzYkkipOw2v7CMj0sw4xEhDBi0BOcE= 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: f2IibXv9BAz1y7K8MmJfRtiPuPn4WkN2D8cdpSuhYrRFru9JBPgqWQRdxRZQcwW0tnGU2bzRG1Vh+TihJ3naih4wsSXmuIPtPYd6UggXf1dPiCf9nKOwHh3R+FuuDpb5qgc0LokPxK7VohkBanekRAwAFZVFb49TwWzFix/8dx48OfiE+xmVPuHaBnqbhM2+BAO9HNx9VIKDpPgOK5iNmk97fGxAUNwATzc8fKf3F024YJA1GGNrg9k1sa5BLbFu0V9Pbwl8VeAlr0F/sp2cdCK+hI3766ny6+fkEobjn5VUBKvWQ4LUK0yBGFCA5IJjzmzm5tPRuH+6K6s49SEx8Qkd/o55dzpux6dQxRHJc0TqrkQXQPoHBbfbQVDQFSG2YYMA3FyWxnIp20b0hwmDcBuQZjci6/OeE1a1pELasuTCjiLgWoUG19CoLtIQJ74P/rhcQBm9mNsOMdc6rKf4XvWEnQ2eS9OV1DZMRpnh76Jsl4GSHIaIgbDQsA2IAiTgyU6iXtvAVOrJjvoTWppnJugq31LKx6rFOEeQl8b2s5wclXMWrP+rnfhGW6SN3+VBtzutvaQTxJecgaFNaXOReZnvD/YH/mRvgFU2ZR4BRb9Mkq7Omx00dtRqKm/5wd3rwGCPGAHLrzIcdvT6ea3XZk1VnmhUo4Gp1gwX2X2a7BdiTZBgNkwzebdvwrviADdVy4FjCyYpOFJC2NUYfAWWIXwK/utNl41WmDEK/KkYSTyO93UXRfr7jaBHfR4Ca8RwUQY8Ab0L66ALEW0TBpvcwW21g5OM2+YgUOBa6Y+z+FeY+F8RruJs5TAVd6hgttORg/lpI+sUOf64oVQL7HUKqMpuEg6QHrIyJm6wFBXDBYlVPbqQhc7HdgfJ9ole53Hdc8CHF/4/fRNwuT3OjsU1O3eT5jG504wGyNcSw+IH3tYalltweeM8dMKd6iuMdpThk+NLEjj5rlr3VQusn7kjXNF/QrS1Efs1EhG0VF7Yl8U1isLx/tnVEig6IK5JCNBhvrSAL/erznzgJqs1nkdbnaXnfuwNUwS+4K3RKaib7Gio2xn9FOiG8d/MldHsq/sxCH/j9hRxKLSdhNIdovkT6Es99iKMtbzpNT8ElR9vkGqQoW6D+yWWiCJsj2L015qzaBwWgizoN8PA00QwXRJINffQAqqHLkgpfqrsHncJ0qBNjWxgzmL0Fk7SS9sCuinLcjFpHRZDXjEbrRgohKyMK64ubcYR3UhSL9eI51jTfggf1gN1VUYHUndcHfGokNFrGKzZfxnBHANTh0vc/ljWMkb5xLc3VZluJFZxcY/MzpQfs1rz3tJ77nJZAbwgI5gsQv8462qMfPZ6TesT7xw2fQUUDIHFWWVY3YMqr2qrSutfqT0zrhxwXCkGEFZigbwuA7+tPZU5pgSJsl5VEmWQVMgGpdgZ+OHzmQQ67MAv3IPuDXwxnZR4THNaH10c6QpoiEk7d+nk7axAXsKqPFblLsj0rFbyAxpQwFkarFCOBB7aHDNcwOht7aIqnpBVwL2DYsp0SH8aA4V3Zp4fkMDEG95JnkoEz65jGjFJ/yt/fuL8ZL8t141BCmIEm1RIk9Go X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4d45a7d-1d94-4538-5a5c-08dcc277c826 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:09.6332 (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: XlAzvivbHKgws98IlpL9hhHrHa5MnkYyyZ4R8SlPrOtTYLNdz0kvTxH0ovDcbEayBHnhm4iRKqfX1Mt+U/V0xA== 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/dc_dmub_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index b1265124608b..f48f8cf1e232 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c @@ -606,7 +606,7 @@ static void populate_subvp_cmd_drr_info(struct dc *dc, max_drr_vblank_us = div64_u64((subvp_active_us - prefetch_us - dc->caps.subvp_fw_processing_delay_us - drr_active_us), 2) + drr_active_us; max_drr_mallregion_us = subvp_active_us - prefetch_us - mall_region_us - dc->caps.subvp_fw_processing_delay_us; - max_drr_supported_us = max_drr_vblank_us > max_drr_mallregion_us ? max_drr_vblank_us : max_drr_mallregion_us; + max_drr_supported_us = max(max_drr_vblank_us, max_drr_mallregion_us); max_vtotal_supported = div64_u64(((uint64_t)drr_timing->pix_clk_100hz * 100 * max_drr_supported_us), (((uint64_t)drr_timing->h_total * 1000000))); From patchwork Thu Aug 22 06:57:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiaoliang X-Patchwork-Id: 13772773 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 DE321C531DF for ; Thu, 22 Aug 2024 06:58:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61BCF10E78F; Thu, 22 Aug 2024 06:58:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="DW5N+Feb"; dkim-atps=neutral Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2082.outbound.protection.outlook.com [40.107.117.82]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90CDF10E78F; Thu, 22 Aug 2024 06:58:18 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iLJyoqLDrSibftHT7VQRUSQCAJZxyQgboVzFPKgNv7a0+zvjx9Z6K2rwdOxief9njCfrBv3QTjEcGGq5fxI7hs0736g/S02+6udXEFPygEsAp5HJKAKvY9C6CcdzyPdSJ9UtAlgl2QmXE7g4JvYkL0Tf1GuRihuFBETWAg1qmiwla7dwZsDPlkvCC4EgxZdXI9jqvtVsFP5S+jr0x6Trg8yGRFNx/j2StFMZ34rrWYs6DMgiDMhGKcKc6/tZZa99JWdWnZQumVIuzCZqLIHPI3qXtx7g5HMGOaMRgC5GorXFSZrA8RBt+QBaB6KJl1VgttGAfEWVXHv2xxlo6CHOTQ== 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=WfXf3Thi8Fu04hOU5bFN2rxfQbx13dEfeKLe0Ovid+0=; b=TvWjZ3+zy6cSOWTV/0byJfG7h4lVsOl3XsGWDF68XSvVwQh1ZWPuiwR+/QKLiJzs0JCFV2iaYAqnoYKL5SADQ/+3wGuweIti6qPd1iiS2F7xt6zb36q3ouUm/PP0L2DPZVlpZLLAzCbIRAwyHfprQn3J+MtouwjCHFzadL+zjxsCHW+99L+PSQCiIG/5M57J3ruOof1L+MC6FADfDiq6uY6jDyXZGFC2SYTrsTaPA6/gOrexxcWVqIIIr/2gzcEeZ37Fp0fn5GIKH5mchEiPn07WR47VAFt3fcY06Q9IfTkso5ZcIJD9FpGpO4ngiC//ZyJrtw9l/hCi7C2x1PSBpw== 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=WfXf3Thi8Fu04hOU5bFN2rxfQbx13dEfeKLe0Ovid+0=; b=DW5N+FebxvD4JsQJdMJ4EaQNWBSYZRSzpLRVpSAu3PV5illTOmU8EGmHtlOAW4yy5ilk8g5cTGIxF4YXtwKeSiUygR+gL9QpeOVjakcfUoEx9CKqU9xsbCTQrQc12vhVwyaWw6oecwvMoz7qgG+/sy9gkVO7xyYbUeGQozpofJghdynT1aJ2+c0789BIz9ZjO82yxERnzVmse0PAQIvC2piQyzjqjOG4htPKjwN41e2q20/YQTEHCEch7k/8HcTkDebkeN3NmRlkRq3/r1dEQetayq53NVWLhGxe/z9e7VR67FC9/GNKPZqJ5svue6g+zUcJmJ9z5DF16itb8/NMgw== 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 TYZPR06MB5417.apcprd06.prod.outlook.com (2603:1096:400:203::11) 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:58:13 +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:13 +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 5/6] drm/amd/display: Use max/min macro Date: Thu, 22 Aug 2024 14:57:22 +0800 Message-Id: <20240822065723.1336181-6-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_|TYZPR06MB5417:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c285e52-da3d-43a6-1966-08dcc277ca5a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|7416014|1800799024|366016|921020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WaCeXSc7WwL7WaGejEvIcdn0kQv/mDfYqISI3wJmw539xeqgGwEPpeEOnENfWKx2aqTjfgpiEj0/ghyPtl2MaNu6xJzFTYkCSjjuM8zkaK30AKbiS/qIACNflNUujn+uZwl+HihlcU+4dfSKhp1D1cMLNDGJ35J3e4mDFtSNNbZOHDQv/WKZvNkFttcaqtmYRj0fdjOQLP/OMA+/nloHQNtD/FWU3m2x7W2/BBp8KYPiAWJTr3TGFUS6wPaG3O/ZtLr9vaMtI/LB4iwMweISSzxJQTci7ehrnUy01FLyGtMT7Vj4f03PCIbMwhBsVCVCIZb1LzGh2+Pw+6tzfyHSJ9n9LSWCUz55ciKEazPlZSVUMOEZFVhqTtKFUQw1LCHTPEXVlNlja/sXEcn/5qk49LIXwk5zUg= 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)(376014)(7416014)(1800799024)(366016)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gKady4EtXqZKUKCoyUypSpOLrXiKqkAA8THgSrGYZOHDZ5MLJbzlXDC/LNzgOtf1VNcP/6C10VKg24VkqCzyP/Ez4mp4NjYUoHJ6UYCBDq0JaQMmLwNleKbDx8rQONq1Xgw2SL+4rnO4KbzoMpYY+FrvtVEhH1ZNnmU/+3ItJPgweCEpVJ+MejX640GqTAYOsO0unJ++xy9qeP3yhU8L/55QUKhOLdrhuhyZjzV70AwbM4zSZnLj0uu1iySPLTPu6AXWDIhQ+zJmjiEkz/D+7niY6dKBKyX2zhB/8wjWISmVNFNHlfRJqUvyphjfu/VwziPh7ADY2JRjNb78ZmaaZcwb0L/jAJ3PWKQC1JwB2k4tTYbzlCDDQNP+xXS0YIg5AgF0RvqihlL11VpF264uoOAPpwog2GXWweuu+as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yV4So/Cpo+RAC57qn1v73wfWO7pZm32Ea4Vu2boqow9q20Z8pDXCXOcz7uc5fKFUKHOUVBgzM9ZA4WekvjB1RiT3gwwOf0UfzsNRxTXGHJJdm9ChG/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c285e52-da3d-43a6-1966-08dcc277ca5a 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:13.3388 (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: 7m7ID7/bJNvxNMc1Xk+VraJ0AdBHyztZvGFnaAF+wHPyqRkvgT1xQ48oWs7QK0NnBevZZcBb2CymovF8MIZhlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5417 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/spl/dc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c index 9eccdb38bed4..d5fa6e79fdff 100644 --- a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c +++ b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c @@ -17,9 +17,9 @@ static struct spl_rect intersect_rec(const struct spl_rect *r0, const struct spl int r0_y_end = r0->y + r0->height; int r1_y_end = r1->y + r1->height; - rec.x = r0->x > r1->x ? r0->x : r1->x; + rec.x = max(r0->x, r1->x); rec.width = r0_x_end > r1_x_end ? r1_x_end - rec.x : r0_x_end - rec.x; - rec.y = r0->y > r1->y ? r0->y : r1->y; + rec.y = max(r0->y, r1->y); rec.height = r0_y_end > r1_y_end ? r1_y_end - rec.y : r0_y_end - rec.y; /* in case that there is no intersection */ From patchwork Thu Aug 22 06:57:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiaoliang X-Patchwork-Id: 13772774 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 676E3C3DA4A for ; Thu, 22 Aug 2024 06:58:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C028C10E790; Thu, 22 Aug 2024 06:58:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="hKpzAvpK"; dkim-atps=neutral Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2082.outbound.protection.outlook.com [40.107.117.82]) by gabe.freedesktop.org (Postfix) with ESMTPS id C93D410E78F; Thu, 22 Aug 2024 06:58:18 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HhtEj54PWCDu6gCNoSmC/r29nSYQLJR+1f10Ox36pRtAI09pm5y5/ZWt9PHH5tZuocCzMIwC5Pm/hITilZ1IYC4kpB5nMXJSLtd4u/bSzKoLdQfpE+KOvDj9RFkLsx38owQqoLP13E7OcPNLZAWSg0pmoLL8UeboBjoupWyrwTd7ZYjJQKTANWliFSXOZGwOC114KsbuTPd1N+Levql7REICYuj9i9vyXpq7li+JL1o7ZYgD1lVWaNovykkAhRUN6Beto6wMNn8D+JG5UC/rBwp//x7JE9oNj/KN+YrMlfkdG0TXnaPrOzW+sAMUTAQ/W9UEJ40udKbVF4JOcn4rUQ== 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=6Nf4qHOg4Wy94B4bQcsuL4rSf5VRXrwo3ygBKI6+/bM=; b=uyoKHc6rXD8Mlt0tXkjVD6D5u2hCIy42dTesIONjPs2swb7jt4jpkQSGzNh4mxQQo04APYtDLdVx+K3ZhxrZzEjeQ9HU0By8QH9XTiW7f43TOt1LBGzud4IbHBWQkHGBauw2UEML701yqPPWOe7ZwvJPbfkfSZWCTD5HcxYHqA5lWEHZqNdRmaUDsHlehFzLg3Zet3kHkODmpONfD8kgYSQG6UrIqZaE4IsqpXm9T6yL8lIG94mMJwUGRg7IcL/RcvH64UATjPXPf8bGOb16JZdW1EJ35U53l3gazYH368R3adVFqqeNWw6BGLgusU6AyapqJ426RRbxQGWgJ4vuNQ== 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=6Nf4qHOg4Wy94B4bQcsuL4rSf5VRXrwo3ygBKI6+/bM=; b=hKpzAvpKUklnX6KkayFKPQ1cKrWOUdiAXXyQfMZ07zXYPdNWOvDjNGpVtXQyj3VqFmv6e0yGtfSZ+HXrGdtNPjx1MLd8Sho05CB6m1Y6VZaqzAfp/1fNzCyWD1rpQTWD+Wy0q1Vy+yiTi4GHhbnvhvNgbHiuJ0kdUef4ooEF9NM8WjPRyqIcZDkuF1GC3NESDuyNAL7ptf+0NxZNNPBqtEkC14e+Q2jbf3f5o3tisHT87H76worQ6Y4C0C0Z9vSmUgozHl3/bGQj7Olm95kztA8y/oviuzTRmIimRxRPTQw3coHi02+eotD7XmprXTG5lUxmRA2KXyKdy/WJLZDgjQ== 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 TYZPR06MB5417.apcprd06.prod.outlook.com (2603:1096:400:203::11) 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:58:16 +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:16 +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 6/6] drm/amd/display: Use max/min macro Date: Thu, 22 Aug 2024 14:57:23 +0800 Message-Id: <20240822065723.1336181-7-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_|TYZPR06MB5417:EE_ X-MS-Office365-Filtering-Correlation-Id: f96967af-50e7-48d2-baeb-08dcc277cc5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: ias8CSdYvciCapqx5JG5o1vQiaqTcF/sX4wIlJqNwW5sMCVqzjK6eX6jRrMe6x0nWX6/ClSKDfd85u/iH48gw1ZYF0KYG9wnfwjyJn+gIb8cgpZlJwagWzdiE1UnZshVsIUpt9jkjT8bJGO9ElZEMh1BooE1LvHp8AnpfpeZ3o0PDXK9/caBb7rfBbtGwRZANxsJIuzzJS6UudMVsuMASquSSoP2GNgBOjvduNRIlepmJFMIep7DIC+8d8UeffsJSMdk6tT47P8c0rV8bofwST4YaESnXrsFWzCYSvypALFxq7j78x72x9hHiE8j2WTOH6o8vNBsiRkSqP/78azXv9g871GxcgW0Mr+5IKuMaeAW/M8/9hb2JZf+X60CrMew7/Re68uSZSQpGwd0bKjUn1MQxSpFU2BGG/OA63egKnpiAv83Lb7Qb9ZIost9UYKoBo2jYAFazfiv6lSbgTtJshcTSA+/6/c5W7z+YmKT3k4EFae+y+oevgN7cXBucPvEYYQWk3nf4uu9JUA9CS6/rfzR9RMV23d1yXbnsengdiho83tSdYOsTAdjiDiF3gliNSk9Rxhp35pzc/MQb3rc5obx3rVVKaoK7BDdwyzykI0wH2LcDD/2uRUaqAQON53ZYsODtQW6fZQniPLpRDKef+LmXwTvJJM53RioQ4jNqiE5cWNO5a+c9zKsLvm+VOUpTX9YynjG+IF/8wr/sUUXe+qLrxgCr6ZFR9+kwFsl8BuJ3MTdMarg1/eDA4zKhD9BM64DgmlsoijnOM+kJqUkjZedYZMWkYejWl82XFsQl5TxJeleqFg605/i0tuJNtUKcl59mK7cwDuq+nQTn/Nw/kojdhWvPv5+nW0AG4A0MWpvzF0M2sGtgkftID3EHxkmJnhgl/DkUN+LDjniSxpOn8rRG32gRHWCzXpaebK6lL1sNjxjc88bYJELHLiwWbwZ1Z/ZTkQUoDdxBV9vdDXMLRxpgFHgI5DFKpr9Y8sBttFVEVVemqPje/ujaP4lYMrLQxLoa3V2bMcChpZC6pMo7WVRZnSL3zY/bHHNE7ALqvDgNPnaevRnQikadrr2UgFTdGsWXV4rRSnAuNDRmgbN/ysoyQ3KPY2ZgnLNn9/pLLNf9gX+5an92YdoB/ILlj5hf57lIPksOPnxqJ4qY/YXFlfBHo/7odbrVZBhdtS+W2f/HeN0xtzy9nXszeANULU5466d/EIaK0rwfMIjMqXxJlmfPzwec0/okoH/t/g6bKGu1J0ZA8fjML21xQcDCF3WE24F42qePUyQcJvk776KaGU9XjbyBSqv4gY3EwotB0sYFB+o9OKFhhgDihcKyJgEJSeByxnlhxdu1wvaNfiEBj2txE00Yw0SOKXTzmRzcQdhzlCTBY7Y0oMq4Ww4pqH/hH2DAdwRxPNkp5kT3/QETooA/NQ4Ya+M26vD6M0NBRk= 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)(376014)(7416014)(1800799024)(366016)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AH/8KZqTxOxczXXNwTM5rONDkYSkCUgupLr+cWHXt4LgtBIvlF2b5tyh8k/Wj4rrDpGlrOmm9hOmJIseuG6L9P1QG3iPRm42bZ4wli2A0BDe4Gui3R3GerylIisqDyfbcL67+ohwk9H8mrQ325aDzm5vEgyuGmi0x/sUvz4fjR/3VMefUcqpZ2loA1HMocnJ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dlYdjUAZ1TVXUeAWk/2EjjL9xBQuCUDtYjVb+5D7D9Hy6kKmU7/LL8EJPAyaswaphio9tBYY27S398bNVYlHjOkIto7EJG0gcZztOV9Mir8vRS3B7cn8DOlj5FVhP+ozHUr6vcwaDXKJ3Kqi6Fh4iWhCrAil66WOYifwJ8FzH0v++OYO2zQRoJPSLZGSsoddZyV3Up6BzvdJDQJ/nR2fZGEOsqbi08VgiOxCgUHpXjXQPkyX97bHtvzqIInc4QQ6uCEpg3gMkfvW0xeluLVxqWZxjHTnyPCaUzV4Br5+gqJNWVsnSlJ9oIdi9Jml2N X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f96967af-50e7-48d2-baeb-08dcc277cc5d 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:16.7156 (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: CXnLD0X50YKqGHmQ87KmKfu4jFqJMQr1VwxwSV5BzTkqrtpzBJYQuVLKn2QOu4GYRemt56CnZZKu8aAPTt3DHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5417 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/modules/freesync/freesync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index a40e6590215a..33b9b87d8d3a 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -1005,8 +1005,8 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, (stream->timing.h_total * (long long)stream->ctx->dc->caps.max_v_total)); } /* Limit minimum refresh rate to what can be supported by hardware */ - min_refresh_in_uhz = min_hardware_refresh_in_uhz > in_config->min_refresh_in_uhz ? - min_hardware_refresh_in_uhz : in_config->min_refresh_in_uhz; + min_refresh_in_uhz = + max(min_hardware_refresh_in_uhz, in_config->min_refresh_in_uhz); max_refresh_in_uhz = in_config->max_refresh_in_uhz; /* Full range may be larger than current video timing, so cap at nominal */