diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-04-09 19:05:06 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-20 13:22:26 +1000 |
commit | ac52bc56de25535a907ef07f8755f1387b89b0f5 (patch) | |
tree | 7415fc01a7b420899bfd09b4836d454e8c14dfc6 /drivers/gpu/drm/i915/i915_gem.c | |
parent | fd632aa34c8592fb1d37fc83cbffa827bc7dd42c (diff) |
drm/i915: introduce i915_gem_alloc_object
Just preparation, no functional change.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d4ea90999f6..92dd5221682 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -124,7 +124,7 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data, args->size = roundup(args->size, PAGE_SIZE); /* Allocate the new object */ - obj = drm_gem_object_alloc(dev, args->size); + obj = i915_gem_alloc_object(dev, args->size); if (obj == NULL) return -ENOMEM; @@ -4421,6 +4421,12 @@ i915_gem_madvise_ioctl(struct drm_device *dev, void *data, return 0; } +struct drm_gem_object * i915_gem_alloc_object(struct drm_device *dev, + size_t size) +{ + return drm_gem_object_alloc(dev, size); +} + int i915_gem_init_object(struct drm_gem_object *obj) { struct drm_i915_gem_object *obj_priv; @@ -4563,7 +4569,7 @@ i915_gem_init_hws(struct drm_device *dev) if (!I915_NEED_GFX_HWS(dev)) return 0; - obj = drm_gem_object_alloc(dev, 4096); + obj = i915_gem_alloc_object(dev, 4096); if (obj == NULL) { DRM_ERROR("Failed to allocate status page\n"); return -ENOMEM; @@ -4640,7 +4646,7 @@ i915_gem_init_ringbuffer(struct drm_device *dev) if (ret != 0) return ret; - obj = drm_gem_object_alloc(dev, 128 * 1024); + obj = i915_gem_alloc_object(dev, 128 * 1024); if (obj == NULL) { DRM_ERROR("Failed to allocate ringbuffer\n"); i915_gem_cleanup_hws(dev); |