diff options
author | Dave Gordon <david.s.gordon@intel.com> | 2016-04-22 14:14:32 -0400 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-04-25 07:31:34 -0400 |
commit | d37cd8a8878e8a257a2ea515fe4a0bb370b4efc5 (patch) | |
tree | 071f97f0749f0a5a399539b9bc258ae7211f4121 /drivers/gpu/drm/i915/i915_gem.c | |
parent | ee0629cfd3c16c716801c84e939ff5db5e23f54d (diff) |
drm/i915: rename i915_gem_alloc_object() to i915_gem_object_create()
Because having both i915_gem_object_alloc() and i915_gem_alloc_object()
(with different return conventions) is just too confusing!
(i915_gem_object_alloc() is the low-level memory allocator, and remains
unchanged, whereas i915_gem_alloc_object() is a constructor that ALSO
initialises the newly-allocated object.)
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1461348872-4702-1-git-send-email-david.s.gordon@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index a14a98341a4b..44950cc4a529 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -381,7 +381,7 @@ i915_gem_create(struct drm_file *file, | |||
381 | return -EINVAL; | 381 | return -EINVAL; |
382 | 382 | ||
383 | /* Allocate the new object */ | 383 | /* Allocate the new object */ |
384 | obj = i915_gem_alloc_object(dev, size); | 384 | obj = i915_gem_object_create(dev, size); |
385 | if (obj == NULL) | 385 | if (obj == NULL) |
386 | return -ENOMEM; | 386 | return -ENOMEM; |
387 | 387 | ||
@@ -4495,7 +4495,7 @@ static const struct drm_i915_gem_object_ops i915_gem_object_ops = { | |||
4495 | .put_pages = i915_gem_object_put_pages_gtt, | 4495 | .put_pages = i915_gem_object_put_pages_gtt, |
4496 | }; | 4496 | }; |
4497 | 4497 | ||
4498 | struct drm_i915_gem_object *i915_gem_alloc_object(struct drm_device *dev, | 4498 | struct drm_i915_gem_object *i915_gem_object_create(struct drm_device *dev, |
4499 | size_t size) | 4499 | size_t size) |
4500 | { | 4500 | { |
4501 | struct drm_i915_gem_object *obj; | 4501 | struct drm_i915_gem_object *obj; |
@@ -5364,7 +5364,7 @@ i915_gem_object_create_from_data(struct drm_device *dev, | |||
5364 | size_t bytes; | 5364 | size_t bytes; |
5365 | int ret; | 5365 | int ret; |
5366 | 5366 | ||
5367 | obj = i915_gem_alloc_object(dev, round_up(size, PAGE_SIZE)); | 5367 | obj = i915_gem_object_create(dev, round_up(size, PAGE_SIZE)); |
5368 | if (IS_ERR_OR_NULL(obj)) | 5368 | if (IS_ERR_OR_NULL(obj)) |
5369 | return obj; | 5369 | return obj; |
5370 | 5370 | ||