[igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Added macro to retrieve char code of format

Kunal Joshi kunal1.joshi at intel.com
Thu Mar 5 08:25:18 UTC 2020


Added a macro to retrieve the fourcc of the pixel format.

Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
 lib/igt_fb.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 587f7a4..0383d83 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -48,6 +48,8 @@
 #define IGT_FORMAT_FMT "%c%c%c%c(0x%08x)"
 #define IGT_FORMAT_ARGS(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
 		((f) >> 16) & 0xff, ((f) >> 24) & 0xff, (f)
+#define IGT_FORMAT_ARGS_CODE(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
+		((f) >> 16) & 0xff, ((f) >> 24) & 0xff
 
 /**
  * igt_fb_t:
-- 
2.7.4



More information about the igt-dev mailing list