aboutsummaryrefslogtreecommitdiffstats
path: root/fbformat.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fbformat.sh')
-rwxr-xr-xfbformat.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/fbformat.sh b/fbformat.sh
new file mode 100755
index 0000000..a13b41e
--- /dev/null
+++ b/fbformat.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+awk '/define DRM.*fourcc_code.*\[.*\]/ {
+ printf " {\n";
+ printf " .name = FOURCC_NAME(%s),\n", $2;
+ printf " .fields = \"%s\",\n", $9;
+ printf " .bits = \"%s\",\n", $10;
+ printf " .bpp = ,\n";
+ printf " .fourcc = %s,\n", $2;
+ printf " .cairo = CAIRO_FORMAT_INVALID,\n", $2;
+ printf " },\n";
+}' /usr/include/drm/drm_fourcc.h