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 1/4] drm/amd/display: Add some debug output for VRR BTR.
Date: Thu, 18 Apr 2019 05:51:19 +0200	[thread overview]
Message-ID: <20190418035122.15791-2-mario.kleiner.de@gmail.com> (raw)
In-Reply-To: <20190418035122.15791-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Helps with debugging issues with low framerate compensation.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
---
 .../amd/display/modules/freesync/freesync.c    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
index 3d867e34f8b3..71274683da04 100644
--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
+++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
@@ -1041,6 +1041,11 @@ void mod_freesync_handle_preflip(struct mod_freesync *mod_freesync,
 		average_render_time_in_us += last_render_time_in_us;
 		average_render_time_in_us /= DC_PLANE_UPDATE_TIMES_MAX;
 
+		DRM_DEBUG_DRIVER("vrr flip: avg %d us, last %d us, max %d us\n",
+				 average_render_time_in_us,
+				 last_render_time_in_us,
+				 in_out_vrr->max_duration_in_us);
+
 		if (in_out_vrr->btr.btr_enabled) {
 			apply_below_the_range(core_freesync,
 					stream,
@@ -1053,6 +1058,10 @@ void mod_freesync_handle_preflip(struct mod_freesync *mod_freesync,
 				in_out_vrr);
 		}
 
+		DRM_DEBUG_DRIVER("vrr btr_active:%d - num %d of dur %d us\n",
+				 in_out_vrr->btr.btr_active,
+				 in_out_vrr->btr.frames_to_insert,
+				 in_out_vrr->btr.inserted_duration_in_us);
 	}
 }
 
@@ -1090,11 +1099,17 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync,
 				in_out_vrr->btr.inserted_duration_in_us);
 			in_out_vrr->adjust.v_total_max =
 				in_out_vrr->adjust.v_total_min;
+			DRM_DEBUG_DRIVER("btr start: c=%d, vtotal=%d\n",
+					 in_out_vrr->btr.frames_to_insert,
+					 in_out_vrr->adjust.v_total_min);
 		}
 
 		if (in_out_vrr->btr.frame_counter > 0)
 			in_out_vrr->btr.frame_counter--;
 
+		DRM_DEBUG_DRIVER("btr upd: count %d\n",
+				 in_out_vrr->btr.frame_counter);
+
 		/* Restore FreeSync */
 		if (in_out_vrr->btr.frame_counter == 0) {
 			in_out_vrr->adjust.v_total_min =
@@ -1103,6 +1118,9 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync,
 			in_out_vrr->adjust.v_total_max =
 				calc_v_total_from_refresh(stream,
 				in_out_vrr->min_refresh_in_uhz);
+			DRM_DEBUG_DRIVER("btr end: vtotal_min=%d/max=%d\n",
+					 in_out_vrr->adjust.v_total_min,
+					 in_out_vrr->adjust.v_total_max);
 		}
 	}
 
-- 
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   ` Mario Kleiner [this message]
2019-04-18 19:04     ` [PATCH 1/4] drm/amd/display: Add some debug output for VRR BTR 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   ` [PATCH 3/4] drm/amd/display: Enter VRR BTR earlier Mario Kleiner
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-2-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.