diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-17 15:46:47 -0400 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-17 18:54:06 -0400 |
| commit | ce8ff099c47be277e56461b91270a4926954dc98 (patch) | |
| tree | ebacdeb593fe03c549179f3c17b4955a08a1ccac | |
| parent | 51a575d957fcb2848babb7163cb6e44a028a29ae (diff) | |
drm/i915: i915_gem_object_create_from_data() doesn't require struct_mutex
Both object creation and backing storage page allocation do not require
struct_mutex, so do not require the caller to take it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170317194648.12468-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_uc.c | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index fd611b4c1a2c..3492f8d27c32 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -4961,9 +4961,7 @@ i915_gem_object_create_from_data(struct drm_i915_private *dev_priv, | |||
| 4961 | if (IS_ERR(obj)) | 4961 | if (IS_ERR(obj)) |
| 4962 | return obj; | 4962 | return obj; |
| 4963 | 4963 | ||
| 4964 | ret = i915_gem_object_set_to_cpu_domain(obj, true); | 4964 | GEM_BUG_ON(obj->base.write_domain != I915_GEM_DOMAIN_CPU); |
| 4965 | if (ret) | ||
| 4966 | goto fail; | ||
| 4967 | 4965 | ||
| 4968 | ret = i915_gem_object_pin_pages(obj); | 4966 | ret = i915_gem_object_pin_pages(obj); |
| 4969 | if (ret) | 4967 | if (ret) |
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 21f6d822194d..86530c92337a 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c | |||
| @@ -376,9 +376,7 @@ void intel_uc_prepare_fw(struct drm_i915_private *dev_priv, | |||
| 376 | uc_fw->major_ver_found, uc_fw->minor_ver_found, | 376 | uc_fw->major_ver_found, uc_fw->minor_ver_found, |
| 377 | uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted); | 377 | uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted); |
| 378 | 378 | ||
| 379 | mutex_lock(&dev_priv->drm.struct_mutex); | ||
| 380 | obj = i915_gem_object_create_from_data(dev_priv, fw->data, fw->size); | 379 | obj = i915_gem_object_create_from_data(dev_priv, fw->data, fw->size); |
| 381 | mutex_unlock(&dev_priv->drm.struct_mutex); | ||
| 382 | if (IS_ERR_OR_NULL(obj)) { | 380 | if (IS_ERR_OR_NULL(obj)) { |
| 383 | err = obj ? PTR_ERR(obj) : -ENOMEM; | 381 | err = obj ? PTR_ERR(obj) : -ENOMEM; |
| 384 | goto fail; | 382 | goto fail; |
