2021-06-23 07:37:20

by Moudy Ho (何宗原)

[permalink] [raw]
Subject: [RFC PATCH V0 02/10] media: mtk-mdp3: fix redundant process done caused KE

From: daoyuan huang <[email protected]>

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 <[email protected]>
---
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

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);
--
2.18.0