Commit 64370994 authored by Prathyush K's avatar Prathyush K Committed by Mauro Carvalho Chehab

[media] s5p-mfc: clear 'enter_suspend' flag if suspend fails

The enter_suspend flag is set after we enter mfc suspend function but if
suspend fails after that due to any reason (like hardware timeout etc),
this flag must be cleared before returning an error. Otherwise, this
flag never gets cleared and the MFC suspend will always return an error
on subsequent tries. If clock off fails, disable hw_lock also.
Signed-off-by: default avatarPrathyush K <prathyush.k@samsung.com>
Signed-off-by: default avatarKiran AVND <avnd.kiran@samsung.com>
Signed-off-by: default avatarArun Kumar K <arun.kk@samsung.com>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 53c51492
...@@ -1284,11 +1284,17 @@ static int s5p_mfc_suspend(struct device *dev) ...@@ -1284,11 +1284,17 @@ static int s5p_mfc_suspend(struct device *dev)
m_dev->int_cond, msecs_to_jiffies(MFC_INT_TIMEOUT)); m_dev->int_cond, msecs_to_jiffies(MFC_INT_TIMEOUT));
if (ret == 0) { if (ret == 0) {
mfc_err("Waiting for hardware to finish timed out\n"); mfc_err("Waiting for hardware to finish timed out\n");
clear_bit(0, &m_dev->enter_suspend);
return -EIO; return -EIO;
} }
} }
return s5p_mfc_sleep(m_dev); ret = s5p_mfc_sleep(m_dev);
if (ret) {
clear_bit(0, &m_dev->enter_suspend);
clear_bit(0, &m_dev->hw_lock);
}
return ret;
} }
static int s5p_mfc_resume(struct device *dev) static int s5p_mfc_resume(struct device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment