linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"David Airlie" <airlied@linux.ie>,
	"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Daniel Vetter" <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines
Date: Mon, 23 Jan 2017 08:53:42 +0100	[thread overview]
Message-ID: <20170123075342.spukbixyxjr7oqh3@phenom.ffwll.local> (raw)
In-Reply-To: <CAAObsKA4rbi__bFdR8cLwScgaJuQPYk9jU2zhxqqY8UuLO32uA@mail.gmail.com>

On Mon, Jan 16, 2017 at 10:12:36AM +0100, Tomeu Vizoso wrote:
> On 10 January 2017 at 17:31, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Tue, Jan 10, 2017 at 05:54:57PM +0200, Ville Syrjälä wrote:
> >> 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.
> >
> > Since we're at like v15 of this I figured I'll pull this in, and we can
> > polish this a bit more later. Tomeu, can you pls do that follow-up patch
> > and get Ville to review+merge it.
> 
> At least on the SKL and SNB I have here, the -sequence subtests in
> kms_pipe_crc_basic fail if I replace the call to
> drm_accurate_vblank_count with drm_crtc_vblank_count.
> 
> Any ideas on why this could be?

No idea at all, on a quick check things seem ordered correctly. Can you
pls paste how the test falls over?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      reply	other threads:[~2017-01-23  7:53 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ä
2017-01-10 16:31     ` [Intel-gfx] " Daniel Vetter
2017-01-16  9:12       ` Tomeu Vizoso
2017-01-23  7:53         ` Daniel Vetter [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=20170123075342.spukbixyxjr7oqh3@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=tomeu.vizoso@collabora.com \
    --cc=ville.syrjala@linux.intel.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;
as well as URLs for NNTP newsgroup(s).