[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20240822065137.1331172-7-yujiaoliang@vivo.com>
Date: Thu, 22 Aug 2024 14:51:37 +0800
From: Yu Jiaoliang <yujiaoliang@...o.com>
To: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
Xinhui Pan <Xinhui.Pan@....com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Hamza Mahfooz <hamza.mahfooz@....com>,
Alex Hung <alex.hung@....com>,
Hersen Wu <hersenxs.wu@....com>,
Dillon Varone <dillon.varone@....com>,
amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: [PATCH v1 6/6] drm/amd/display: Use max/min macro
Use the macro instead of ternary operator.
Signed-off-by: Yu Jiaoliang <yujiaoliang@...o.com>
---
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 */
--
2.34.1
Powered by blists - more mailing lists