On Wed, Nov 06, 2013 at 07:23:25PM +0200, ville.syrj...@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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to