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

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

 



On Mon, Aug 15, 2016 at 12:38:42PM +0300, Joonas Lahtinen wrote:
> On pe, 2016-08-12 at 11:28 +0100, Chris Wilson wrote:
> > @@ -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?

The invalid uabi alignment is caught by execbuf and here instead of
treating it as an error we just overrule the caller with our minimum
requirements.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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