aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-12-09 09:09:08 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-01-13 05:19:51 -0500
commit1e676248c87b71e99a710ce1bed6949ddbb42c71 (patch)
tree43192d33783b0a8efd3839221d44efc3e2da1595 /drivers/video
parent558c73e26e8fadb4c1438af9d5277b4b3e8b5ba6 (diff)
OMAPDSS: HDMI4: Accept non-standard timings
The hdmi4 driver currently rejects any timing which is not from the CEA or VESA standards. This leads hdmi rejecting any non-standard mode. A non standard timing may not have a valid code corresponding to it. In such cases, the HDMI spec suggests to set the code to 0. Modify the driver to check if the timings fall within the range of the DISPC TV overlay manager, and remove the check for an invalid code. Add a debug print specifying the mode and code in hdmi_display_set_timing. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/hdmi4.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index e14009614338..347e455370e8 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -218,14 +218,12 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev)
218static int hdmi_display_check_timing(struct omap_dss_device *dssdev, 218static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
219 struct omap_video_timings *timings) 219 struct omap_video_timings *timings)
220{ 220{
221 struct hdmi_cm cm; 221 struct omap_dss_device *out = &hdmi.output;
222 222
223 cm = hdmi_get_code(timings); 223 if (!dispc_mgr_timings_ok(out->dispc_channel, timings))
224 if (cm.code == -1)
225 return -EINVAL; 224 return -EINVAL;
226 225
227 return 0; 226 return 0;
228
229} 227}
230 228
231static void hdmi_display_set_timing(struct omap_dss_device *dssdev, 229static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
@@ -244,8 +242,17 @@ static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
244 hdmi.cfg = *t; 242 hdmi.cfg = *t;
245 243
246 dispc_set_tv_pclk(t->timings.pixel_clock * 1000); 244 dispc_set_tv_pclk(t->timings.pixel_clock * 1000);
245 } else {
246 hdmi.cfg.timings = *timings;
247 hdmi.cfg.cm.code = 0;
248 hdmi.cfg.cm.mode = HDMI_DVI;
249
250 dispc_set_tv_pclk(timings->pixel_clock * 1000);
247 } 251 }
248 252
253 DSSDBG("using mode: %s, code %d\n", hdmi.cfg.cm.mode == HDMI_DVI ?
254 "DVI" : "HDMI", hdmi.cfg.cm.code);
255
249 mutex_unlock(&hdmi.lock); 256 mutex_unlock(&hdmi.lock);
250} 257}
251 258