From patchwork Wed Jun 23 07:35:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moudy Ho X-Patchwork-Id: 12339161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1379CC4743C for ; Wed, 23 Jun 2021 07:36:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD04A611AC for ; Wed, 23 Jun 2021 07:36:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD04A611AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P9OUznl6EoH2nAPjAdQOljMfP+iKeII72cs0ZxrZ8ts=; b=knFmXTzaTLfbg/ SeOzOAX6bklipxeRY91yivVEr9/4ht/n9Q8CrtVQXTNlaweO692dNXuD3fWlveEp9dmbKdOdgIkKK FHfjWN4drs2cl/n2ycg3rRxT65XMRRjh6gOC6PmskrR0s4yJjy6Spqezvjewkq98xy3i4hiog2ID5 dI3nuBD2vEVQ1IKPQ/VnMVwjKBImpgnUnvpz6HqL8ZxC9UJVYGVNU8dWqTjdJa2xawb+7V58KKmWN NXFZU/AMDYXmgyQKa0M1fLxZ7nF1Z0+Txsic/v6o7n5d1Txdm4exd3bgpx1qjP8bBhOc/9OfLTKrA oxH3wkwfaAekZAmBSZHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvxR9-009nQ3-Od; Wed, 23 Jun 2021 07:36:39 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvxQd-009n9U-J9; Wed, 23 Jun 2021 07:36:08 +0000 X-UUID: 59ac08bb93d84bf5aed019c68b672c9d-20210623 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=p1S3LX8a6LxKQ/aDlxNgmDalY2ekRiHgPEnyGmzS3RY=; b=W0un8F6GtdaFmXT+SGKaOO5UW3QgZ7D9iBGGM038eQZO7I86buIoQGAvSwdlhlokttwFJ9+CKt2X0aBEqVHlOrMXxUwrl3ARU81C718bC8V8q2jaNLqPHeG0Wt3tk+FpG8yIerUIeBXr/I2CEdv40X0I3UYiEdkfEWO3jb8Kyi8=; X-UUID: 59ac08bb93d84bf5aed019c68b672c9d-20210623 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 828151017; Wed, 23 Jun 2021 00:35:56 -0700 Received: from MTKMBS02N2.mediatek.inc (172.21.101.101) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Jun 2021 00:35:55 -0700 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 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210623_003607_725716_CD5614F1 X-CRM114-Status: GOOD ( 12.95 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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);