summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_object.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2011-10-13 16:08:47 -0700
committerDave Airlie <airlied@redhat.com>2011-10-18 09:53:05 +0100
commitce580fab739c815e25d13bae62f96ba7251f6e2e (patch)
treefb8d0e0e4c678b5a14198a0c65cd579aca039ad1 /drivers/gpu/drm/radeon/radeon_object.h
parentcbdd45015af78ec9e75ed7a3df8b76048c4d289f (diff)
downloadblackbird-op-linux-ce580fab739c815e25d13bae62f96ba7251f6e2e.tar.gz
blackbird-op-linux-ce580fab739c815e25d13bae62f96ba7251f6e2e.zip
drm/radeon: Move more code out of line
With this patch I'm only about 50k larger with DRM debugging enables (why is that enabled by default?!?), and slightly smaller without. [airlied: moved r100.c additions to radeon_ring.c] Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.h42
1 files changed, 3 insertions, 39 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
index a057a8e5a6e6..c6c8e43e6d9a 100644
--- a/drivers/gpu/drm/radeon/radeon_object.h
+++ b/drivers/gpu/drm/radeon/radeon_object.h
@@ -52,28 +52,7 @@ static inline unsigned radeon_mem_type_to_domain(u32 mem_type)
return 0;
}
-/**
- * radeon_bo_reserve - reserve bo
- * @bo: bo structure
- * @no_wait: don't sleep while trying to reserve (return -EBUSY)
- *
- * Returns:
- * -EBUSY: buffer is busy and @no_wait is true
- * -ERESTARTSYS: A wait for the buffer to become unreserved was interrupted by
- * a signal. Release all buffer reservations and return to user-space.
- */
-static inline int radeon_bo_reserve(struct radeon_bo *bo, bool no_wait)
-{
- int r;
-
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, 0);
- if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS)
- dev_err(bo->rdev->dev, "%p reserve failed\n", bo);
- return r;
- }
- return 0;
-}
+int radeon_bo_reserve(struct radeon_bo *bo, bool no_wait);
static inline void radeon_bo_unreserve(struct radeon_bo *bo)
{
@@ -118,23 +97,8 @@ static inline u64 radeon_bo_mmap_offset(struct radeon_bo *bo)
return bo->tbo.addr_space_offset;
}
-static inline int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type,
- bool no_wait, enum ttm_buffer_usage usage)
-{
- int r;
-
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, 0);
- if (unlikely(r != 0))
- return r;
- spin_lock(&bo->tbo.bdev->fence_lock);
- if (mem_type)
- *mem_type = bo->tbo.mem.mem_type;
- if (bo->tbo.sync_obj)
- r = ttm_bo_wait(&bo->tbo, true, true, no_wait, usage);
- spin_unlock(&bo->tbo.bdev->fence_lock);
- ttm_bo_unreserve(&bo->tbo);
- return r;
-}
+extern int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type,
+ bool no_wait, enum ttm_buffer_usage usage);
extern int radeon_bo_create(struct radeon_device *rdev,
unsigned long size, int byte_align,
OpenPOWER on IntegriCloud