diff options
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 25 | ||||
-rwxr-xr-x | drivers/video/omap2/dss/dsi.c | 9 | ||||
-rw-r--r-- | include/video/omapdss.h | 1 |
3 files changed, 32 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) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index dde0fb5..b7fe130 100755 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -416,6 +416,15 @@ void dsi_bus_unlock(struct omap_dss_device *dssdev) } EXPORT_SYMBOL(dsi_bus_unlock); +bool dsi_bus_was_unlocked(struct omap_dss_device *dssdev) +{ + struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); + + return dsi->bus_lock.count == 1; +} +EXPORT_SYMBOL(dsi_bus_was_unlocked); + static bool dsi_bus_is_locked(struct platform_device *dsidev) { struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 3be0bc3..043c85f 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -246,6 +246,7 @@ void rfbi_bus_unlock(void); /* DSI */ void dsi_bus_lock(struct omap_dss_device *dssdev); void dsi_bus_unlock(struct omap_dss_device *dssdev); +bool dsi_bus_was_unlocked(struct omap_dss_device *dssdev); int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, int len); int dsi_vc_dcs_write_0(struct omap_dss_device *dssdev, int channel, |