diff options
author | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-04-03 08:36:55 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:58:16 -0400 |
commit | 7c5bbe10a8e9a736127c1f0414b4c2d7610a649c (patch) | |
tree | 8aee773dfd580c4565b412642dbdd089a87ce310 | |
parent | 13b4ee658c7f826809cccbbd30903391ba84beb4 (diff) |
ENGR00306875-2 video: mxc_hdmi: Set hdmi cable state a bit earilier
During hdmi hotplug test, there's a possibility that X-server unblanks
the frame buffer while HDMI-audio just gets the signal to start playback.
Then audio would get an unblanked state right before the playback and
bypassed the DMA enabling code. So this issue is caused by the race
between unblank and set_cable_state().
This patch sets the hdmi cable state a bit earilier so as to let audio
play first. If unblank happens later, the hdmi core and hdmi audio would
be robust enough to handle that case as long as it's not racing with the
other parts.
Acked-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 2917061c498a97e3c3b99ac616b6f3202f8a0499)
-rw-r--r-- | drivers/video/mxc/mxc_hdmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/mxc/mxc_hdmi.c b/drivers/video/mxc/mxc_hdmi.c index d0916b440c68..bcd031df5b9d 100644 --- a/drivers/video/mxc/mxc_hdmi.c +++ b/drivers/video/mxc/mxc_hdmi.c | |||
@@ -2006,13 +2006,13 @@ static void hotplug_worker(struct work_struct *work) | |||
2006 | val &= ~HDMI_PHY_HPD; | 2006 | val &= ~HDMI_PHY_HPD; |
2007 | hdmi_writeb(val, HDMI_PHY_POL0); | 2007 | hdmi_writeb(val, HDMI_PHY_POL0); |
2008 | 2008 | ||
2009 | hdmi_set_cable_state(1); | ||
2010 | |||
2009 | sprintf(event_string, "EVENT=plugin"); | 2011 | sprintf(event_string, "EVENT=plugin"); |
2010 | kobject_uevent_env(&hdmi->pdev->dev.kobj, KOBJ_CHANGE, envp); | 2012 | kobject_uevent_env(&hdmi->pdev->dev.kobj, KOBJ_CHANGE, envp); |
2011 | #ifdef CONFIG_MXC_HDMI_CEC | 2013 | #ifdef CONFIG_MXC_HDMI_CEC |
2012 | mxc_hdmi_cec_handle(0x80); | 2014 | mxc_hdmi_cec_handle(0x80); |
2013 | #endif | 2015 | #endif |
2014 | hdmi_set_cable_state(1); | ||
2015 | |||
2016 | } else if (!(phy_int_pol & HDMI_PHY_HPD)) { | 2016 | } else if (!(phy_int_pol & HDMI_PHY_HPD)) { |
2017 | /* Plugout event */ | 2017 | /* Plugout event */ |
2018 | dev_dbg(&hdmi->pdev->dev, "EVENT=plugout\n"); | 2018 | dev_dbg(&hdmi->pdev->dev, "EVENT=plugout\n"); |