dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Oleg Vasilev <oleg.vasilev@intel.com>
Cc: Shayenne Moura <shayenneluzmoura@gmail.com>,
	Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm: add debug print to update_vblank_count
Date: Fri, 14 Jun 2019 19:19:42 +0300	[thread overview]
Message-ID: <20190614161942.GC5942@intel.com> (raw)
In-Reply-To: <20190613121802.2193-1-oleg.vasilev@intel.com>

On Thu, Jun 13, 2019 at 03:18:00PM +0300, Oleg Vasilev wrote:
> Since we are logging all vblank counter updates 30 lines below,
> it is also good to have some details whether and how vblank count
> difference is calculated.
> 
> Signed-off-by: Oleg Vasilev <oleg.vasilev@intel.com>
> ---
>  drivers/gpu/drm/drm_vblank.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 0d704bddb1a6..603ab105125d 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -241,12 +241,16 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
>  		 * on the difference in the timestamps and the
>  		 * frame/field duration.
>  		 */
> +
> +		DRM_DEBUG_VBL("crtc %u: Calculating number of vblanks."
> +			      " diff_ns = %lld, framedur_ns = %d)\n",
> +			      pipe, (long long) diff_ns, framedur_ns);

You can generally extract that info from the timestamps that already
get dumped, but I guess that is a bit of a hassle. So might as well
print the stuff the kernel already calculated for you.

The only downside is that lots of printks from the irq handler bogs
the machine down quite a bit. But these shouldn't be used outside of
short vbl debugging sessions anyway.

Pushed this one to drm-misc-next. Thanks for the patch.

> +
>  		diff = DIV_ROUND_CLOSEST_ULL(diff_ns, framedur_ns);
>  
>  		if (diff == 0 && in_vblank_irq)
> -			DRM_DEBUG_VBL("crtc %u: Redundant vblirq ignored."
> -				      " diff_ns = %lld, framedur_ns = %d)\n",
> -				      pipe, (long long) diff_ns, framedur_ns);
> +			DRM_DEBUG_VBL("crtc %u: Redundant vblirq ignored\n",
> +				      pipe);
>  	} else {
>  		/* some kind of default for drivers w/o accurate vbl timestamping */
>  		diff = in_vblank_irq ? 1 : 0;
> -- 
> 2.21.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2019-06-14 16:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 12:18 [PATCH 1/3] drm: add debug print to update_vblank_count Oleg Vasilev
2019-06-13 12:18 ` [PATCH 2/3] drm/vkms: stop generating CRCs on buffer overflow Oleg Vasilev
2019-06-13 13:07   ` Daniel Vetter
2019-06-18  1:53     ` Rodrigo Siqueira
2019-06-18  8:38       ` Daniel Vetter
2019-06-13 12:18 ` [PATCH 3/3] drm/vkms: add crc sources list Oleg Vasilev
2019-06-18  2:14   ` Rodrigo Siqueira
2019-06-19  2:10   ` Rodrigo Siqueira
2019-06-14 16:19 ` Ville Syrjälä [this message]

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=20190614161942.GC5942@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=oleg.vasilev@intel.com \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=shayenneluzmoura@gmail.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