|
@@ -1669,7 +1669,6 @@ int i915_driver_unload(struct drm_device *dev)
|
|
|
if (ret)
|
|
|
DRM_ERROR("failed to idle hardware: %d\n", ret);
|
|
|
i915_gem_retire_requests(dev);
|
|
|
- i915_gem_context_fini(dev);
|
|
|
mutex_unlock(&dev->struct_mutex);
|
|
|
|
|
|
/* Cancel the retire work handler, which should be idle now. */
|
|
@@ -1720,6 +1719,7 @@ int i915_driver_unload(struct drm_device *dev)
|
|
|
mutex_lock(&dev->struct_mutex);
|
|
|
i915_gem_free_all_phys_object(dev);
|
|
|
i915_gem_cleanup_ringbuffer(dev);
|
|
|
+ i915_gem_context_fini(dev);
|
|
|
mutex_unlock(&dev->struct_mutex);
|
|
|
i915_gem_cleanup_aliasing_ppgtt(dev);
|
|
|
i915_gem_cleanup_stolen(dev);
|