summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/hdmi_panel.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-08-08 16:50:42 +0530
committerArchit Taneja <archit@ti.com>2012-08-15 15:42:43 +0530
commit7849398fa28c21dad24292b838b059a862f99f16 (patch)
tree214847fc07fa918b3d269f17c1c9133ae9698e86 /drivers/video/omap2/dss/hdmi_panel.c
parent55cd63acf6855cd45a183fdfca6d22450b8d1d47 (diff)
downloadtalos-obmc-linux-7849398fa28c21dad24292b838b059a862f99f16.tar.gz
talos-obmc-linux-7849398fa28c21dad24292b838b059a862f99f16.zip
OMAPDSS: HDMI: Use our own omap_video_timings field when setting interface timings
The hdmi driver currently updates only the 'code' member of hdmi_config when the op omapdss_hdmi_display_set_timing() is called by the hdmi panel driver. The 'timing' field of hdmi_config is updated only when hdmi_power_on is called. It makes more sense to configure the whole hdmi_config field in the set_timing op called by the panel driver. This way, we don't need to call both functions to ensure that our hdmi_config is configured correctly. Also, we don't need to calculate hdmi_config during hdmi_power_on, or rely on the omap_video_timings in the panel's omap_dss_device struct. The default timings of the hdmi panel are represented in a cleaner form. Since the hdmi output is now configured by it's own copy of timings (in hdmi.ip_data.cfg), the panel driver needs to set it to a valid value before enabling hdmi output. We now call omapdss_hdmi_set_timing() before enabling hdmi output, this is done to atleast have the hdmi output configured to the panel's default timings if the DSS user didn't call panel driver's set_timings() op explicitly. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi_panel.c')
-rw-r--r--drivers/video/omap2/dss/hdmi_panel.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c
index e10844faadf9..2feb2cdfb60f 100644
--- a/drivers/video/omap2/dss/hdmi_panel.c
+++ b/drivers/video/omap2/dss/hdmi_panel.c
@@ -41,17 +41,32 @@ static struct {
static int hdmi_panel_probe(struct omap_dss_device *dssdev)
{
+ /* Initialize default timings to VGA in DVI mode */
+ const struct omap_video_timings default_timings = {
+ .x_res = 640,
+ .y_res = 480,
+ .pixel_clock = 25175,
+ .hsw = 96,
+ .hfp = 16,
+ .hbp = 48,
+ .vsw = 2,
+ .vfp = 11,
+ .vbp = 31,
+
+ .vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
+ .hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
+
+ .interlace = false,
+ };
+
DSSDBG("ENTER hdmi_panel_probe\n");
- dssdev->panel.timings = (struct omap_video_timings)
- { 640, 480, 25175, 96, 16, 48, 2, 11, 31,
- OMAPDSS_SIG_ACTIVE_LOW, OMAPDSS_SIG_ACTIVE_LOW,
- false,
- };
+ dssdev->panel.timings = default_timings;
DSSDBG("hdmi_panel_probe x_res= %d y_res = %d\n",
dssdev->panel.timings.x_res,
dssdev->panel.timings.y_res);
+
return 0;
}
@@ -228,6 +243,8 @@ static int hdmi_panel_enable(struct omap_dss_device *dssdev)
goto err;
}
+ omapdss_hdmi_display_set_timing(dssdev, &dssdev->panel.timings);
+
r = omapdss_hdmi_display_enable(dssdev);
if (r) {
DSSERR("failed to power on\n");
@@ -336,8 +353,8 @@ static void hdmi_set_timings(struct omap_dss_device *dssdev,
*/
hdmi_panel_audio_disable(dssdev);
+ omapdss_hdmi_display_set_timing(dssdev, timings);
dssdev->panel.timings = *timings;
- omapdss_hdmi_display_set_timing(dssdev);
mutex_unlock(&hdmi.lock);
}
OpenPOWER on IntegriCloud