[Intel-gfx] [PATCH v2 06/22] drm/i915: support creating LMEM objects
Chris Wilson
chris at chris-wilson.co.uk
Thu Oct 3 19:46:56 UTC 2019
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;
More information about the Intel-gfx
mailing list