diff options
author | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-23 16:00:33 +0200 |
---|---|---|
committer | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-23 16:00:33 +0200 |
commit | ba8ce2ed8f562b1397834abe23ada742d03f0d31 (patch) | |
tree | f9cb39601a2daea91034aa4571247c814acbf208 | |
parent | 18669840726b070fb743ac0e800877140b228f31 (diff) | |
download | kernel_samsung_espresso10-ba8ce2ed8f562b1397834abe23ada742d03f0d31.tar.gz kernel_samsung_espresso10-ba8ce2ed8f562b1397834abe23ada742d03f0d31.tar.bz2 kernel_samsung_espresso10-ba8ce2ed8f562b1397834abe23ada742d03f0d31.zip |
fix merge fail
-rw-r--r-- | drivers/video/hdmi_ti_4xxx_ip.c | 20 | ||||
-rw-r--r-- | include/video/hdmi_ti_4xxx_ip.h | 9 |
2 files changed, 21 insertions, 8 deletions
diff --git a/drivers/video/hdmi_ti_4xxx_ip.c b/drivers/video/hdmi_ti_4xxx_ip.c index 3d84c10fa6b..960d5a1ebdc 100644 --- a/drivers/video/hdmi_ti_4xxx_ip.c +++ b/drivers/video/hdmi_ti_4xxx_ip.c @@ -276,7 +276,7 @@ static int hdmi_wait_for_audio_stop(struct hdmi_ip_data *ip_data) while (REG_GET(hdmi_wp_base(ip_data), HDMI_WP_AUDIO_CTRL, 31, 31) != 0) { msleep(100); - if (count++ > 15) { + if (count++ > 25) { pr_err("Audio is not turned off " "even after 10 seconds\n"); return -ETIMEDOUT; @@ -287,10 +287,14 @@ static int hdmi_wait_for_audio_stop(struct hdmi_ip_data *ip_data) /* PHY_PWR_CMD */ static int hdmi_set_phy_pwr(struct hdmi_ip_data *ip_data, - enum hdmi_phy_pwr val, bool set_mode) + enum hdmi_phy_pwr val, + enum hdmi_pwrchg_reasons reason) { /* FIXME audio driver should have already stopped, but not yet */ - if (val == HDMI_PHYPWRCMD_OFF && !set_mode) + bool wait_for_audio_stop = !(reason & + (HDMI_PWRCHG_MODE_CHANGE | HDMI_PWRCHG_RESYNC)); + + if (val == HDMI_PHYPWRCMD_OFF && wait_for_audio_stop) hdmi_wait_for_audio_stop(ip_data); /* Command for power control of HDMI PHY */ @@ -369,11 +373,12 @@ int hdmi_ti_4xxx_phy_init(struct hdmi_ip_data *ip_data) { u16 r = 0; - r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_LDOON, false); + r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_LDOON, + HDMI_PWRCHG_DEFAULT); if (r) return r; - r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON, false); + r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON, HDMI_PWRCHG_DEFAULT); if (r) return r; @@ -401,13 +406,14 @@ int hdmi_ti_4xxx_phy_init(struct hdmi_ip_data *ip_data) } EXPORT_SYMBOL(hdmi_ti_4xxx_phy_init); -void hdmi_ti_4xxx_phy_off(struct hdmi_ip_data *ip_data, bool set_mode) +void hdmi_ti_4xxx_phy_off(struct hdmi_ip_data *ip_data, + enum hdmi_pwrchg_reasons reason) { #ifdef CONFIG_OMAP_HDMI_AUDIO_WA if (hdmi_lib_stop_acr_wa()) pr_err("HDMI WA may be in bad state\n"); #endif - hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF, set_mode); + hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF, reason); } EXPORT_SYMBOL(hdmi_ti_4xxx_phy_off); diff --git a/include/video/hdmi_ti_4xxx_ip.h b/include/video/hdmi_ti_4xxx_ip.h index 8aa3aff2001..3e32bb52094 100644 --- a/include/video/hdmi_ti_4xxx_ip.h +++ b/include/video/hdmi_ti_4xxx_ip.h @@ -32,6 +32,12 @@ enum hdmi_pll_pwr { HDMI_PLLPWRCMD_BOTHON_NOPHYCLK = 3 }; +enum hdmi_pwrchg_reasons { + HDMI_PWRCHG_DEFAULT = 0, + HDMI_PWRCHG_MODE_CHANGE = (1L << 0), + HDMI_PWRCHG_RESYNC = (1L << 1), +}; + enum hdmi_core_hdmi_dvi { HDMI_DVI = 0, HDMI_HDMI = 1 @@ -362,7 +368,8 @@ enum hdmi_aksv_err { }; int hdmi_ti_4xxx_phy_init(struct hdmi_ip_data *ip_data); -void hdmi_ti_4xxx_phy_off(struct hdmi_ip_data *ip_data, bool set_mode); +void hdmi_ti_4xxx_phy_off(struct hdmi_ip_data *ip_data, + enum hdmi_pwrchg_reasons reason); int read_ti_4xxx_edid(struct hdmi_ip_data *ip_data, u8 *pedid, u16 max_length); void hdmi_ti_4xxx_wp_video_start(struct hdmi_ip_data *ip_data, bool start); int hdmi_ti_4xxx_pll_program(struct hdmi_ip_data *ip_data, |