Re: [PATCH 08/10] drm/i915: Track display alignment on VMA

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

 



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 <chris@xxxxxxxxxxxxxxxxxx>

<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.lahtinen@xxxxxxxxxxxxxxx>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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