Import the hdmi_colorspace and hdmi_colorimetry enumerations from Linux'
include/linux/hdmi.h. These describe the AVI InfoFrame colorspace and
colorimetry fields defined by the HDMI specification and are identical
across HDMI transmitters, so keep them in a generic header rather than
duplicating them in each driver.

Signed-off-by: Julien Stephan <[email protected]>
---
 include/linux/hdmi.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
new file mode 100644
index 00000000000..6e4828eb192
--- /dev/null
+++ b/include/linux/hdmi.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Partial port of Linux' include/linux/hdmi.h, carrying the pieces of the
+ * HDMI specification that are common to all HDMI transmitters.
+ *
+ * Copyright (C) 2012 Avionic Design GmbH
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __LINUX_HDMI_H_
+#define __LINUX_HDMI_H_
+
+enum hdmi_colorspace {
+       HDMI_COLORSPACE_RGB,
+       HDMI_COLORSPACE_YUV422,
+       HDMI_COLORSPACE_YUV444,
+       HDMI_COLORSPACE_YUV420,
+       HDMI_COLORSPACE_RESERVED4,
+       HDMI_COLORSPACE_RESERVED5,
+       HDMI_COLORSPACE_RESERVED6,
+       HDMI_COLORSPACE_IDO_DEFINED,
+};
+
+enum hdmi_colorimetry {
+       HDMI_COLORIMETRY_NONE,
+       HDMI_COLORIMETRY_ITU_601,
+       HDMI_COLORIMETRY_ITU_709,
+       HDMI_COLORIMETRY_EXTENDED,
+};
+
+#endif /* __LINUX_HDMI_H_ */

-- 
2.55.0

Reply via email to