aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorSebastien Jan <s-jan@ti.com>2011-07-24 15:59:08 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:18:10 -0400
commitbc3148b9ca04378567e01f485c16914c3f9255c4 (patch)
tree9f75dba76608dabc083dec351ac10877dba6c112 /drivers/video
parent74be906ee4a811fc43b19ce291b6ae0c29b8b3c0 (diff)
Subject: [PATCH 11/21] Subject: [PATCH 11/19] OMAP4: DSS: add generic notifier mechanism
A callback can be registered by the dssdev client in order to be notified of resolution changes, for example an external monitor that is hot-plugged. Multiple clients can now register for notification from one dssdev, and the notification mechanism can be extended in the future to add other events. This is a port of Rob Clark's <rob@ti.com> original patch. Signed-off-by: Sebastien Jan <s-jan@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/hdmi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index f36e9880327..5cddf2e9996 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1182,6 +1182,7 @@ static void hdmi_enable_clocks(int enable)
1182static int hdmi_power_on(struct omap_dss_device *dssdev) 1182static int hdmi_power_on(struct omap_dss_device *dssdev)
1183{ 1183{
1184 int r, code = 0; 1184 int r, code = 0;
1185 int dirty = true;
1185 struct hdmi_pll_info pll_data; 1186 struct hdmi_pll_info pll_data;
1186 struct omap_video_timings *p; 1187 struct omap_video_timings *p;
1187 unsigned long phy; 1188 unsigned long phy;
@@ -1197,8 +1198,10 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
1197 dssdev->panel.timings.y_res); 1198 dssdev->panel.timings.y_res);
1198 1199
1199 if (!hdmi.custom_set) { 1200 if (!hdmi.custom_set) {
1201 code = get_timings_index();
1200 DSSDBG("Read EDID as no EDID is not set on poweron\n"); 1202 DSSDBG("Read EDID as no EDID is not set on poweron\n");
1201 hdmi_read_edid(p); 1203 hdmi_read_edid(p);
1204 dirty = get_timings_index() != code;
1202 } 1205 }
1203 code = get_timings_index(); 1206 code = get_timings_index();
1204 dssdev->panel.timings = cea_vesa_timings[code].timings; 1207 dssdev->panel.timings = cea_vesa_timings[code].timings;
@@ -1210,7 +1213,11 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
1210 1213
1211 hdmi_wp_video_start(0); 1214 hdmi_wp_video_start(0);
1212 1215
1213 /* config the PLL and PHY first */ 1216 if (dirty) {
1217 omap_dss_notify(dssdev, OMAP_DSS_SIZE_CHANGE);
1218 }
1219
1220 /* config the PLL and PHY first */
1214 r = hdmi_pll_program(&pll_data); 1221 r = hdmi_pll_program(&pll_data);
1215 if (r) { 1222 if (r) {
1216 DSSDBG("Failed to lock PLL\n"); 1223 DSSDBG("Failed to lock PLL\n");