Re: [PATCH v2 3/6] drm/i915: Implement LRI based FBC tracking

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

 



On Wed, Nov 06, 2013 at 07:23:25PM +0200, ville.syrjala@xxxxxxxxxxxxxxx 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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