[Intel-gfx] [PATCH 19/22] drm/i915: Move obj->active:5 to obj->flags

Chris Wilson chris at chris-wilson.co.uk
Fri Jul 29 08:10:50 UTC 2016


On Fri, Jul 29, 2016 at 09:04:48AM +0100, Chris Wilson wrote:
> On Fri, Jul 29, 2016 at 10:40:09AM +0300, Joonas Lahtinen wrote:
> > _is_active() does not really fit to be assigned to _mask. maybe have
> > object_active_mask() and then
> > 
> > _is_idle/inactive/whatever() { return !object_active_mask() }
> > 
> > Because the negation is used lot more.
> 
> 10 i915_gem_object_is_active(), 1 !i915_gem_object_is_active(). Of which
> 4 use the mask and the rest as a boolean.

Plus another 5 using the READ_ONCE() variant who only look at the active
mask.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list