On pe, 2016-08-12 at 11:28 +0100, Chris Wilson wrote:
> When using the aliasing ppgtt and pagefliping with the shrinker/eviction

s/fliping/flipping/

> active, we note that we often have to rebind the backbuffer before
> flipping onto the scanout because it has an invalid alignment. If we
> store the worst-case alignment required for a VMA, we can avoid having
> to rebind at critical junctures.
> 
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

<SNIP>

> @@ -2984,17 +2983,10 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 
> alignment, u64 flags)
>               size = i915_gem_get_ggtt_size(dev_priv, size,
>                                             i915_gem_object_get_tiling(obj));
>  
> -     min_alignment =
> -             i915_gem_get_ggtt_alignment(dev_priv, size,
> -                                         i915_gem_object_get_tiling(obj),
> -                                         flags & PIN_MAPPABLE);
> -     if (alignment == 0)
> -             alignment = min_alignment;
> -     if (alignment & (min_alignment - 1)) {
> -             DRM_DEBUG("Invalid object alignment requested %llu, minimum 
> %llu\n",
> -                       alignment, min_alignment);
> -             return -EINVAL;
> -     }
> +     alignment = max(max(alignment, vma->display_alignment),
> +                     i915_gem_get_ggtt_alignment(dev_priv, size,
> +                                                 
> i915_gem_object_get_tiling(obj),
> +                                                 flags & PIN_MAPPABLE));

No DRM_DEBUG no more?

> @@ -183,7 +183,7 @@ struct i915_vma {
>       struct drm_i915_fence_reg *fence;
>       struct sg_table *pages;
>       void __iomem *iomap;
> -     u64 size;
> +     u64 size, display_alignment;

Unrelated variables, better off their own lines.

Reviewed-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to