]>
Commit | Line | Data |
---|---|---|
8361784a GKH |
1 | From foo@baz Thu Mar 22 14:03:39 CET 2018 |
2 | From: Peter Ujfalusi <peter.ujfalusi@ti.com> | |
3 | Date: Fri, 29 Sep 2017 14:49:49 +0300 | |
4 | Subject: drm/omap: DMM: Check for DMM readiness after successful transaction commit | |
5 | ||
6 | From: Peter Ujfalusi <peter.ujfalusi@ti.com> | |
7 | ||
8 | ||
9 | [ Upstream commit b7ea6b286c4051e043f691781785e3c4672f014a ] | |
10 | ||
11 | Check the status of the DMM engine after it is reported that the | |
12 | transaction was completed as in rare cases the engine might not reached a | |
13 | working state. | |
14 | ||
15 | The wait_status() will print information in case the DMM is not reached the | |
16 | expected state and the dmm_txn_commit() will return with an error code to | |
17 | make sure that we are not continuing with a broken setup. | |
18 | ||
19 | Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> | |
20 | Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> | |
21 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
22 | Signed-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: |