Re: [PATCH] drm/i915: Make sure fb objects with rotated views are also fenceable

Vivek Kasireddy
2015-09-15T01:41:46Z

On Sat, 12 Sep 2015 08:49:08 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Fri, Sep 11, 2015 at 06:44:26PM -0700, Vivek Kasireddy wrote:
> > From: Vivek Kasireddy <vivek.kasireddy@intel.com>
> >
> > Currently, fb objects with rotated views are ignored while pinning.
> > Therefore, include the rotated view type and use the view size
> > instead of the object's size to determine if it is fenceable. And,
> > look at the view and its offset while writing and pinning to the
> > fence registers.
> >
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Matthew D Roper <matthew.d.roper@intel.com>
> > Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
>
> No. The fenceable decision needs only be made on the vma, which can be
> separate for rotated views, partial views etc.
>
> As usual I have such a patch...
> -Chris

The fenceable decision is indeed made on the vma; my patch doesn't
change that behavior. I am just fixing the warning raised here:

if (WARN_ON(!obj->map_and_fenceable))

inside i915_gem_object_get_fence(). This warning is raised because
i915_gem_object_do_pin() only looks at normal views and completely
ignores the rotated views for the associated Y-tiled fb objects
that are passed on by i915_gem_object_pin_to_display_plane().

Does your patch solve this problem in a different way?
-Vivek