diff options
author | Sebastien Jan <s-jan@ti.com> | 2011-06-22 20:40:18 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-06-22 20:40:18 +0100 |
commit | e5b4b5646cf90ab81af9ee8cb2b4a4c0dc451b66 (patch) | |
tree | ec7b863fc73fcb7d72b989e9bd02c16f34e9be57 | |
parent | 7210016019b63a36c867551dbf7724e8dcacde00 (diff) |
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>
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index dd68aac0601..d6b31394e55 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -1111,6 +1111,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; unsigned long phy; @@ -1126,8 +1127,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; @@ -1139,7 +1142,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"); |