|
@@ -108,30 +108,13 @@ static void do_ppgtt_cleanup(struct i915_hw_ppgtt *ppgtt)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- /*
|
|
|
|
- * Make sure vmas are unbound before we take down the drm_mm
|
|
|
|
- *
|
|
|
|
- * FIXME: Proper refcounting should take care of this, this shouldn't be
|
|
|
|
- * needed at all.
|
|
|
|
- */
|
|
|
|
- if (!list_empty(&vm->active_list)) {
|
|
|
|
- struct i915_vma *vma;
|
|
|
|
-
|
|
|
|
- list_for_each_entry(vma, &vm->active_list, mm_list)
|
|
|
|
- if (WARN_ON(list_empty(&vma->vma_link) ||
|
|
|
|
- list_is_singular(&vma->vma_link)))
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- i915_gem_evict_vm(&ppgtt->base, true);
|
|
|
|
- } else {
|
|
|
|
- i915_gem_retire_requests(dev);
|
|
|
|
- i915_gem_evict_vm(&ppgtt->base, false);
|
|
|
|
- }
|
|
|
|
|
|
+ /* vmas should already be unbound */
|
|
|
|
+ WARN_ON(!list_empty(&vm->active_list));
|
|
|
|
|
|
ppgtt->base.cleanup(&ppgtt->base);
|
|
ppgtt->base.cleanup(&ppgtt->base);
|
|
}
|
|
}
|
|
|
|
|
|
-static void ppgtt_release(struct kref *kref)
|
|
|
|
|
|
+void ppgtt_release(struct kref *kref)
|
|
{
|
|
{
|
|
struct i915_hw_ppgtt *ppgtt =
|
|
struct i915_hw_ppgtt *ppgtt =
|
|
container_of(kref, struct i915_hw_ppgtt, ref);
|
|
container_of(kref, struct i915_hw_ppgtt, ref);
|