[intel-gem] Must hold DRM lock while setting object domain
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.main
parent
d434b64f6a
commit
1f4e36081b
|
@ -1529,9 +1529,11 @@ i915_gem_set_domain(struct drm_gem_object *obj,
|
||||||
|
|
||||||
BUG_ON(!mutex_is_locked(&dev->struct_mutex));
|
BUG_ON(!mutex_is_locked(&dev->struct_mutex));
|
||||||
|
|
||||||
|
drm_idlelock_take (&dev->lock);
|
||||||
i915_kernel_lost_context(dev);
|
i915_kernel_lost_context(dev);
|
||||||
i915_gem_object_set_domain(obj, read_domains, write_domain);
|
i915_gem_object_set_domain(obj, read_domains, write_domain);
|
||||||
i915_gem_dev_set_domain(obj->dev);
|
i915_gem_dev_set_domain(obj->dev);
|
||||||
|
drm_idlelock_release (&dev->lock);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue