[Intel-gfx] [PATCH 11/9] drm/i915: Opt out of vblank disable timer on >gen2

Daniel Vetter daniel at ffwll.ch
Mon May 26 17:31:17 CEST 2014


On Mon, May 26, 2014 at 05:26:48PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Now that the vblank races are plugged, we can opt out of using
> the vblank disable timer and just let vblank interrupts get
> disabled immediately when the last reference is dropped.
> 
> Gen2 is the exception since it has no hardware frame counter.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

For both patches: Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_irq.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 28bae6e..4b2e7af 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -4364,6 +4364,14 @@ void intel_irq_init(struct drm_device *dev)
>  		dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
>  	}
>  
> +	/*
> +	 * Opt out of the vblank disable timer on everything except gen2.
> +	 * Gen2 doesn't have a hardware frame counter and so depends on
> +	 * vblank interrupts to produce sane vblank seuquence numbers.
> +	 */
> +	if (!IS_GEN2(dev))
> +		dev->vblank_disable_immediate = true;
> +
>  	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
>  		dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp;
>  		dev->driver->get_scanout_position = i915_get_crtc_scanoutpos;
> -- 
> 1.8.5.5
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list