projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d434b64
)
[intel-gem] Must hold DRM lock while setting object domain
author
Keith Packard
<keithp@keithp.com>
Tue, 27 May 2008 00:41:46 +0000
(17:41 -0700)
committer
Keith Packard
<keithp@keithp.com>
Tue, 27 May 2008 00:41:46 +0000
(17:41 -0700)
Object domain transfer can involve adding flush ops to the request queue,
and so the DRM lock must be held to avoid having the X server smash pointers
badly.
linux-core/i915_gem.c
patch
|
blob
|
history
diff --git
a/linux-core/i915_gem.c
b/linux-core/i915_gem.c
index
3ad3f40
..
5eeabda
100644
(file)
--- a/
linux-core/i915_gem.c
+++ b/
linux-core/i915_gem.c
@@
-1529,9
+1529,11
@@
i915_gem_set_domain(struct drm_gem_object *obj,
BUG_ON(!mutex_is_locked(&dev->struct_mutex));
+ drm_idlelock_take (&dev->lock);
i915_kernel_lost_context(dev);
i915_gem_object_set_domain(obj, read_domains, write_domain);
i915_gem_dev_set_domain(obj->dev);
+ drm_idlelock_release (&dev->lock);
return 0;
}