On 4/17/19 11:51 PM, Mario Kleiner wrote:
> Helps with debugging issues with low framerate compensation.
> 
> Signed-off-by: Mario Kleiner <mario.kleiner...@gmail.com>
> ---

This looks like it'd generate a ton of debug output (the flip stuff is 
already a bit too spammy).

But more importantly the DC and module code doesn't touch the debug 
prints directly.

DC has the DC_LOG_* defines but the modules shouldn't touch anything 
logger related.

Nicholas Kazlauskas

>   .../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);
>               }
>       }
>   
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to