summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef0e093)
raw | patch | inline | side by side (parent: ef0e093)
author | Misael Lopez Cruz <misael.lopez@ti.com> | |
Fri, 1 Nov 2013 19:29:11 +0000 (14:29 -0500) | ||
committer | Dandawate Saket <dsaket@ti.com> | |
Wed, 6 Nov 2013 23:03:49 +0000 (15:03 -0800) |
Ported from k3.4, commit 0cb2e907 from Priyesh Bisla <a0271372@ti.com>.
Change-Id: I65a44b7c869c276902edc6b04f1d5519e9a66fbc
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Change-Id: I65a44b7c869c276902edc6b04f1d5519e9a66fbc
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
drivers/video/omap2/dss/hdmi_panel.c | patch | blob | history | |
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | patch | blob | history |
index bae1beb726071a063369c27eef8fa1f3fdc79a77..59edd1099a5aa409ab8337b1f401c61337457976 100644 (file)
}
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
- /*
- * TODO: notify audio users that the display was disabled. For
- * now, disable audio locally to not break our audio state
- * machine.
- */
- hdmi_panel_audio_disable(dssdev);
- dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
#ifdef CONFIG_USE_FB_MODE_DB
dssdev->output->manager->blank(dssdev->output->manager, true);
#endif
index 43edf680bbffc1d1fbfe2951f531baf17eecd6d6..71b8cdfcb645639dea0634311373c8e28fdfe09d 100644 (file)
return 0;
}
+static int hdmi_wait_for_audio_stop(struct hdmi_ip_data *ip_data)
+{
+ int count = 0;
+
+ /* wait for audio to stop before powering off the phy */
+ while (REG_GET(hdmi_wp_base(ip_data),
+ HDMI_WP_AUDIO_CTRL, 31, 31) != 0) {
+ msleep(100);
+ if (count++ > 100) {
+ pr_err("Audio is not turned off "
+ "even after 10 seconds\n");
+ ti_hdmi_4xxx_wp_audio_disable(ip_data);
+ return -ETIMEDOUT;
+ }
+ }
+ return 0;
+}
+
/* PHY_PWR_CMD */
static int hdmi_set_phy_pwr(struct hdmi_ip_data *ip_data, enum hdmi_phy_pwr val)
{
@@ -165,6 +183,9 @@ static int hdmi_set_phy_pwr(struct hdmi_ip_data *ip_data, enum hdmi_phy_pwr val)
if (REG_GET(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, 5, 4) == val)
return 0;
+ if ((val == HDMI_PHYPWRCMD_OFF) && !(ip_data->set_mode))
+ hdmi_wait_for_audio_stop(ip_data);
+
/* Command for power control of HDMI PHY */
REG_FLD_MOD(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, val, 7, 6);