mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: linux-kernel@vger.kernel.org, Sean Paul <seanpaul@chromium.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	David Airlie <airlied@linux.ie>
Subject: Re: [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines
Date: Tue, 10 Jan 2017 17:54:57 +0200	[thread overview]
Message-ID: <20170110155457.GE31595@intel.com> (raw)
In-Reply-To: <20170110134305.26326-3-tomeu.vizoso@collabora.com>

On Tue, Jan 10, 2017 at 02:43:05PM +0100, Tomeu Vizoso wrote:
> Use drm_accurate_vblank_count so we have the full 32 bit to represent
> the frame counter and userspace has a simpler way of knowing when the
> counter wraps around.
> 
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
> Reviewed-by: Robert Foss <robert.foss@collabora.com>
> ---
> 
>  drivers/gpu/drm/i915/i915_irq.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index b9beb5955dae..75fb1f66cc0c 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1557,7 +1557,6 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
>  	struct drm_driver *driver = dev_priv->drm.driver;
>  	uint32_t crcs[5];
>  	int head, tail;
> -	u32 frame;
>  
>  	spin_lock(&pipe_crc->lock);
>  	if (pipe_crc->source) {
> @@ -1612,8 +1611,9 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
>  		crcs[2] = crc2;
>  		crcs[3] = crc3;
>  		crcs[4] = crc4;
> -		frame = driver->get_vblank_counter(&dev_priv->drm, pipe);
> -		drm_crtc_add_crc_entry(&crtc->base, true, frame, crcs);
> +		drm_crtc_add_crc_entry(&crtc->base, true,
> +				       drm_accurate_vblank_count(&crtc->base),

My assumption would be that this gets called after the vblank irq
handler, so using the _accurate version seems a bit overkill.

> +				       crcs);
>  	}
>  }
>  #else
> -- 
> 2.9.3

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2017-01-10 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 13:43 [RESEND PATCH v14 0/2] New debugfs API for capturing CRC of frames Tomeu Vizoso
2017-01-10 13:43 ` [RESEND PATCH v14 1/2] drm/i915: Use new CRC debugfs API Tomeu Vizoso
2017-01-10 13:43 ` [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines Tomeu Vizoso
2017-01-10 15:54   ` Ville Syrjälä [this message]
2017-01-10 16:31     ` [Intel-gfx] " Daniel Vetter
2017-01-16  9:12       ` Tomeu Vizoso
2017-01-23  7:53         ` Daniel Vetter

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=20170110155457.GE31595@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=thierry.reding@gmail.com \
    --cc=tomeu.vizoso@collabora.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

Powered by JetHome