aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Jan <s-jan@ti.com>2011-05-03 12:18:18 +0800
committerRicardo Salveti de Araujo <ricardo.salveti@canonical.com>2011-05-16 22:42:11 -0300
commitf32697546c88f34ec4e490ce1b93fac0c902746a (patch)
treea8e65bcb13a1f8dc4d0d2e4d27bf891e5a74999e
parent9b97b02e3d7fbd45ccf13cf5577f318644dc91d3 (diff)
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>
-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 0d44f070ef3..71900d44a4f 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1104,6 +1104,7 @@ static void hdmi_enable_clocks(int enable)
static int hdmi_power_on(struct omap_dss_device *dssdev)
{
int r, code = 0;
+ int dirty = true;
struct hdmi_pll_info pll_data;
struct omap_video_timings *p;
int clkin, n, phy;
@@ -1119,8 +1120,10 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
dssdev->panel.timings.y_res);
if (!hdmi.custom_set) {
+ code = get_timings_index();
DSSDBG("Read EDID as no EDID is not set on poweron\n");
hdmi_read_edid(p);
+ dirty = get_timings_index() != code;
}
code = get_timings_index();
dssdev->panel.timings = cea_vesa_timings[code].timings;
@@ -1134,7 +1137,11 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
hdmi_wp_video_start(0);
- /* config the PLL and PHY first */
+ if (dirty) {
+ omap_dss_notify(dssdev, OMAP_DSS_SIZE_CHANGE);
+ }
+
+ /* config the PLL and PHY first */
r = hdmi_pll_program(&pll_data);
if (r) {
DSSDBG("Failed to lock PLL\n");