summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2011-02-07 15:18:22 -0800
committerErik Gilling <konkers@android.com>2011-02-07 15:18:27 -0800
commite51ab3740df4c2880507045f999c4bde3563c6a2 (patch)
tree204fca54b8034b9199e41d617fe3e7c5ac26524f /drivers
parenta979d00287bcd3297bd13a59534073e6faa570c9 (diff)
parent719f267754403c3e2d255e257ae95e79e68ab27f (diff)
Merge branch linux-tegra-2.6.36 into android-tegra-2.6.36
Change-Id: I6fcdbcd0eb7103ac580deb94faf79959a5818ba1
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbmon.c7
-rw-r--r--drivers/video/tegra/dc/hdmi.c24
2 files changed, 23 insertions, 8 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 0841e6b27e5c..18dad1dd9fb7 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -1018,6 +1018,13 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
num++;
}
}
+ } else if (tag == 0x3) {
+ if (len >= 3) {
+ u32 ieee_reg = block[0] | (block[1] << 8) |
+ (block[2] << 16);
+ if (ieee_reg == 0x000c03)
+ specs->misc |= FB_MISC_HDMI;
+ }
}
block += len;
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index dd2a51195880..3e274ecb73de 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -60,6 +60,8 @@ struct tegra_dc_hdmi_data {
spinlock_t suspend_lock;
bool suspended;
bool hpd_pending;
+
+ bool dvi;
};
const struct fb_videomode tegra_dc_hdmi_supported_modes[] = {
@@ -456,6 +458,9 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc)
dc->out->h_size = specs.max_x * 1000;
dc->out->v_size = specs.max_y * 1000;
+
+ hdmi->dvi = !(specs.misc & FB_MISC_HDMI);
+
tegra_fb_update_monspecs(dc->fb, &specs, tegra_dc_hdmi_mode_filter);
switch_set_state(&hdmi->hpd_switch, 1);
dev_info(&dc->ndev->dev, "display detected\n");
@@ -881,7 +886,6 @@ static void tegra_dc_hdmi_enable(struct tegra_dc *dc)
int rekey;
int err;
unsigned long val;
- bool dvi = false;
/* enbale power, clocks, resets, etc. */
@@ -942,9 +946,13 @@ static void tegra_dc_hdmi_enable(struct tegra_dc *dc)
SOR_REFCLK_DIV_FRAC(dispclk_div_8_2),
HDMI_NV_PDISP_SOR_REFCLK);
- err = tegra_dc_hdmi_setup_audio(dc);
- if (err < 0)
- dvi = true;
+
+ if (!hdmi->dvi) {
+ err = tegra_dc_hdmi_setup_audio(dc);
+
+ if (err < 0)
+ hdmi->dvi = true;
+ }
rekey = HDMI_REKEY_DEFAULT;
val = HDMI_CTRL_REKEY(rekey);
@@ -952,11 +960,11 @@ static void tegra_dc_hdmi_enable(struct tegra_dc *dc)
dc->mode.h_back_porch +
dc->mode.h_front_porch -
rekey - 18) / 32);
- if (!dvi)
+ if (!hdmi->dvi)
val |= HDMI_CTRL_ENABLE;
tegra_hdmi_writel(hdmi, val, HDMI_NV_PDISP_HDMI_CTRL);
- if (dvi)
+ if (hdmi->dvi)
tegra_hdmi_writel(hdmi, 0x0,
HDMI_NV_PDISP_HDMI_GENERIC_CTRL);
else
@@ -964,8 +972,8 @@ static void tegra_dc_hdmi_enable(struct tegra_dc *dc)
HDMI_NV_PDISP_HDMI_GENERIC_CTRL);
- tegra_dc_hdmi_setup_avi_infoframe(dc, dvi);
- tegra_dc_hdmi_setup_audio_infoframe(dc, dvi);
+ tegra_dc_hdmi_setup_avi_infoframe(dc, hdmi->dvi);
+ tegra_dc_hdmi_setup_audio_infoframe(dc, hdmi->dvi);
/* TMDS CONFIG */
pll0 = 0x200033f;