* [PATCH libdrm 1/2] freedreno: remove always-defined #ifdef
@ 2018-11-07 18:01 Eric Engestrom
2018-11-07 18:01 ` [PATCH libdrm 2/2] xf86atomic: #undef internal define Eric Engestrom
0 siblings, 1 reply; 3+ messages in thread
From: Eric Engestrom @ 2018-11-07 18:01 UTC (permalink / raw)
To: dri-devel
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 <eric.engestrom@intel.com>
---
freedreno/freedreno_ringbuffer.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h
index bc41a31cd8c5c10a3536..1a1e8425926d0647e358 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;
};
};
--
Cheers,
Eric
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH libdrm 2/2] xf86atomic: #undef internal define
2018-11-07 18:01 [PATCH libdrm 1/2] freedreno: remove always-defined #ifdef Eric Engestrom
@ 2018-11-07 18:01 ` Eric Engestrom
2018-12-17 17:57 ` Emil Velikov
0 siblings, 1 reply; 3+ messages in thread
From: Eric Engestrom @ 2018-11-07 18:01 UTC (permalink / raw)
To: dri-devel
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 <eric.engestrom@intel.com>
---
xf86atomic.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xf86atomic.h b/xf86atomic.h
index 2d733bd53eea3868259c..e268d274f75b0d7e66f2 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;
--
Cheers,
Eric
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH libdrm 2/2] xf86atomic: #undef internal define
2018-11-07 18:01 ` [PATCH libdrm 2/2] xf86atomic: #undef internal define Eric Engestrom
@ 2018-12-17 17:57 ` Emil Velikov
0 siblings, 0 replies; 3+ messages in thread
From: Emil Velikov @ 2018-12-17 17:57 UTC (permalink / raw)
To: Eric Engestrom; +Cc: ML dri-devel
On Wed, 7 Nov 2018 at 18:01, Eric Engestrom <eric.engestrom@intel.com> wrote:
>
> 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 <eric.engestrom@intel.com>
For the series:
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-17 17:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-07 18:01 [PATCH libdrm 1/2] freedreno: remove always-defined #ifdef Eric Engestrom
2018-11-07 18:01 ` [PATCH libdrm 2/2] xf86atomic: #undef internal define Eric Engestrom
2018-12-17 17:57 ` Emil Velikov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.