summaryrefslogtreecommitdiff
path: root/lib/igt_fb.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2021-10-13 17:36:36 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2021-10-18 16:47:24 +0300
commit29c44c16d91689821b08834e1236a0ae839fa07d (patch)
tree7735f7fc6ac3de96b39665ab43f337dc570d5993 /lib/igt_fb.h
parente5426511d95bdf4a459ad3db70dfe148d1d3c8ff (diff)
lib/fb: Introduce igt_fb_modifier_name()
Provide a human readable name for modifiers. Only plugged in the i915 specific ones for now. Also provide some printf format macros for convenience. Reviewed-by: Karthik B S <karthik.b.s@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib/igt_fb.h')
-rw-r--r--lib/igt_fb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 2c2b8265..c61d9e72 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -52,6 +52,9 @@ struct buf_ops;
#define IGT_FORMAT_ARGS(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
((f) >> 16) & 0xff, ((f) >> 24) & 0xff, (f)
+#define IGT_MODIFIER_FMT "%s(0x%" PRIx64 ")"
+#define IGT_MODIFIER_ARGS(m) igt_fb_modifier_name(m), (m)
+
/**
* igt_fb_t:
* @fb_id: KMS ID of the framebuffer
@@ -217,6 +220,7 @@ int igt_fill_cts_framebuffer(uint32_t *pixmap, uint32_t video_width,
uint32_t video_height, uint32_t bitdepth, int alpha);
int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc);
+const char *igt_fb_modifier_name(uint64_t modifier);
#endif /* __IGT_FB_H__ */