Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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>

authored by

Peter Ujfalusi and committed by
Tomi Valkeinen
b7ea6b28 b8c456d3

+5
+5
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
··· 311 311 msecs_to_jiffies(100))) { 312 312 dev_err(dmm->dev, "timed out waiting for done\n"); 313 313 ret = -ETIMEDOUT; 314 + goto cleanup; 314 315 } 316 + 317 + /* Check the engine status before continue */ 318 + ret = wait_status(engine, DMM_PATSTATUS_READY | 319 + DMM_PATSTATUS_VALID | DMM_PATSTATUS_DONE); 315 320 } 316 321 317 322 cleanup: