Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1555536 > unrolled thread

[RESEND PATCH v14 0/2] New debugfs API for capturing CRC of frames

Started byTomeu Vizoso <tomeu.vizoso@collabora.com>
First post2017-01-10 16:00 +0100
Last post2017-01-16 10:20 +0100
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [RESEND PATCH v14 0/2] New debugfs API for capturing CRC of frames Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2017-01-10 16:00 +0100
    [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2017-01-10 16:00 +0100
      Re: [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in  frame CRC lines Ville Syrjälä <ville.syrjala@linux.intel.com> - 2017-01-10 17:00 +0100
        Re: [Intel-gfx] [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank  counters in frame CRC lines Daniel Vetter <daniel@ffwll.ch> - 2017-01-10 17:40 +0100
          Re: [Intel-gfx] [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank  counters in frame CRC lines Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2017-01-16 10:20 +0100

#1555536 — [RESEND PATCH v14 0/2] New debugfs API for capturing CRC of frames

FromTomeu Vizoso <tomeu.vizoso@collabora.com>
Date2017-01-10 16:00 +0100
Subject[RESEND PATCH v14 0/2] New debugfs API for capturing CRC of frames
Message-ID<sY641-2Dh-17@gated-at.bofh.it>
Hi,

here are the last two patches that remain to be merged in this series,
rebased on today's drm-tip.

Thanks,

Tomeu


Tomeu Vizoso (2):
  drm/i915: Use new CRC debugfs API
  drm/i915: Put "cooked" vlank counters in frame CRC lines

 drivers/gpu/drm/i915/i915_drv.h       |  1 +
 drivers/gpu/drm/i915/i915_irq.c       | 77 ++++++++++++++++++----------
 drivers/gpu/drm/i915/intel_display.c  |  1 +
 drivers/gpu/drm/i915/intel_drv.h      |  6 +++
 drivers/gpu/drm/i915/intel_pipe_crc.c | 94 ++++++++++++++++++++++++++++++-----
 5 files changed, 142 insertions(+), 37 deletions(-)

-- 
2.9.3

[toc] | [next] | [standalone]


#1555538 — [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines

FromTomeu Vizoso <tomeu.vizoso@collabora.com>
Date2017-01-10 16:00 +0100
Subject[RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines
Message-ID<sY642-2Dh-47@gated-at.bofh.it>
In reply to#1555536
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),
+				       crcs);
 	}
 }
 #else
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1555639 — Re: [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines

FromVille Syrjälä <ville.syrjala@linux.intel.com>
Date2017-01-10 17:00 +0100
SubjectRe: [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines
Message-ID<sY70b-3cI-15@gated-at.bofh.it>
In reply to#1555538
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

[toc] | [prev] | [next] | [standalone]


#1555686 — Re: [Intel-gfx] [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-01-10 17:40 +0100
SubjectRe: [Intel-gfx] [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines
Message-ID<sY7CO-3Fl-33@gated-at.bofh.it>
In reply to#1555639
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.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1559540 — Re: [Intel-gfx] [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines

FromTomeu Vizoso <tomeu.vizoso@collabora.com>
Date2017-01-16 10:20 +0100
SubjectRe: [Intel-gfx] [RESEND PATCH v14 2/2] drm/i915: Put "cooked" vlank counters in frame CRC lines
Message-ID<t0bCi-6HI-11@gated-at.bofh.it>
In reply to#1555686
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?

Thanks,

Tomeu

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web