diff mbox series

[RFC,V0,02/10] media: mtk-mdp3: fix redundant process done caused KE

Message ID 20210623073549.24170-2-moudy.ho@mediatek.com
State New
Headers show
Series None | expand

Commit Message

Moudy Ho June 23, 2021, 7:35 a.m. UTC
From: daoyuan huang <daoyuan.huang@mediatek.com>

In mdp_m2m_worker, there is m2m process done in error handle,
so add statement in mdp_cmdq_send for preventing redundant
process done in cmdq_pkt_flush return fail case.

Signed-off-by: daoyuan huang <daoyuan.huang@mediatek.com>
---
 drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c
index ee81a3387cf9..f8bf8fde599c 100644
--- a/drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c
+++ b/drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c
@@ -454,8 +454,10 @@  int mdp_cmdq_send(struct mdp_dev *mdp, struct mdp_cmdq_param *param)
 			mdp_dump_info(~0, 1);
 		}
 #endif
-		if (param->mdp_ctx)
-			mdp_m2m_job_finish(param->mdp_ctx);
+		if (!ret) { /* error handle in mdp_m2m_worker */
+			if (param->mdp_ctx)
+				mdp_m2m_job_finish(param->mdp_ctx);
+		}
 		cmdq_pkt_destroy(cmd.pkt);
 		for (i = 0; i < param->config->num_components; i++)
 			mdp_comp_clock_off(&mdp->pdev->dev, path.comps[i].comp);