summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--freedreno/freedreno_ringbuffer.h3
-rw-r--r--xf86atomic.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h
index 1a1e8425..bc41a31c 100644
--- a/freedreno/freedreno_ringbuffer.h
+++ b/freedreno/freedreno_ringbuffer.h
@@ -29,7 +29,6 @@
#ifndef FREEDRENO_RINGBUFFER_H_
#define FREEDRENO_RINGBUFFER_H_
-#include <xf86atomic.h>
#include <freedreno_drmif.h>
/* the ringbuffer object is not opaque so that OUT_RING() type stuff
@@ -84,7 +83,9 @@ struct fd_ringbuffer {
* be inlined for performance reasons.
*/
union {
+#ifdef HAS_ATOMIC_OPS
atomic_t refcnt;
+#endif
uint64_t __pad;
};
};
diff --git a/xf86atomic.h b/xf86atomic.h
index e268d274..2d733bd5 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -101,8 +101,6 @@ typedef struct { LIBDRM_ATOMIC_TYPE atomic; } atomic_t;
#error libdrm requires atomic operations, please define them for your CPU/compiler.
#endif
-#undef HAS_ATOMIC_OPS
-
static inline int atomic_add_unless(atomic_t *v, int add, int unless)
{
int c, old;