]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/cirrus: inline reservations
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Thu, 27 Jun 2013 11:48:21 +0000 (13:48 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Jun 2013 02:04:05 +0000 (12:04 +1000)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/cirrus/cirrus_drv.h
drivers/gpu/drm/cirrus/cirrus_ttm.c

index 7ca05959688748a436eb27ae7215ec106dd220d2..bae55609e6c3f2192c2cd49a33417badf4c6e962 100644 (file)
@@ -240,8 +240,25 @@ void cirrus_ttm_placement(struct cirrus_bo *bo, int domain);
 int cirrus_bo_create(struct drm_device *dev, int size, int align,
                     uint32_t flags, struct cirrus_bo **pcirrusbo);
 int cirrus_mmap(struct file *filp, struct vm_area_struct *vma);
-int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait);
-void cirrus_bo_unreserve(struct cirrus_bo *bo);
+
+static inline int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait)
+{
+       int ret;
+
+       ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
+       if (ret) {
+               if (ret != -ERESTARTSYS && ret != -EBUSY)
+                       DRM_ERROR("reserve failed %p\n", bo);
+               return ret;
+       }
+       return 0;
+}
+
+static inline void cirrus_bo_unreserve(struct cirrus_bo *bo)
+{
+       ttm_bo_unreserve(&bo->bo);
+}
+
 int cirrus_bo_push_sysram(struct cirrus_bo *bo);
 int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr);
 #endif                         /* __CIRRUS_DRV_H__ */
index 36b9b0bab1daf9f19e1f229f819f9249af077491..0047012045c27cff7cfa8dbd386ca239d850e4be 100644 (file)
@@ -308,24 +308,6 @@ void cirrus_ttm_placement(struct cirrus_bo *bo, int domain)
        bo->placement.num_busy_placement = c;
 }
 
-int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait)
-{
-       int ret;
-
-       ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
-       if (ret) {
-               if (ret != -ERESTARTSYS && ret != -EBUSY)
-                       DRM_ERROR("reserve failed %p\n", bo);
-               return ret;
-       }
-       return 0;
-}
-
-void cirrus_bo_unreserve(struct cirrus_bo *bo)
-{
-       ttm_bo_unreserve(&bo->bo);
-}
-
 int cirrus_bo_create(struct drm_device *dev, int size, int align,
                  uint32_t flags, struct cirrus_bo **pcirrusbo)
 {