Unlike the other i915_gem_object create functions, _from_data() requires the struct_mutex as it also allocates the backing storage and so interacts with the common lists. Document this requirement. Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 2039798f4403..2bf139396660 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -5226,6 +5226,8 @@ i915_gem_object_create_from_data(struct drm_device *dev, size_t bytes; int ret; + lockdep_assert_held(&dev->struct_mutex); + obj = i915_gem_alloc_object(dev, PAGE_ALIGN(size)); if (IS_ERR_OR_NULL(obj)) return obj; -- 2.4.6 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx