Commit 029c2cfd authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Greg Kroah-Hartman

drm/omap: DMM: Check for DMM readiness after successful transaction commit


[ Upstream commit b7ea6b28 ]

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: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aeea6c64
...@@ -288,7 +288,12 @@ static int dmm_txn_commit(struct dmm_txn *txn, bool wait) ...@@ -288,7 +288,12 @@ static int dmm_txn_commit(struct dmm_txn *txn, bool wait)
msecs_to_jiffies(100))) { msecs_to_jiffies(100))) {
dev_err(dmm->dev, "timed out waiting for done\n"); dev_err(dmm->dev, "timed out waiting for done\n");
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
goto cleanup;
} }
/* Check the engine status before continue */
ret = wait_status(engine, DMM_PATSTATUS_READY |
DMM_PATSTATUS_VALID | DMM_PATSTATUS_DONE);
} }
cleanup: cleanup:
......
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