All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Kleiner <mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 3/4] drm/amd/display: Enter VRR BTR earlier.
Date: Thu, 18 Apr 2019 05:51:21 +0200	[thread overview]
Message-ID: <20190418035122.15791-4-mario.kleiner.de@gmail.com> (raw)
In-Reply-To: <20190418035122.15791-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Use a 2 msecs switching headroom not only for slightly
delayed exiting of BTR mode, but now also for entering
it a bit before the max frame duration is exceeded.

With slowly changing time delay between successive flips
or with a bit of jitter in arrival of flips, this adapts
vblank early and prevents missed vblanks at the border
between non-BTR and BTR.

Testing on DCE-8, DCE-11 and DCN-1.0 shows that this more
often avoids skipped frames when moving across the BTR
boundary, especially on DCE-8 and DCE-11 with the followup
commit for dealing with pre-DCE-12 hw.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
---
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
index e56543c36eba..a965ab5466dc 100644
--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
+++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
@@ -350,7 +350,7 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
 			in_out_vrr->btr.frame_counter = 0;
 			in_out_vrr->btr.btr_active = false;
 		}
-	} else if (last_render_time_in_us > max_render_time_in_us) {
+	} else if (last_render_time_in_us + BTR_EXIT_MARGIN > max_render_time_in_us) {
 		/* Enter Below the Range */
 		in_out_vrr->btr.btr_active = true;
 	}
-- 
2.20.1

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

  parent reply	other threads:[~2019-04-18  3:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18  3:51 Improvements to VRR below-the-range/low framerate compensation Mario Kleiner
     [not found] ` <20190418035122.15791-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-04-18  3:51   ` [PATCH 1/4] drm/amd/display: Add some debug output for VRR BTR Mario Kleiner
2019-04-18 19:04     ` Kazlauskas, Nicholas
2019-04-18  3:51   ` [PATCH 2/4] drm/amd/display: Fix and simplify apply_below_the_range() Mario Kleiner
     [not found]     ` <20190418035122.15791-3-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-04-18 19:25       ` Kazlauskas, Nicholas
2019-04-18  3:51   ` Mario Kleiner [this message]
2019-04-18  3:51 ` [PATCH 4/4] drm/amd/display: Compensate for pre-DCE12 BTR-VRR hw limitations Mario Kleiner
2019-04-24 14:34   ` Kazlauskas, Nicholas
     [not found]     ` <2a45d459-1484-3a99-d2cd-12633e56f2b4-5C7GfCeVMHo@public.gmane.org>
2019-04-26  8:35       ` Mario Kleiner
2019-04-18 14:24 ` Improvements to VRR below-the-range/low framerate compensation Michel Dänzer
     [not found]   ` <65c584af-e2c6-a73a-a8f1-45bbe9ad527d-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-04-18 14:35     ` Kazlauskas, Nicholas

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=20190418035122.15791-4-mario.kleiner.de@gmail.com \
    --to=mario.kleiner.de-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org \
    /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.