]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
drm/mgag200: inline reservations
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Thu, 27 Jun 2013 11:48:22 +0000 (13:48 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Jun 2013 02:04:06 +0000 (12:04 +1000)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_ttm.c

index d9737ef2d9a2d13f4584504ab5ee2235caf96ce8..12e2499d935266150643a2bbb624a149e6fb59d0 100644 (file)
@@ -280,8 +280,24 @@ void mgag200_i2c_destroy(struct mga_i2c_chan *i2c);
 #define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)
 void mgag200_ttm_placement(struct mgag200_bo *bo, int domain);
 
-int mgag200_bo_reserve(struct mgag200_bo *bo, bool no_wait);
-void mgag200_bo_unreserve(struct mgag200_bo *bo);
+static inline int mgag200_bo_reserve(struct mgag200_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 mgag200_bo_unreserve(struct mgag200_bo *bo)
+{
+       ttm_bo_unreserve(&bo->bo);
+}
+
 int mgag200_bo_create(struct drm_device *dev, int size, int align,
                      uint32_t flags, struct mgag200_bo **pastbo);
 int mgag200_mm_init(struct mga_device *mdev);
index 0004f7740b8e0a5c0cde9fc79fa169a5c5f2b413..3acb2b044c7b2d626c4efb9741c39a89f92a5ebc 100644 (file)
@@ -303,24 +303,6 @@ void mgag200_ttm_placement(struct mgag200_bo *bo, int domain)
        bo->placement.num_busy_placement = c;
 }
 
-int mgag200_bo_reserve(struct mgag200_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 %d\n", bo, ret);
-               return ret;
-       }
-       return 0;
-}
-
-void mgag200_bo_unreserve(struct mgag200_bo *bo)
-{
-       ttm_bo_unreserve(&bo->bo);
-}
-
 int mgag200_bo_create(struct drm_device *dev, int size, int align,
                  uint32_t flags, struct mgag200_bo **pmgabo)
 {