mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 07:00:11 +01:00
freedreno: revert bad freedreno/atomic_ops commits
This reverts6d2379857b"xf86atomic: #undef internal define" andb541d21a0a"freedreno: remove always-defined #ifdef". I didn't realise at the time that freedreno/freedreno_ringbuffer.h gets installed, and then used by Mesa for instance. These two commits were fine in libdrm, but broke Mesa which needs to use struct fd_ringbuffer but doesn't need to access ::refcnt. The hack that I removed serves to keep the struct at the correct size while only exposing the ::refcnt member within libdrm. Fixes:6d2379857b"xf86atomic: #undef internal define" Fixes:b541d21a0a"freedreno: remove always-defined #ifdef" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
eba6609b7b
commit
e09f327765
2 changed files with 2 additions and 3 deletions
|
|
@ -29,7 +29,6 @@
|
||||||
#ifndef FREEDRENO_RINGBUFFER_H_
|
#ifndef FREEDRENO_RINGBUFFER_H_
|
||||||
#define FREEDRENO_RINGBUFFER_H_
|
#define FREEDRENO_RINGBUFFER_H_
|
||||||
|
|
||||||
#include <xf86atomic.h>
|
|
||||||
#include <freedreno_drmif.h>
|
#include <freedreno_drmif.h>
|
||||||
|
|
||||||
/* the ringbuffer object is not opaque so that OUT_RING() type stuff
|
/* the ringbuffer object is not opaque so that OUT_RING() type stuff
|
||||||
|
|
@ -84,7 +83,9 @@ struct fd_ringbuffer {
|
||||||
* be inlined for performance reasons.
|
* be inlined for performance reasons.
|
||||||
*/
|
*/
|
||||||
union {
|
union {
|
||||||
|
#ifdef HAS_ATOMIC_OPS
|
||||||
atomic_t refcnt;
|
atomic_t refcnt;
|
||||||
|
#endif
|
||||||
uint64_t __pad;
|
uint64_t __pad;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,6 @@ typedef struct { LIBDRM_ATOMIC_TYPE atomic; } atomic_t;
|
||||||
#error libdrm requires atomic operations, please define them for your CPU/compiler.
|
#error libdrm requires atomic operations, please define them for your CPU/compiler.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef HAS_ATOMIC_OPS
|
|
||||||
|
|
||||||
static inline int atomic_add_unless(atomic_t *v, int add, int unless)
|
static inline int atomic_add_unless(atomic_t *v, int add, int unless)
|
||||||
{
|
{
|
||||||
int c, old;
|
int c, old;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue