Re: [PATCH 07/22] drm/i915: Refactor execbuffer relocation writing

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

 



On ke, 2016-08-17 at 09:57 +0100, Chris Wilson wrote:
> 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)

That's even better!

Regards, Joonas

> -Chris
> 
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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