aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2018-10-30 12:33:17 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-10-30 12:33:17 -0700
commitbae31bc8347996de6a74fcbd5d2af197d9752d55 (patch)
tree3e638303c392f6c225a62df9b26dcffc540caf97
parent031df9dfeac89e855023b4807cfea259531d1cca (diff)
parent7c9e403dfc0d9516782e2dade7bc7cad2058d4b4 (diff)
downloadstrace-bae31bc8347996de6a74fcbd5d2af197d9752d55.tar.gz
xlat: workaround V4L2_CID_USER_IMX_BASE Linux kernel ABI breakage am: 0bafd7fc4b
am: 7c9e403dfc Change-Id: I8a41843216d8b9027b940e8c1d7c11e432d5ccde
-rw-r--r--xlat/v4l2_control_id_bases.in17
1 files changed, 16 insertions, 1 deletions
diff --git a/xlat/v4l2_control_id_bases.in b/xlat/v4l2_control_id_bases.in
index a0359be9..f3fd9255 100644
--- a/xlat/v4l2_control_id_bases.in
+++ b/xlat/v4l2_control_id_bases.in
@@ -2,7 +2,22 @@ V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
V4L2_CID_USER_MEYE_BASE (V4L2_CID_BASE + 0x1000)
V4L2_CID_USER_BTTV_BASE (V4L2_CID_BASE + 0x1010)
V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050)
-V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x1090)
+#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE
+/*
+ * Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48
+ * has changed the value of V4L2_CID_USER_IMX_BASE constant introduced
+ * by commit v4.13-rc1~141^2~121 because the old value was already used
+ * by V4L2_CID_USER_MAX217X_BASE.
+ * This is of course an ABI breakage that affects Linux kernels starting
+ * with 4.13 and up to 4.18, as well as their LTS derivatives.
+ * Since the imx driver didn't provide any public control ID definitions,
+ * it looks like the best way to handle this situation is to pretend that
+ * the old value of V4L2_CID_USER_IMX_BASE didn't exist.
+ */
+# undef V4L2_CID_USER_IMX_BASE
+#endif
+V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x10b0)
V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100)