[Intel-gfx] [PATCH 1/2] drm/i915: split page flip queueing into per-chipset functions

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 14 20:20:12 CEST 2011


On Tue, 14 Jun 2011 11:13:07 -0700, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> @@ -6343,7 +6458,12 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
>  	/* Offset into the new buffer for cases of shared fbs between CRTCs */
>  	offset = crtc->y * fb->pitch + crtc->x * fb->bits_per_pixel/8;
>  
> -	ret = BEGIN_LP_RING(4);
> +	if (!dev_priv->display.queue_flip) {
> +		ret = -ENODEV;
> +		goto cleanup_objs;
> +	}
> +
> +	ret = dev_priv->display.queue_flip(dev, crtc, fb, obj);

Neil Brown would recommend that we use a default queue_flip that returns
-ENODEV which both removes lines of code from this complicated routine
and optimises the common case. I agree with him. :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list