diff options
author | Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 2009-02-13 21:18:47 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 2009-02-13 21:18:47 +0100 |
commit | a520b3ed013f534e93784ab46489f8b72f16f5cf (patch) | |
tree | 52b2cfefc51ded43d23570f955472bd9516910f7 | |
parent | 41c3f1ac566f803eb198daaf29a1edeb54e5cb0e (diff) |
Another checkpoint: Use bool for boolean.
-rw-r--r-- | linux-core/openchrome/via_execbuf.c | 2 | ||||
-rw-r--r-- | linux-core/openchrome/via_ttm_fence.c | 6 | ||||
-rw-r--r-- | linux-core/ttm/ttm_bo_driver.h | 2 | ||||
-rw-r--r-- | linux-core/ttm/ttm_fence.c | 22 | ||||
-rw-r--r-- | linux-core/ttm/ttm_fence_api.h | 4 | ||||
-rw-r--r-- | linux-core/ttm/ttm_fence_driver.h | 8 | ||||
-rw-r--r-- | linux-core/ttm/ttm_fence_user.c | 2 |
7 files changed, 23 insertions, 23 deletions
diff --git a/linux-core/openchrome/via_execbuf.c b/linux-core/openchrome/via_execbuf.c index e16922e5..eb7bc083 100644 --- a/linux-core/openchrome/via_execbuf.c +++ b/linux-core/openchrome/via_execbuf.c @@ -814,7 +814,7 @@ static int via_wait_single_barrier(struct drm_via_private *dev_priv, if (likely(dev_priv->barriers[barrier] == NULL)) return 0; - ret = ttm_fence_object_wait(dev_priv->barriers[barrier], 0, 1, + ret = ttm_fence_object_wait(dev_priv->barriers[barrier], false, true, barrier_type); if (unlikely(ret != 0)) return ret; diff --git a/linux-core/openchrome/via_ttm_fence.c b/linux-core/openchrome/via_ttm_fence.c index cf15de37..ccfc1264 100644 --- a/linux-core/openchrome/via_ttm_fence.c +++ b/linux-core/openchrome/via_ttm_fence.c @@ -158,8 +158,8 @@ void via_ttm_fence_dmablit_handler(struct drm_via_private *dev_priv, int engine) write_unlock(&fc->lock); } -static int via_ttm_fence_has_irq(struct ttm_fence_device *fdev, - uint32_t engine, uint32_t flags) +static bool via_ttm_fence_has_irq(struct ttm_fence_device *fdev, + uint32_t engine, uint32_t flags) { struct drm_via_private *dev_priv = container_of(fdev, struct drm_via_private, fdev); @@ -226,5 +226,5 @@ int via_ttm_fence_device_init(struct drm_via_private *dev_priv) return ttm_fence_device_init(5, dev_priv->mem_global_ref.object, &dev_priv->fdev, - &fci, 1, &via_ttm_fence_driver); + &fci, true, &via_ttm_fence_driver); } diff --git a/linux-core/ttm/ttm_bo_driver.h b/linux-core/ttm/ttm_bo_driver.h index 94ec8110..85653177 100644 --- a/linux-core/ttm/ttm_bo_driver.h +++ b/linux-core/ttm/ttm_bo_driver.h @@ -346,7 +346,7 @@ struct ttm_bo_driver { * documentation. */ - int (*sync_obj_signaled) (void *sync_obj, void *sync_arg); + bool (*sync_obj_signaled) (void *sync_obj, void *sync_arg); int (*sync_obj_wait) (void *sync_obj, void *sync_arg, bool lazy, bool interruptible); int (*sync_obj_flush) (void *sync_obj, void *sync_arg); diff --git a/linux-core/ttm/ttm_fence.c b/linux-core/ttm/ttm_fence.c index f91ca7b0..2f61fadd 100644 --- a/linux-core/ttm/ttm_fence.c +++ b/linux-core/ttm/ttm_fence.c @@ -63,8 +63,8 @@ static void ttm_fence_lockup(struct ttm_fence_object *fence, uint32_t mask) * need polling. */ -int ttm_fence_wait_polling(struct ttm_fence_object *fence, int lazy, - int interruptible, uint32_t mask) +int ttm_fence_wait_polling(struct ttm_fence_object *fence, bool lazy, + bool interruptible, uint32_t mask) { struct ttm_fence_class_manager *fc = ttm_fence_fc(fence); const struct ttm_fence_driver *driver = ttm_fence_driver(fence); @@ -123,7 +123,7 @@ void ttm_fence_handler(struct ttm_fence_device *fdev, uint32_t fence_class, const struct ttm_fence_driver *driver = ttm_fence_driver_from_dev(fdev); struct list_head *head; struct ttm_fence_object *fence, *next; - int found = 0; + bool found = false; if (list_empty(&fc->ring)) return; @@ -131,7 +131,7 @@ void ttm_fence_handler(struct ttm_fence_device *fdev, uint32_t fence_class, list_for_each_entry(fence, &fc->ring, ring) { diff = (sequence - fence->sequence) & fc->sequence_mask; if (diff > fc->wrap_diff) { - found = 1; + found = true; break; } } @@ -247,7 +247,7 @@ int ttm_fence_object_flush(struct ttm_fence_object *fence, uint32_t type) unsigned long irq_flags; uint32_t saved_pending_flush; uint32_t diff; - int call_flush; + bool call_flush; if (type & ~fence->fence_type) { DRM_ERROR("Flush trying to extend fence type, " @@ -277,7 +277,7 @@ int ttm_fence_object_flush(struct ttm_fence_object *fence, uint32_t type) driver->poll(fence->fdev, fence->fence_class, fence->waiting_types); - call_flush = fc->pending_flush; + call_flush = (fc->pending_flush != 0); write_unlock_irqrestore(&fc->lock, irq_flags); if (call_flush && driver->flush) @@ -298,7 +298,7 @@ void ttm_fence_flush_old(struct ttm_fence_device *fdev, struct ttm_fence_object *fence; unsigned long irq_flags; const struct ttm_fence_driver *driver = fdev->driver; - int call_flush; + bool call_flush; uint32_t diff; @@ -319,7 +319,7 @@ void ttm_fence_flush_old(struct ttm_fence_device *fdev, if (driver->poll) driver->poll(fdev, fence_class, fc->waiting_types); - call_flush = fc->pending_flush; + call_flush = (fc->pending_flush != 0); write_unlock_irqrestore(&fc->lock, irq_flags); if (call_flush && driver->flush) @@ -332,7 +332,7 @@ void ttm_fence_flush_old(struct ttm_fence_device *fdev, } int ttm_fence_object_wait(struct ttm_fence_object *fence, - int lazy, int interruptible, uint32_t mask) + bool lazy, bool interruptible, uint32_t mask) { const struct ttm_fence_driver *driver = ttm_fence_driver(fence); struct ttm_fence_class_manager *fc = ttm_fence_fc(fence); @@ -512,7 +512,7 @@ ttm_fence_device_init(int num_classes, struct ttm_mem_global *mem_glob, struct ttm_fence_device *fdev, const struct ttm_fence_class_init *init, - int replicate_init, const struct ttm_fence_driver *driver) + bool replicate_init, const struct ttm_fence_driver *driver) { struct ttm_fence_class_manager *fc; const struct ttm_fence_class_init *fci; @@ -579,7 +579,7 @@ bool ttm_fence_sync_obj_signaled(void *sync_obj, void *sync_arg) } int ttm_fence_sync_obj_wait(void *sync_obj, void *sync_arg, - int lazy, int interruptible) + bool lazy, bool interruptible) { struct ttm_fence_object *fence = (struct ttm_fence_object *)sync_obj; uint32_t fence_types = (uint32_t) (unsigned long)sync_arg; diff --git a/linux-core/ttm/ttm_fence_api.h b/linux-core/ttm/ttm_fence_api.h index fbd7f1f9..2a4e12bf 100644 --- a/linux-core/ttm/ttm_fence_api.h +++ b/linux-core/ttm/ttm_fence_api.h @@ -163,7 +163,7 @@ ttm_fence_object_create(struct ttm_fence_device *fdev, extern int ttm_fence_object_wait(struct ttm_fence_object *fence, - int lazy, int interruptible, uint32_t type_mask); + bool lazy, bool interruptible, uint32_t type_mask); /** * ttm_fence_object_flush @@ -269,7 +269,7 @@ static inline uint32_t ttm_fence_types(const struct ttm_fence_object *fence) extern bool ttm_fence_sync_obj_signaled(void *sync_obj, void *sync_arg); extern int ttm_fence_sync_obj_wait(void *sync_obj, void *sync_arg, - int lazy, int interruptible); + bool lazy, bool interruptible); extern int ttm_fence_sync_obj_flush(void *sync_obj, void *sync_arg); extern void ttm_fence_sync_obj_unref(void **sync_obj); extern void *ttm_fence_sync_obj_ref(void *sync_obj); diff --git a/linux-core/ttm/ttm_fence_driver.h b/linux-core/ttm/ttm_fence_driver.h index 69ee6f29..2eca4944 100644 --- a/linux-core/ttm/ttm_fence_driver.h +++ b/linux-core/ttm/ttm_fence_driver.h @@ -183,7 +183,7 @@ struct ttm_fence_class_init { */ struct ttm_fence_driver { - int (*has_irq) (struct ttm_fence_device * fdev, + bool (*has_irq) (struct ttm_fence_device * fdev, uint32_t fence_class, uint32_t flags); int (*emit) (struct ttm_fence_device * fdev, uint32_t fence_class, @@ -194,8 +194,8 @@ struct ttm_fence_driver { uint32_t fence_class, uint32_t types); uint32_t(*needed_flush) (struct ttm_fence_object * fence); - int (*wait) (struct ttm_fence_object * fence, int lazy, - int interruptible, uint32_t mask); + int (*wait) (struct ttm_fence_object * fence, bool lazy, + bool interruptible, uint32_t mask); void (*signaled) (struct ttm_fence_object * fence); void (*lockup) (struct ttm_fence_object * fence, uint32_t fence_types); }; @@ -218,7 +218,7 @@ ttm_fence_device_init(int num_classes, struct ttm_mem_global *mem_glob, struct ttm_fence_device *fdev, const struct ttm_fence_class_init *init, - int replicate_init, + bool replicate_init, const struct ttm_fence_driver *driver); /** diff --git a/linux-core/ttm/ttm_fence_user.c b/linux-core/ttm/ttm_fence_user.c index 24b673a1..c35d8cf0 100644 --- a/linux-core/ttm/ttm_fence_user.c +++ b/linux-core/ttm/ttm_fence_user.c @@ -218,7 +218,7 @@ int ttm_fence_finish_ioctl(struct ttm_object_file *tfile, void *data) ret = ttm_fence_object_wait(fence, arg->req.mode & TTM_FENCE_FINISH_MODE_LAZY, - 1, arg->req.fence_type); + true, arg->req.fence_type); if (likely(ret == 0)) { struct ttm_fence_info info = ttm_fence_get_info(fence); |