On Fri, Oct 14, 2016 at 12:12:32PM +0300, Joonas Lahtinen wrote: > On pe, 2016-10-07 at 10:46 +0100, Chris Wilson wrote: > > @@ -2376,6 +2374,19 @@ __deprecated > > extern void drm_gem_object_unreference_unlocked(struct drm_gem_object *); > > > > static inline bool > > +i915_gem_object_is_dead(const struct drm_i915_gem_object *obj) > > +{ > > + return atomic_read(&obj->base.refcount.refcount) == 0; > > +} > > Seems like this ought to be in DRM? Todo item. > > + > > +#if IS_ENABLED(CONFIG_LOCKDEP) > > +#define lockdep_assert_held_unless(lock, cond) \ > > + GEM_BUG_ON(!lockdep_is_held(lock) && !(cond)) > > +#else > > +#define lockdep_assert_held_unless(lock, cond) > > +#endif > > Ugh. These are temporaries to keep lockdep asserts working until removed later in the series (but I hope they illustrate the change in locking regime being prepared for). -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx