diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-03-12 14:53:32 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-03-13 17:26:49 +0100 |
commit | c46051337b972f8b5a302afb6f603df06fea527d (patch) | |
tree | 762614007f7808c1ced32cfbb48c86dc5f015220 /lib/igt_fb.h | |
parent | b25e06d6ddf2e42044cd9c93b613cbc7339a8c33 (diff) |
lib/igt_fb: better format printing
Steal if from kms_plane.c and put it into igt_fb.h
Also tiny bikeshed to remove the space, so it fits more tidily into
the usual name1=value1, name2=value2 style printing.
v2: Rebase
v3: It better compile :-/
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'lib/igt_fb.h')
-rw-r--r-- | lib/igt_fb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h index 7667579b..ba22bd66 100644 --- a/lib/igt_fb.h +++ b/lib/igt_fb.h @@ -44,6 +44,10 @@ */ #define IGT_FORMAT_FLOAT fourcc_code('I', 'G', 'F', 'x') +#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) + /** * igt_fb_t: * @fb_id: KMS ID of the framebuffer |