[Intel-gfx] [PATCH 1/3] drm/i915: introduce intel_memory_region

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 8 16:06:03 UTC 2019


Quoting Matthew Auld (2019-10-08 17:01:14)
> +static void close_objects(struct intel_memory_region *mem,
> +                         struct list_head *objects)
> +{
> +       struct drm_i915_private *i915 = mem->i915;
> +       struct drm_i915_gem_object *obj, *on;
> +
> +       list_for_each_entry_safe(obj, on, objects, st_link) {
> +               if (i915_gem_object_has_pinned_pages(obj))
> +                       i915_gem_object_unpin_pages(obj);
> +               /* No polluting the memory region between tests */
> +               __i915_gem_object_put_pages(obj, I915_MM_NORMAL);
> +               i915_gem_object_put(obj);
> +               list_del(&obj->st_link);

I would quietly reorder this so we list_del before kref_put.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list