intel: Only define variable when it's used.
PATCH 1/4 intel: Only define variable when it's used.
Signed-off-by Thomas Klausner <[email protected]>
--- intel/test_decode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
intel/test_decode.c +4 -1
@@ -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;
Signature · 1 line
1.9.4
PATCH 2/4 nouveau: Remove unused static function.
Signed-off-by Thomas Klausner <[email protected]>
--- nouveau/bufctx.c | 6 ------ 1 file changed, 6 deletions(-)
nouveau/bufctx.c +0 -6
@@ -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;
Signature · 1 line
1.9.4
PATCH 3/4 Add NetBSD atomic ops support.
In reply to Thomas KlausnerSigned-off-by Thomas Klausner <[email protected]>
--- xf86atomic.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
xf86atomic.h +17 -0
@@ -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
Signature · 1 line
1.9.4
PATCH 4/4 Fix libdrm's atomic_dec_and_test on Solaris.
In reply to Thomas Klausner_nv means new value, not old value!
Signed-off-by Thomas Klausner <[email protected]>
--- xf86atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xf86atomic.h +1 -1
@@ -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)
Signature · 1 line
1.9.4
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
Quoted 29 lines · Thomas Klausner
Signed-off-by Thomas Klausner <[email protected]>--- intel/test_decode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)intel/test_decode.c +4
-1@@ -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;Signature · 6 lines
1.9.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re-ping.
These patches are quite simple...
Thomas
Quoted 43 lines · Thomas Klausner
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,
ThomasQuoted 29 lines · Thomas Klausner
Signed-off-by Thomas Klausner <[email protected]>--- intel/test_decode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)intel/test_decode.c +4
-1@@ -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;Signature · 6 lines
1.9.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel