[Intel-gfx] [PATCH] igt: Test tiled bo for proper fence.

Daniel Vetter daniel at ffwll.ch
Fri Dec 19 00:49:15 PST 2014


On Thu, Dec 18, 2014 at 02:43:45PM -0800, Bob Paauwe wrote:
> On Thu, 18 Dec 2014 21:31:43 +0100
> Daniel Vetter <daniel at ffwll.ch> wrote:
> 
> > On Thu, Dec 18, 2014 at 09:50:27AM -0800, Bob Paauwe wrote:
> > > +
> > > +	/* Set the tiled buffer to all 0xff's */
> > > +	memset(bo_tiled->virtual, 0xff, bo_tiled->size);
> > > +	memset(bo_tiled->virtual, 0xdd, pitch * height);
> > > +
> > > +	/* Verify linear buffer is still all 0's by looking for a 0xff */
> > > +	if (memchr(bo_linear->virtual, 0xff, bo_linear->size) != NULL)
> > > +		failed = 1;
> > 
> > Imo just igt_assert here and reduce all the control flow.
> 
> So it's ok to skip all the unref / unmap when the test fails?

Totally. The kernel will clean up the mess for you, and being able to do
that is why we run each test as its own binary. It also helps a lot in
streamlining the testlogic by removing and control-flow which isn't part
of the test itself.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Intel-gfx mailing list