On Wed, Aug 17, 2016 at 11:47:07AM +0300, Joonas Lahtinen wrote:
> On ti, 2016-08-16 at 11:42 +0100, Chris Wilson wrote:
> > @@ -278,6 +283,9 @@ static void eb_destroy(struct eb_vmas *eb)
> >  
> >  static inline int use_cpu_reloc(struct drm_i915_gem_object *obj)
> >  {
> > +   if (DBG_USE_CPU_RELOC)
> > +           return DBG_USE_CPU_RELOC > 0;
> 
> If DBG_USE_CPU_RELOC == 0, this path is never taken. So it would have
> to be set at -1 to yield false. Unexpected when defining it. 0 and 1 is
> the de facto. So drop a comment at defining site.
> 
> > +#define KMAP 0x4
> 
> At least make a comment that CLFLUSH_AFTER and CLFLUSH_BEFORE are also
> in the flag set.

#define CLFLUSH_FLAGS (BEFORE | AFTER)

BUILD_BUG_ON(KMAP & CLFLUSH_FLAGS)
BUILD_BUG_ON((KMAP | CLFLUSH_FLAGS) & PAGE_MASK)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to