Quoting Matthew Auld (2019-10-03 20:24:28) > +const struct drm_i915_gem_object_ops i915_gem_lmem_obj_ops = { > + .get_pages = i915_gem_object_get_pages_buddy, > + .put_pages = i915_gem_object_put_pages_buddy, > + .release = i915_gem_object_release_memory_region, > +}; > + > +bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj) > +{ > + struct intel_memory_region *region = obj->mm.region; > + > + return region && region->type == INTEL_LMEM; Hmm, a more classic approach would be return obj->ops == &lmem_obj_ops; _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx