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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> Reviewed-by: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
> Reviewed-by: Robert Foss <robert.foss@xxxxxxxxxxxxx>
> ---
> 
>  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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux