[Intel-gfx] [PATCH v2 3/6] drm/i915: Implement LRI based FBC tracking

Chris Wilson chris at chris-wilson.co.uk
Wed Nov 6 18:36:01 CET 2013


On Wed, Nov 06, 2013 at 07:23:25PM +0200, ville.syrjala at linux.intel.com wrote:
> +bool intel_fb_obj_has_fbc(struct drm_i915_gem_object *obj)
> +{
> +	struct drm_device *dev = obj->base.dev;
> +	struct drm_i915_private *dev_priv = dev->dev_private;
> +	struct drm_crtc *crtc;
> +
> +	/* check for potential scanout */
> +	if (!obj->pin_display)
> +		return false;

	if (dev_oriv->fbc.plane == -1)
		return false;

	crtc = dev_priv->plane_to_crtc[dev_priv->fbc.plane];

	mutex_lock(&crtc->mutex);
	has_fbc = crtc->fb && to_intel_framebuffer(crtc->fb)->obj == obj;
	mutex_unlock(&crtc->mutex);

	return has_fbc
 }

Perhaps?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list