Blame SOURCES/0069-xlat-update-v4l2_format_description_flags.patch

86f512
From b37e0c801e4c4e448906c0c4dc1191492ff50605 Mon Sep 17 00:00:00 2001
86f512
From: Eugene Syromyatnikov <evgsyr@gmail.com>
86f512
Date: Sun, 20 Oct 2019 19:05:16 +0200
86f512
Subject: [PATCH 69/76] xlat: update v4l2_format_description_flags
86f512
86f512
* xlat/v4l2_format_description_flags.in (V4L2_FMT_FLAG_COMPRESSED,
86f512
V4L2_FMT_FLAG_EMULATED): Add fallback definitions.
86f512
(V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM): New constant, introduced by Linux
86f512
commit v5.4-rc1~145^2~69.
86f512
(V4L2_FMT_FLAG_DYN_RESOLUTION): New constant, introduced by Linux commit
86f512
v5.4-rc1~145^2~68.
86f512
---
86f512
 xlat/v4l2_format_description_flags.in | 6 ++++--
86f512
 1 file changed, 4 insertions(+), 2 deletions(-)
86f512
86f512
Index: strace-5.1/xlat/v4l2_format_description_flags.in
86f512
===================================================================
86f512
--- strace-5.1.orig/xlat/v4l2_format_description_flags.in	2014-11-04 16:27:31.000000000 +0100
86f512
+++ strace-5.1/xlat/v4l2_format_description_flags.in	2020-01-29 12:38:57.160012970 +0100
86f512
@@ -1,2 +1,4 @@
86f512
-V4L2_FMT_FLAG_COMPRESSED
86f512
-V4L2_FMT_FLAG_EMULATED
86f512
+V4L2_FMT_FLAG_COMPRESSED		0x0001
86f512
+V4L2_FMT_FLAG_EMULATED			0x0002
86f512
+V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM	0x0004
86f512
+V4L2_FMT_FLAG_DYN_RESOLUTION		0x0008
86f512
Index: strace-5.1/xlat/v4l2_format_description_flags.h
86f512
===================================================================
86f512
--- strace-5.1.orig/xlat/v4l2_format_description_flags.h	2019-05-22 15:08:31.000000000 +0200
86f512
+++ strace-5.1/xlat/v4l2_format_description_flags.h	2020-01-29 12:39:06.599926319 +0100
86f512
@@ -3,6 +3,34 @@
86f512
 #include "gcc_compat.h"
86f512
 #include "static_assert.h"
86f512
 
86f512
+#if defined(V4L2_FMT_FLAG_COMPRESSED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED) && HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED)
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((V4L2_FMT_FLAG_COMPRESSED) == (0x0001), "V4L2_FMT_FLAG_COMPRESSED != 0x0001");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define V4L2_FMT_FLAG_COMPRESSED 0x0001
86f512
+#endif
86f512
+#if defined(V4L2_FMT_FLAG_EMULATED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_EMULATED) && HAVE_DECL_V4L2_FMT_FLAG_EMULATED)
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((V4L2_FMT_FLAG_EMULATED) == (0x0002), "V4L2_FMT_FLAG_EMULATED != 0x0002");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define V4L2_FMT_FLAG_EMULATED 0x0002
86f512
+#endif
86f512
+#if defined(V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM) || (defined(HAVE_DECL_V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM) && HAVE_DECL_V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM)
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM) == (0x0004), "V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM != 0x0004");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004
86f512
+#endif
86f512
+#if defined(V4L2_FMT_FLAG_DYN_RESOLUTION) || (defined(HAVE_DECL_V4L2_FMT_FLAG_DYN_RESOLUTION) && HAVE_DECL_V4L2_FMT_FLAG_DYN_RESOLUTION)
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((V4L2_FMT_FLAG_DYN_RESOLUTION) == (0x0008), "V4L2_FMT_FLAG_DYN_RESOLUTION != 0x0008");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008
86f512
+#endif
86f512
 
86f512
 #ifndef XLAT_MACROS_ONLY
86f512
 
86f512
@@ -16,12 +44,10 @@
86f512
 static
86f512
 #  endif
86f512
 const struct xlat v4l2_format_description_flags[] = {
86f512
-#if defined(V4L2_FMT_FLAG_COMPRESSED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED) && HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED)
86f512
-  XLAT(V4L2_FMT_FLAG_COMPRESSED),
86f512
-#endif
86f512
-#if defined(V4L2_FMT_FLAG_EMULATED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_EMULATED) && HAVE_DECL_V4L2_FMT_FLAG_EMULATED)
86f512
-  XLAT(V4L2_FMT_FLAG_EMULATED),
86f512
-#endif
86f512
+ XLAT(V4L2_FMT_FLAG_COMPRESSED),
86f512
+ XLAT(V4L2_FMT_FLAG_EMULATED),
86f512
+ XLAT(V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM),
86f512
+ XLAT(V4L2_FMT_FLAG_DYN_RESOLUTION),
86f512
  XLAT_END
86f512
 };
86f512