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

Kunal Joshi
2020-03-05T10:31:49Z

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

Signed-off-by: Kunal Joshi <kunal1.joshi@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