All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryk Brol <eryk.brol@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Aric Cyr <aric.cyr@amd.com>, Eryk Brol <eryk.brol@amd.com>,
	Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
	Qingqing.Zhuo@amd.com, Rodrigo.Siqueira@amd.com,
	Aurabindo.Pillai@amd.com, Bhawanpreet.Lakha@amd.com,
	Anthony Koo <Anthony.Koo@amd.com>
Subject: [PATCH 12/18] drm/amd/display: FreeSync not active near lower bound of non-LFC monitor range
Date: Sun, 4 Oct 2020 13:18:07 -0400	[thread overview]
Message-ID: <20201004171813.7819-13-eryk.brol@amd.com> (raw)
In-Reply-To: <20201004171813.7819-1-eryk.brol@amd.com>

From: Aric Cyr <aric.cyr@amd.com>

[Why]
On narrow range monitors without LFC, a margin prevents good utilization
of the available range.

[How]
Decrease the margin for exiting fixed mode and fix the frame counter to
reset if a non-consecutive render is found.

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
---
 .../gpu/drm/amd/display/modules/freesync/freesync.c    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
index f76d31451dcb..52c3cb6b439a 100644
--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
+++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
@@ -42,10 +42,10 @@
 /* Threshold to change BTR multiplier (to avoid frequent changes) */
 #define BTR_DRIFT_MARGIN 2000
 /* Threshold to exit fixed refresh rate */
-#define FIXED_REFRESH_EXIT_MARGIN_IN_HZ 4
+#define FIXED_REFRESH_EXIT_MARGIN_IN_HZ 1
 /* Number of consecutive frames to check before entering/exiting fixed refresh */
 #define FIXED_REFRESH_ENTER_FRAME_COUNT 5
-#define FIXED_REFRESH_EXIT_FRAME_COUNT 5
+#define FIXED_REFRESH_EXIT_FRAME_COUNT 10
 
 struct core_freesync {
 	struct mod_freesync public;
@@ -420,7 +420,8 @@ static void apply_fixed_refresh(struct core_freesync *core_freesync,
 				in_out_vrr->fixed.target_refresh_in_uhz = 0;
 				update = true;
 			}
-		}
+		} else
+			in_out_vrr->fixed.frame_counter = 0;
 	} else if (last_render_time_in_us > max_render_time_in_us) {
 		/* Enter Fixed Refresh mode */
 		if (!in_out_vrr->fixed.fixed_active) {
@@ -434,7 +435,8 @@ static void apply_fixed_refresh(struct core_freesync *core_freesync,
 						in_out_vrr->max_refresh_in_uhz;
 				update = true;
 			}
-		}
+		} else
+			in_out_vrr->fixed.frame_counter = 0;
 	}
 
 	if (update) {
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2020-10-04 17:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-04 17:17 [PATCH 00/18] DC Patches October 5, 2020 Eryk Brol
2020-10-04 17:17 ` [PATCH 01/18] drm/amd/display: 3.2.105 Eryk Brol
2020-10-04 17:17 ` [PATCH 02/18] drm/amd/display: Don't allow pstate if no support in blank Eryk Brol
2020-10-04 17:17 ` [PATCH 03/18] drm/amd/display: Check for flip pending before locking pipes Eryk Brol
2020-10-04 17:17 ` [PATCH 04/18] drm/amd/display: Change to correct unit on audio rate Eryk Brol
2020-10-04 17:18 ` [PATCH 05/18] drm/amd/display: Fixed comments (uniform style) Eryk Brol
2020-10-04 17:18 ` [PATCH 06/18] drm/amd/display: Force enable pstate on driver unload Eryk Brol
2020-10-04 17:18 ` [PATCH 07/18] drm/amd/display: Copy WM values from set A to other sets in hw_init Eryk Brol
2020-10-04 17:18 ` [PATCH 08/18] drm/amd/display: Block ABM in case of eDP ODM Eryk Brol
2020-10-04 17:18 ` [PATCH 09/18] drm/amd/display: Add i2c speed arbitration for dc_i2c and hdcp_i2c Eryk Brol
2020-10-04 17:18 ` [PATCH 10/18] drm/amd/display: HDMI remote sink need mode validation for Linux Eryk Brol
2020-10-04 17:18 ` [PATCH 11/18] drm/amd/display: Fix OPTC_DATA_FORMAT programming Eryk Brol
2020-10-04 17:18 ` Eryk Brol [this message]
2020-10-04 17:18 ` [PATCH 13/18] drm/amd/display: Hardcode 45W Bounding Box for DCN2.1 Diags Eryk Brol
2020-10-04 17:18 ` [PATCH 14/18] drm/amd/display: Program meta addresses correctly Eryk Brol
2020-10-04 17:18 ` [PATCH 15/18] drm/amd/display: Only flush inst_fb if backdoor loading Eryk Brol
2020-10-04 17:18 ` [PATCH 16/18] drm/amd/display: [FW Promotion] Release 0.0.36 Eryk Brol
2020-10-04 17:18 ` [PATCH 17/18] drm/amd/display: 3.2.106 Eryk Brol
2020-10-04 17:18 ` [PATCH 18/18] drm/amd/display: Avoid set zero in the requested clk Eryk Brol

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=20201004171813.7819-13-eryk.brol@amd.com \
    --to=eryk.brol@amd.com \
    --cc=Anthony.Koo@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Qingqing.Zhuo@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aric.cyr@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.