[Intel-gfx] [PATCH i-g-t 5/8] lib/igt_draw: Use igt_bitops
Michel Thierry
michel.thierry at intel.com
Thu Feb 9 02:18:25 UTC 2017
Moving bit operations to the new header file.
Signed-off-by: Michel Thierry <michel.thierry at intel.com>
---
lib/igt_bitops.h | 1 +
lib/igt_draw.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/igt_bitops.h b/lib/igt_bitops.h
index 11e0d8b5..331946f6 100644
--- a/lib/igt_bitops.h
+++ b/lib/igt_bitops.h
@@ -31,6 +31,7 @@
#define BIT_ULL(nr) (1ULL << (nr))
#define BITS_PER_CHAR 8
#define BITS_PER_LONG (sizeof(long)*BITS_PER_CHAR)
+#define BIT_GET(num, bit) (((num) >> (bit)) & 1)
static inline unsigned long __bit__(unsigned long nr)
{
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 2b321715..3f81161c 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -28,6 +28,7 @@
#include "drmtest.h"
#include "intel_chipset.h"
+#include "igt_bitops.h"
#include "igt_core.h"
#include "igt_fb.h"
#include "ioctl_wrappers.h"
@@ -96,8 +97,6 @@ const char *igt_draw_get_method_name(enum igt_draw_method method)
}
}
-#define BIT_GET(num, bit) ((num >> bit) & 1)
-
static int swizzle_addr(int addr, int swizzle)
{
int bit6;
--
2.11.0
More information about the Intel-gfx
mailing list