[Intel-gfx] [PATCH] tests/gem_gtt_hog: Fix for BDW

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 7 17:16:12 CET 2014


On Fri, Feb 07, 2014 at 02:04:56PM -0200, Rodrigo Vivi wrote:
> >>       for (i = 0; i < 20; i++) {
> >> -             *b++ = XY_COLOR_BLT_CMD_NOLEN | 4 |
> >> -                     COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB;
> >> +             if (data->intel_gen >= 8) {
> >> +                     *b++ = MI_NOOP;
> >
> > Not required, instead you just round up the buf to the next qword after
> > ending the batch.
> 
> I'm afraid I didn't get here, but if possible I'd like to let it just
> like other bdw patches are.

This is just inserting a no-op between commands just to round each out
to a even number of dwords. Which is just lazy.
 
> >
> >> +                     *b++ = XY_COLOR_BLT_CMD_NOLEN | 5 |
> >> +                             COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB;
> >> +             } else {
> >> +                     *b++ = XY_COLOR_BLT_CMD_NOLEN | 4 |
> >> +                             COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB;
> >> +             }
> >>               *b++ = 0xf0 << 16 | 1 << 25 | 1 << 24 | 4096;
> >>               *b++ = 0;
> >>               *b++ = size >> 12 << 16 | 1024;
> >> @@ -76,6 +89,8 @@ static void busy(int fd, uint32_t handle, int size, int loops)
> >>               reloc[i].read_domains = I915_GEM_DOMAIN_RENDER;
> >>               reloc[i].write_domain = I915_GEM_DOMAIN_RENDER;
> >>               *b++ = 0;
> >> +             if (data->intel_gen >= 8)
> >> +                     *b++ = 0;
> >>               *b++ = canary;
> >>       }
> >>       *b++ = MI_BATCH_BUFFER_END;
> > if ((b - buf) & 1))
> >  *b++ = 0;
> 
> is this related to your above's suggestion?

and for the (b-buf) transform later.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list