diff options
author | Sreenidhi Koti Ananda Rao <a0393742@ti.com> | 2012-02-11 00:21:31 +0530 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:56:38 +0200 |
commit | 71ad23756c823400f04c430c3e3b96eaa436d9fe (patch) | |
tree | e79e62e5d87fba7fbe1199a16f50e941a6026fb5 /drivers/video/omap2/displays | |
parent | 067065b8801f3bbf59e32a947ec0abd0e62542fd (diff) | |
download | kernel_samsung_tuna-71ad23756c823400f04c430c3e3b96eaa436d9fe.zip kernel_samsung_tuna-71ad23756c823400f04c430c3e3b96eaa436d9fe.tar.gz kernel_samsung_tuna-71ad23756c823400f04c430c3e3b96eaa436d9fe.tar.bz2 |
OMAP DSI: Fix consecutive bus unlocks for manual mode panel.
Description: In manual mode panels, a semphore is used to keep track
of display queue and release. Upon the condition of framedone timeout
error the semaphore is released once by the callback handler before exiting.
If framedone for the timed-out frame arrives after 250 msec and before
next frame queuing, it releases the semaphore second time in the callback handler.
This results in warnon assert later.
This patch puts in proper check before releasing the semaphore.
This way we prevent multiple unlocks of the bus..
Change-Id: I7db034de1a286f58a7fb9187b4ff356d7ad4731b
Signed-off-by: Sreenidhi Koti <sreenidhi@ti.com>
Signed-off-by: Sujeet Barnawal <s-baranwal@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index c44ae3f..9603413 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -223,11 +223,11 @@ struct taal_data { struct delayed_work te_timeout_work; bool use_dsi_bl; - bool cabc_broken; - unsigned cabc_mode; - bool intro_printed; + bool framedone_timeout; + + unsigned cabc_mode; struct workqueue_struct *workqueue; @@ -1413,8 +1413,27 @@ err: static void taal_framedone_cb(int err, void *data) { struct omap_dss_device *dssdev = data; + struct taal_data *td = dev_get_drvdata(&dssdev->dev); dev_dbg(&dssdev->dev, "framedone, err %d\n", err); + /* + * assert framadone timeout flag before + * unlocking the bus + */ + if (err && !dsi_bus_was_unlocked(dssdev)) + td->framedone_timeout = true; + + /* + * reset framadone timeout flag upon next + * framedone. Ensure no double un-lock from + * the erroneous framedone callback. + */ + if (td->framedone_timeout && !err) { + td->framedone_timeout = false; + if (dsi_bus_was_unlocked(dssdev)) + return; + } dsi_bus_unlock(dssdev); + return; } static irqreturn_t taal_te_isr(int irq, void *data) |