mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 6/6] drm/amd/display: Use max/min macro
Date: Thu, 22 Aug 2024 14:57:23 +0800	[thread overview]
Message-ID: <20240822065723.1336181-7-yujiaoliang@vivo.com> (raw)
In-Reply-To: <20240822065723.1336181-1-yujiaoliang@vivo.com>

Use the macro instead of ternary operator.

Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.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


  parent reply	other threads:[~2024-08-22  6:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  6:57 [PATCH v1 0/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 1/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 2/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 3/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 4/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 5/6] " Yu Jiaoliang
2024-08-22  6:57 ` Yu Jiaoliang [this message]
2024-08-22  9:45 ` [PATCH v1 0/6] " 于佼良
2024-08-22 18:34 ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2024-08-22  6:54 Yu Jiaoliang
2024-08-22  6:54 ` [PATCH v1 6/6] " Yu Jiaoliang
2024-08-22  6:51 [PATCH v1 0/6] " Yu Jiaoliang
2024-08-22  6:51 ` [PATCH v1 6/6] " Yu Jiaoliang
2024-08-22  6:29 [PATCH v1 0/6] " Yu Jiaoliang
2024-08-22  6:29 ` [PATCH v1 6/6] " Yu Jiaoliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240822065723.1336181-7-yujiaoliang@vivo.com \
    --to=yujiaoliang@vivo.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dillon.varone@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamza.mahfooz@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=sunpeng.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®