mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-09 07:28:42 +02:00
Another checkpoint: Use bool for boolean.
This commit is contained in:
parent
41c3f1ac56
commit
a520b3ed01
7 changed files with 23 additions and 23 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue