Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318604
b: refs/heads/master
c: 55a6662
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Jun 20, 2012
1 parent e3d52b6 commit 1d691ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3f33d46fd917747e966f8e6d25f2940223ad1ee
refs/heads/master: 55a6662837a5efe48c836bfc3570ace348f3db09
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,14 @@ void i915_gem_context_fini(struct drm_device *dev)
if (dev_priv->hw_contexts_disabled)
return;

/* The only known way to stop the gpu from accessing the hw context is
* to reset it. Do this as the very last operation to avoid confusing
* other code, leading to spurious errors. */
intel_gpu_reset(dev);

i915_gem_object_unpin(dev_priv->ring[RCS].default_context->obj);

do_destroy(dev_priv->ring[RCS].default_context);

intel_gpu_reset(dev);
}

void i915_gem_context_open(struct drm_device *dev, struct drm_file *file)
Expand Down

0 comments on commit 1d691ae

Please sign in to comment.