summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti/sti_hdmi.h
diff options
context:
space:
mode:
authorVincent Abriou <vincent.abriou@st.com>2016-02-10 13:21:37 +0300
committerVincent Abriou <vincent.abriou@st.com>2016-02-26 12:06:20 +0300
commitffc4a6a17ff615db70e9712f3e8f74145767651b (patch)
tree150278c7d63b7b71448ac225ab9771d3f4b79125 /drivers/gpu/drm/sti/sti_hdmi.h
parent5671cefbf280bb75341a783c5f6050e0fde8e83f (diff)
downloadlinux-ffc4a6a17ff615db70e9712f3e8f74145767651b.tar.xz
drm/sti: add hdmi_mode property for HDMI connector
Configures the framer of the HDMI connection. By default starts in HDMI mode and can be swtich to DVI. 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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_hdmi.h b/drivers/gpu/drm/sti/sti_hdmi.h
index f621cd73b0b8..77edb73a56e4 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.h
+++ b/drivers/gpu/drm/sti/sti_hdmi.h
@@ -25,6 +25,19 @@ struct hdmi_phy_ops {
void (*stop)(struct sti_hdmi *hdmi);
};
+/* values for the framing mode property */
+enum sti_hdmi_modes {
+ HDMI_MODE_HDMI,
+ HDMI_MODE_DVI,
+};
+
+static const struct drm_prop_enum_list hdmi_mode_names[] = {
+ { HDMI_MODE_HDMI, "hdmi" },
+ { HDMI_MODE_DVI, "dvi" },
+};
+
+#define DEFAULT_HDMI_MODE HDMI_MODE_HDMI
+
static const struct drm_prop_enum_list colorspace_mode_names[] = {
{ HDMI_COLORSPACE_RGB, "rgb" },
{ HDMI_COLORSPACE_YUV422, "yuv422" },
@@ -55,6 +68,7 @@ static const struct drm_prop_enum_list colorspace_mode_names[] = {
* @reset: reset control of the hdmi phy
* @ddc_adapt: i2c ddc adapter
* @colorspace: current colorspace selected
+ * @hdmi_mode: select framing for HDMI or DVI
*/
struct sti_hdmi {
struct device dev;
@@ -76,6 +90,7 @@ struct sti_hdmi {
struct reset_control *reset;
struct i2c_adapter *ddc_adapt;
enum hdmi_colorspace colorspace;
+ enum sti_hdmi_modes hdmi_mode;
};
u32 hdmi_read(struct sti_hdmi *hdmi, int offset);