[Intel-gfx] [PATCH 03/22] drm/i915: introduce intel_memory_region
Chris Wilson
chris at chris-wilson.co.uk
Fri Sep 27 18:25:53 UTC 2019
Quoting Chris Wilson (2019-09-27 19:24:43)
> Quoting Matthew Auld (2019-09-27 18:33:50)
> > +static void close_objects(struct list_head *objects)
> > +{
> > + struct drm_i915_private *i915 = NULL;
> > + struct drm_i915_gem_object *obj, *on;
> > +
> > + list_for_each_entry_safe(obj, on, objects, st_link) {
> > + i915 = to_i915(obj->base.dev);
> > + 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);
> > + }
> > +
> > + if (i915) {
>
> That's on the ugly side. You will have a mem in each subtest, so why not
> supply it here and use the mem->i915 from that?
The further thought, was to have an mem test runner that drained the
pages between each subtest. That's an area that we need to improve.
-Chris
More information about the Intel-gfx
mailing list