summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
diff options
context:
space:
mode:
authorJassi Brar2012-06-27 16:04:56 +0200
committerTomi Valkeinen2012-06-29 08:42:42 +0200
commit3a5383a2373fd5bc5ebdd781c8ac89ab5d0cb8a4 (patch)
treef568116f7c39ee62ab42ab745946d55b48703cd6 /drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
parentOMAPDSS: HDMI: Discard phy_tx_enabled member (diff)
downloadkernel-qcow2-linux-3a5383a2373fd5bc5ebdd781c8ac89ab5d0cb8a4.tar.gz
kernel-qcow2-linux-3a5383a2373fd5bc5ebdd781c8ac89ab5d0cb8a4.tar.xz
kernel-qcow2-linux-3a5383a2373fd5bc5ebdd781c8ac89ab5d0cb8a4.zip
OMAPDSS: HDMI: Replace spinlock with mutex in hdmi_check_hpd_state
State change of HDMI PHY could potentially take many millisecs, we can do better by protecting things in hdmi_set_phy_pwr() with a mutex rather than a spin_lock_irqsave. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c')
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
index 3fa3d98d1ae7..49b171b1f4ae 100644
--- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
@@ -235,13 +235,10 @@ void ti_hdmi_4xxx_pll_disable(struct hdmi_ip_data *ip_data)
static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data)
{
- unsigned long flags;
bool hpd;
int r;
- /* this should be in ti_hdmi_4xxx_ip private data */
- static DEFINE_SPINLOCK(phy_tx_lock);
- spin_lock_irqsave(&phy_tx_lock, flags);
+ mutex_lock(&ip_data->lock);
hpd = gpio_get_value(ip_data->hpd_gpio);
@@ -257,7 +254,7 @@ static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data)
}
err:
- spin_unlock_irqrestore(&phy_tx_lock, flags);
+ mutex_unlock(&ip_data->lock);
return r;
}