aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2017-09-29 14:49:49 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-12-01 15:03:59 +0200
commit6fae37b8a05e58b6103198e89d12dc0d6d472d92 (patch)
treef26c5a8dc617d1b8cc972fcbd781d37d67123abe
parent0b378e011c50aaa545463e00db3bfc4cfd05d1fb (diff)
downloadlinux-6fae37b8a05e58b6103198e89d12dc0d6d472d92.tar.gz
drm/omap: DMM: Check for DMM readiness after successful transaction commitHEADmaster
Check the status of the DMM engine after it is reported that the transaction was completed as in rare cases the engine might not reached a working state. The wait_status() will print information in case the DMM is not reached the expected state and the dmm_txn_commit() will return with an error code to make sure that we are not continuing with a broken setup. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/gpu/drm/omapdrm/omap_dmm_tiler.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 09d09734117e8..3bd24a254bd01 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -311,7 +311,12 @@ static int dmm_txn_commit(struct dmm_txn *txn, bool wait)
msecs_to_jiffies(100))) {
dev_err(dmm->dev, "timed out waiting for done\n");
ret = -ETIMEDOUT;
+ goto cleanup;
}
+
+ /* Check the engine status before continue */
+ ret = wait_status(engine, DMM_PATSTATUS_READY |
+ DMM_PATSTATUS_VALID | DMM_PATSTATUS_DONE);
}
cleanup: