]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.15.13/drm-omap-dmm-check-for-dmm-readiness-after-successful-transaction-commit.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.15.13 / drm-omap-dmm-check-for-dmm-readiness-after-successful-transaction-commit.patch
CommitLineData
8361784a
GKH
1From foo@baz Thu Mar 22 14:03:39 CET 2018
2From: Peter Ujfalusi <peter.ujfalusi@ti.com>
3Date: Fri, 29 Sep 2017 14:49:49 +0300
4Subject: drm/omap: DMM: Check for DMM readiness after successful transaction commit
5
6From: Peter Ujfalusi <peter.ujfalusi@ti.com>
7
8
9[ Upstream commit b7ea6b286c4051e043f691781785e3c4672f014a ]
10
11Check the status of the DMM engine after it is reported that the
12transaction was completed as in rare cases the engine might not reached a
13working state.
14
15The wait_status() will print information in case the DMM is not reached the
16expected state and the dmm_txn_commit() will return with an error code to
17make sure that we are not continuing with a broken setup.
18
19Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
20Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
21Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 5 +++++
25 1 file changed, 5 insertions(+)
26
27--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
28+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
29@@ -298,7 +298,12 @@ static int dmm_txn_commit(struct dmm_txn
30 msecs_to_jiffies(100))) {
31 dev_err(dmm->dev, "timed out waiting for done\n");
32 ret = -ETIMEDOUT;
33+ goto cleanup;
34 }
35+
36+ /* Check the engine status before continue */
37+ ret = wait_status(engine, DMM_PATSTATUS_READY |
38+ DMM_PATSTATUS_VALID | DMM_PATSTATUS_DONE);
39 }
40
41 cleanup: