drm/radeon: drop non blocking allocations from sub allocator
authorChristian König <christian.koenig@amd.com>
Thu, 20 Feb 2014 20:48:00 +0000 (21:48 +0100)
committerChristian König <christian.koenig@amd.com>
Mon, 3 Mar 2014 10:26:39 +0000 (11:26 +0100)
Not needed any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/radeon/radeon_object.h
drivers/gpu/drm/radeon/radeon_ring.c
drivers/gpu/drm/radeon/radeon_sa.c
drivers/gpu/drm/radeon/radeon_semaphore.c

index 7dff64d1f592719c63bd0e58651a64c5e8ff6291..9e7b25a0629d3a249720628aa697b9ff8a0f4a6f 100644 (file)
@@ -180,7 +180,7 @@ extern int radeon_sa_bo_manager_suspend(struct radeon_device *rdev,
 extern int radeon_sa_bo_new(struct radeon_device *rdev,
                            struct radeon_sa_manager *sa_manager,
                            struct radeon_sa_bo **sa_bo,
-                           unsigned size, unsigned align, bool block);
+                           unsigned size, unsigned align);
 extern void radeon_sa_bo_free(struct radeon_device *rdev,
                              struct radeon_sa_bo **sa_bo,
                              struct radeon_fence *fence);
index 5321e249021fab03d497485d868cffcc65c12ba9..8b0dfdd23793abcf1646f04d5611bf3ec3ad837f 100644 (file)
@@ -63,7 +63,7 @@ int radeon_ib_get(struct radeon_device *rdev, int ring,
 {
        int r;
 
-       r = radeon_sa_bo_new(rdev, &rdev->ring_tmp_bo, &ib->sa_bo, size, 256, true);
+       r = radeon_sa_bo_new(rdev, &rdev->ring_tmp_bo, &ib->sa_bo, size, 256);
        if (r) {
                dev_err(rdev->dev, "failed to get a new IB (%d)\n", r);
                return r;
index c0625805cdd769b826d0605141f6cc80ce80ad72..adcf3e2f07da5ac10adc84a9c6c6d85b631ff87d 100644 (file)
@@ -312,7 +312,7 @@ static bool radeon_sa_bo_next_hole(struct radeon_sa_manager *sa_manager,
 int radeon_sa_bo_new(struct radeon_device *rdev,
                     struct radeon_sa_manager *sa_manager,
                     struct radeon_sa_bo **sa_bo,
-                    unsigned size, unsigned align, bool block)
+                    unsigned size, unsigned align)
 {
        struct radeon_fence *fences[RADEON_NUM_RINGS];
        unsigned tries[RADEON_NUM_RINGS];
@@ -353,14 +353,11 @@ int radeon_sa_bo_new(struct radeon_device *rdev,
                r = radeon_fence_wait_any(rdev, fences, false);
                spin_lock(&sa_manager->wq.lock);
                /* if we have nothing to wait for block */
-               if (r == -ENOENT && block) {
+               if (r == -ENOENT) {
                        r = wait_event_interruptible_locked(
                                sa_manager->wq, 
                                radeon_sa_event(sa_manager, size, align)
                        );
-
-               } else if (r == -ENOENT) {
-                       r = -ENOMEM;
                }
 
        } while (!r);
index 6140af6772c7cac7a5fb2d1dda553676e7c8c390..dbd6bcde92de412a87379d7da23a4cea74b40649 100644 (file)
@@ -42,7 +42,7 @@ int radeon_semaphore_create(struct radeon_device *rdev,
                return -ENOMEM;
        }
        r = radeon_sa_bo_new(rdev, &rdev->ring_tmp_bo, &(*semaphore)->sa_bo,
-                            8 * RADEON_NUM_SYNCS, 8, true);
+                            8 * RADEON_NUM_SYNCS, 8);
        if (r) {
                kfree(*semaphore);
                *semaphore = NULL;