Signed-off-by: Thomas Klausner wiz@NetBSD.org --- intel/test_decode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/intel/test_decode.c b/intel/test_decode.c index b710f34..f9127cf 100644 --- a/intel/test_decode.c +++ b/intel/test_decode.c @@ -90,7 +90,10 @@ compare_batch(struct drm_intel_decode *ctx, const char *batch_filename) { FILE *out = NULL; void *ptr, *ref_ptr, *batch_ptr; - size_t size, ref_size, batch_size; +#ifdef HAVE_OPEN_MEMSTREAM + size_t size; +#endif + size_t ref_size, batch_size; const char *ref_suffix = "-ref.txt"; char *ref_filename;
Signed-off-by: Thomas Klausner wiz@NetBSD.org --- nouveau/bufctx.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/nouveau/bufctx.c b/nouveau/bufctx.c index 23d6f09..4f76e5d 100644 --- a/nouveau/bufctx.c +++ b/nouveau/bufctx.c @@ -44,12 +44,6 @@ struct nouveau_bufref_priv { struct nouveau_bufctx *bufctx; };
-static inline struct nouveau_bufref_priv * -nouveau_bufref(struct nouveau_bufref *bctx) -{ - return (struct nouveau_bufref_priv *)bctx; -} - struct nouveau_bufbin_priv { struct nouveau_bufref_priv *list; int relocs;
Signed-off-by: Thomas Klausner wiz@NetBSD.org --- xf86atomic.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/xf86atomic.h b/xf86atomic.h index db2f619..d0f85fc 100644 --- a/xf86atomic.h +++ b/xf86atomic.h @@ -92,6 +92,23 @@ typedef struct { uint_t atomic; } atomic_t;
#endif
+#if defined(__NetBSD__) && !defined(HAS_ATOMIC_OPS) /* NetBSD */ + +#include <sys/atomic.h> +#define HAS_ATOMIC_OPS 1 + +typedef struct { int atomic; } atomic_t; + +# define atomic_read(x) (int) ((x)->atomic) +# define atomic_set(x, val) ((x)->atomic = (val)) +# define atomic_inc(x) (atomic_inc_uint (&(x)->atomic)) +# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 0) +# define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v))) +# define atomic_dec(x, v) (atomic_add_int(&(x)->atomic, -(v))) +# define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint (&(x)->atomic, oldv, newv) + +#endif + #if ! HAS_ATOMIC_OPS #error libdrm requires atomic operations, please define them for your CPU/compiler. #endif
_nv means new value, not old value!
Signed-off-by: Thomas Klausner wiz@NetBSD.org --- xf86atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xf86atomic.h b/xf86atomic.h index d0f85fc..4e7691f 100644 --- a/xf86atomic.h +++ b/xf86atomic.h @@ -85,7 +85,7 @@ typedef struct { uint_t atomic; } atomic_t; # define atomic_read(x) (int) ((x)->atomic) # define atomic_set(x, val) ((x)->atomic = (uint_t)(val)) # define atomic_inc(x) (atomic_inc_uint (&(x)->atomic)) -# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 1) +# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 0) # define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v))) # define atomic_dec(x, v) (atomic_add_int(&(x)->atomic, -(v))) # define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint (&(x)->atomic, oldv, newv)
Hi!
I'm new here, so I don't know how to find the correct people to review this patchset. Please let me know.
Thanks, Thomas
On Sun, Jul 20, 2014 at 10:26:31AM +0200, Thomas Klausner wrote:
Signed-off-by: Thomas Klausner wiz@NetBSD.org
intel/test_decode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/intel/test_decode.c b/intel/test_decode.c index b710f34..f9127cf 100644 --- a/intel/test_decode.c +++ b/intel/test_decode.c @@ -90,7 +90,10 @@ compare_batch(struct drm_intel_decode *ctx, const char *batch_filename) { FILE *out = NULL; void *ptr, *ref_ptr, *batch_ptr;
- size_t size, ref_size, batch_size;
+#ifdef HAVE_OPEN_MEMSTREAM
- size_t size;
+#endif
- size_t ref_size, batch_size; const char *ref_suffix = "-ref.txt"; char *ref_filename;
-- 1.9.4
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re-ping. These patches are quite simple... Thomas
On Tue, Aug 05, 2014 at 11:12:54AM +0200, Thomas Klausner wrote:
Hi!
I'm new here, so I don't know how to find the correct people to review this patchset. Please let me know.
Thanks, Thomas
On Sun, Jul 20, 2014 at 10:26:31AM +0200, Thomas Klausner wrote:
Signed-off-by: Thomas Klausner wiz@NetBSD.org
intel/test_decode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/intel/test_decode.c b/intel/test_decode.c index b710f34..f9127cf 100644 --- a/intel/test_decode.c +++ b/intel/test_decode.c @@ -90,7 +90,10 @@ compare_batch(struct drm_intel_decode *ctx, const char *batch_filename) { FILE *out = NULL; void *ptr, *ref_ptr, *batch_ptr;
- size_t size, ref_size, batch_size;
+#ifdef HAVE_OPEN_MEMSTREAM
- size_t size;
+#endif
- size_t ref_size, batch_size; const char *ref_suffix = "-ref.txt"; char *ref_filename;
-- 1.9.4
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
dri-devel@lists.freedesktop.org