Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5425775pxj; Wed, 23 Jun 2021 00:37:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO33Cm++ShLdzq2HTGIg4GPQVy0RT8hs2MwdccG0n+5+zsMJAHXUQtXO5lCksW0j87pSXL X-Received: by 2002:aa7:d60a:: with SMTP id c10mr10346869edr.369.1624433840018; Wed, 23 Jun 2021 00:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624433840; cv=none; d=google.com; s=arc-20160816; b=TxwRvtZk5ifgBW4iRPZLawSwbSGkSnpj2EzNj2nh6adWO4V0jePNQHJdvTSI6YOCpN ayVYFITVD7gNjFBcjGTWUGwTiPzeD+lI4bPKsCn3oo/xIXxo5YvyH+Z1hUVLSOcirM++ 0jri8kjboCFLnD0eyLq+Bb8ZNhAanR5Olq7Tnc+kmyRd64EmZHwonfUOgI71Om8au264 9NWgm3AA/GNdj9XnG/QDVf2uVBIgcPVj9ceG9zJWsAbeI7gdNcyNVIfgmgrOB4GXK2U4 WAh0WLxhO/5rV/V7UAIhZZKClT086TspRWHAGcRGK96AYEMThHeo1LelJ+uAVj1iQ7sq a8/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=HustKGxAzfgcf6qgMI/VwrrVxna5PNCFfr1NJwyJYoo=; b=mEEyG9Lsxtwa/dnsMXnmnkvGjCBaYOfThEy8ubhgGhpJk7XTxiZAbNI5OH1jrS5ejY vjW7MBeBiEOoY4sSkaeQ/AMHIKdOkRNwlhUBSXNIXniWX7CmwofGk2v791M1PYrcyVcL Qjv7sQT/wMvnqn755Rzk8QNwEJIbuz8MgYK9O5MsAnQR+hr0JTH6ysXcexIKNXEaiNPj /fA/kmi7GeWuJymokyOPMq1VHHK88hr1zDSm7YB4UlT5TOmX1RgHQzlrzcM8FLlttYzs 3FPAn+9a/OB5zCLy7dgSW8zzGXYb/XBeniAA4n9SH6usUrfPZHOxzsoIddV4bJMeGiAD zrLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si10990155edd.323.2021.06.23.00.36.57; Wed, 23 Jun 2021 00:37:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbhFWHiR (ORCPT + 99 others); Wed, 23 Jun 2021 03:38:17 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:60972 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229978AbhFWHiQ (ORCPT ); Wed, 23 Jun 2021 03:38:16 -0400 X-UUID: 78d6776bd0214c32b4edbaf1791e1ea0-20210623 X-UUID: 78d6776bd0214c32b4edbaf1791e1ea0-20210623 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1932890681; Wed, 23 Jun 2021 15:35:55 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Jun 2021 15:35:53 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 23 Jun 2021 15:35:53 +0800 From: Moudy Ho To: Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Hans Verkuil , Jernej Skrabec CC: Maoguang Meng , Krzysztof Kozlowski , daoyuan huang , Ping-Hsun Wu , Geert Uytterhoeven , Rob Landley , Laurent Pinchart , , , , , , , , , , , , , , , , Subject: [RFC PATCH V0 02/10] media: mtk-mdp3: fix redundant process done caused KE Date: Wed, 23 Jun 2021 15:35:41 +0800 Message-ID: <20210623073549.24170-2-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210623073549.24170-1-moudy.ho@mediatek.com> References: <20210623073549.24170-1-moudy.ho@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: daoyuan huang 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 --- 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