diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-30 10:08:57 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-01 09:45:21 -0400 |
commit | 812ed4924328adf94f45c664b6a4c710a69167e2 (patch) | |
tree | 661390c609ebf6e225638d45c7e5bf2206c7e720 /drivers/gpu/drm | |
parent | 73aa808f10effc280e6eb70267314542a7c29426 (diff) |
drm/i915: Force the domain to CPU on unbinding whilst wedged.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30083
Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 16c4b7b9602c..c033c5a2e9fc 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2158,6 +2158,10 @@ i915_gem_object_unbind(struct drm_gem_object *obj) | |||
2158 | * should be safe and we need to cleanup or else we might | 2158 | * should be safe and we need to cleanup or else we might |
2159 | * cause memory corruption through use-after-free. | 2159 | * cause memory corruption through use-after-free. |
2160 | */ | 2160 | */ |
2161 | if (ret) { | ||
2162 | i915_gem_clflush_object(obj); | ||
2163 | obj->read_domains = obj->write_domain = I915_GEM_DOMAIN_CPU; | ||
2164 | } | ||
2161 | 2165 | ||
2162 | /* release the fence reg _after_ flushing */ | 2166 | /* release the fence reg _after_ flushing */ |
2163 | if (obj_priv->fence_reg != I915_FENCE_REG_NONE) | 2167 | if (obj_priv->fence_reg != I915_FENCE_REG_NONE) |