summaryrefslogtreecommitdiff
path: root/linux-core/drm_fence.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-01 15:41:55 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-01 15:41:55 +0200
commit11f51a9a877d1231551e8c6482a6f70daf380cdd (patch)
treed3e6731ca1641ed0107336d8c41e1620cfe80b4f /linux-core/drm_fence.c
parent4edb95d6e0a00a9a8885603cab2c99e3c6daa705 (diff)
Bugfixes,
Memory allocation optimizations. Buffer manager takedown.
Diffstat (limited to 'linux-core/drm_fence.c')
-rw-r--r--linux-core/drm_fence.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-core/drm_fence.c b/linux-core/drm_fence.c
index 897f84c5..b4d13621 100644
--- a/linux-core/drm_fence.c
+++ b/linux-core/drm_fence.c
@@ -172,7 +172,7 @@ void drm_fence_usage_deref_locked(drm_device_t * dev,
{
if (atomic_dec_and_test(&fence->usage)) {
drm_fence_unring(dev, &fence->ring);
- drm_free(fence, sizeof(*fence), DRM_MEM_FENCE);
+ kmem_cache_free(dev->fence_object_cache, fence);
}
}
@@ -183,7 +183,7 @@ void drm_fence_usage_deref_unlocked(drm_device_t * dev,
mutex_lock(&dev->struct_mutex);
if (atomic_read(&fence->usage) == 0) {
drm_fence_unring(dev, &fence->ring);
- drm_free(fence, sizeof(*fence), DRM_MEM_FENCE);
+ kmem_cache_free(dev->fence_object_cache, fence);
}
mutex_unlock(&dev->struct_mutex);
}
@@ -426,7 +426,7 @@ static int drm_fence_object_create(drm_file_t * priv, uint32_t type,
int ret;
drm_fence_object_t *fence;
- fence = drm_calloc(1, sizeof(*fence), DRM_MEM_FENCE);
+ fence = kmem_cache_alloc(dev->fence_object_cache, GFP_KERNEL);
if (!fence)
return -ENOMEM;
ret = drm_fence_object_init(dev, type, emit, fence);