summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti/sti_hdmi.h
diff options
context:
space:
mode:
authorVincent Abriou <vincent.abriou@st.com>2016-02-10 11:24:28 +0100
committerVincent Abriou <vincent.abriou@st.com>2016-02-26 10:06:20 +0100
commit5671cefbf280bb75341a783c5f6050e0fde8e83f (patch)
treeff6d0d75887e97da5c93f5bb36d7ad783e89ad63 /drivers/gpu/drm/sti/sti_hdmi.h
parente42e7bd7eebcb46bae933ce4057cca1ebbb69542 (diff)
drm/sti: add colorspace property to the HDMI connector
Make the value of the colorspace of the HDMI infoframe configurable. HDMI colorspace could be: RGB, YUV422 or YUV444 Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_hdmi.h')
-rw-r--r--drivers/gpu/drm/sti/sti_hdmi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_hdmi.h b/drivers/gpu/drm/sti/sti_hdmi.h
index 3d22390e1f3b..f621cd73b0b8 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.h
+++ b/drivers/gpu/drm/sti/sti_hdmi.h
@@ -7,6 +7,7 @@
#ifndef _STI_HDMI_H_
#define _STI_HDMI_H_
+#include <linux/hdmi.h>
#include <linux/platform_device.h>
#include <drm/drmP.h>
@@ -24,6 +25,14 @@ struct hdmi_phy_ops {
void (*stop)(struct sti_hdmi *hdmi);
};
+static const struct drm_prop_enum_list colorspace_mode_names[] = {
+ { HDMI_COLORSPACE_RGB, "rgb" },
+ { HDMI_COLORSPACE_YUV422, "yuv422" },
+ { HDMI_COLORSPACE_YUV444, "yuv444" },
+};
+
+#define DEFAULT_COLORSPACE_MODE HDMI_COLORSPACE_RGB
+
/**
* STI hdmi structure
*
@@ -44,6 +53,8 @@ struct hdmi_phy_ops {
* @wait_event: wait event
* @event_received: wait event status
* @reset: reset control of the hdmi phy
+ * @ddc_adapt: i2c ddc adapter
+ * @colorspace: current colorspace selected
*/
struct sti_hdmi {
struct device dev;
@@ -64,6 +75,7 @@ struct sti_hdmi {
bool event_received;
struct reset_control *reset;
struct i2c_adapter *ddc_adapt;
+ enum hdmi_colorspace colorspace;
};
u32 hdmi_read(struct sti_hdmi *hdmi, int offset);