Re: [PATCH] drm/i915: Enforce execobject.alignment to be a power-of-two

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

 



On Mon, Jun 22, 2015 at 03:28:26PM +0100, Chris Wilson wrote:
> On Mon, Jun 22, 2015 at 04:08:20PM +0200, Daniel Vetter wrote:
> > On Mon, Jun 22, 2015 at 12:03:08PM +0100, Damien Lespiau wrote:
> > > On Fri, Jun 19, 2015 at 01:59:46PM +0100, Chris Wilson wrote:
> > > > Internal requirement for the alignment is that it must be a
> > > > power-of-two, so enforce rejection at the user interface to execbuffer
> > > > (which allows the caller to specify a stricter-than-expected alignment
> > > > criterion).
> > > > 
> > > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > > 
> > > That sounds right in general and I could find at least one instance
> > > where we rely on alignment being a power of two (eb_vma_misplaced() and
> > > vma->node.start & (entry->alignment - 1))
> > > 
> > > so:
> > > 
> > > Reviewed-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
> > 
> > Needs a nasty igt I think ... Do we have? Applied meanwhile.
> 
> Sure, we can demonstrate a bug in the current code that would not
> realign an object to the arbitrary alignment requested by the user.

Just checking that the kernel rejects non-pot alignment should be good
enough. No need imo to write a _that_ nasty igt ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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