drm: Branch 'master' - 2 commits
[email protected] (GitLab Mirror) Thu, 3 Jan 2019 18:37:41 +0000 (UTC)
| Newsgroups | gmane.comp.video.dri.patches |
|---|---|
| Message-ID | <[email protected]> |
freedreno/freedreno_ringbuffer.h | 3 +-- xf86atomic.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit 6d2379857b6fccc1cadeb81acdcee295b081b0cb Author: Eric Engestrom <[email protected]> Date: Wed Nov 7 17:57:02 2018 +0000 xf86atomic: #undef internal define Thanks to the #error just above, any file including this header can only see one state for this macro: defined, with the value `1`. Let's just #undef it once we're done using it in here so that other files don't misconstrue any meaning to it. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> diff --git a/xf86atomic.h b/xf86atomic.h index 2d733bd5..e268d274 100644 --- a/xf86atomic.h +++ b/xf86atomic.h @@ -101,6 +101,8 @@ 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; commit b541d21a0a908bf98d44375720f4430297720743 Author: Eric Engestrom <[email protected]> Date: Wed Nov 7 17:23:55 2018 +0000 freedreno: remove always-defined #ifdef While at it, let's include xf86atomic.h explicitly, instead of relying on some other file accidentally including it before including this file. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h index bc41a31c..1a1e8425 100644 --- a/freedreno/freedreno_ringbuffer.h +++ b/freedreno/freedreno_ringbuffer.h @@ -29,6 +29,7 @@ #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 @@ -83,9 +84,7 @@ struct fd_ringbuffer { * be inlined for performance reasons. */ union { -#ifdef HAS_ATOMIC_OPS atomic_t refcnt; -#endif uint64_t __pad; }; }; --