summaryrefslogtreecommitdiffstats
path: root/src/etnaviv/drm/etnaviv_bo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/etnaviv/drm/etnaviv_bo.c')
-rw-r--r--src/etnaviv/drm/etnaviv_bo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/etnaviv/drm/etnaviv_bo.c b/src/etnaviv/drm/etnaviv_bo.c
index be88241d61b..31ad484da4f 100644
--- a/src/etnaviv/drm/etnaviv_bo.c
+++ b/src/etnaviv/drm/etnaviv_bo.c
@@ -95,7 +95,7 @@ static struct etna_bo *bo_from_handle(struct etna_device *dev,
bo->size = size;
bo->handle = handle;
bo->flags = flags;
- atomic_set(&bo->refcnt, 1);
+ p_atomic_set(&bo->refcnt, 1);
list_inithead(&bo->list);
/* add ourselves to the handle table: */
drmHashInsert(dev->handle_table, handle, bo);
@@ -133,7 +133,7 @@ struct etna_bo *etna_bo_new(struct etna_device *dev, uint32_t size,
struct etna_bo *etna_bo_ref(struct etna_bo *bo)
{
- atomic_inc(&bo->refcnt);
+ p_atomic_inc(&bo->refcnt);
return bo;
}
@@ -239,7 +239,7 @@ void etna_bo_del(struct etna_bo *bo)
if (!bo)
return;
- if (!atomic_dec_and_test(&bo->refcnt))
+ if (!p_atomic_dec_zero(&bo->refcnt))
return;
pthread_mutex_lock(&table_lock);