void i915_gem_driver_release(struct drm_i915_private *dev_priv)
{
+ i915_gem_driver_release__contexts(dev_priv);
+
intel_gt_driver_release(&dev_priv->gt);
intel_wa_list_free(&dev_priv->gt_wa_list);
intel_uc_cleanup_firmwares(&dev_priv->gt.uc);
i915_gem_cleanup_userptr(dev_priv);
- i915_gem_driver_release__contexts(dev_priv);
-
i915_gem_drain_freed_objects(dev_priv);
WARN_ON(!list_empty(&dev_priv->gem.contexts.list));
mock_device_flush(i915);
intel_gt_driver_remove(&i915->gt);
+ i915_gem_driver_release__contexts(i915);
+
i915_gem_drain_workqueue(i915);
i915_gem_drain_freed_objects(i915);