Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2635479rwb; Sun, 15 Jan 2023 19:31:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXtDHbg0TDJAiA22lW+vThJ9tzmUdNkfQvNJVB8X/b/C1FX2WjBBc5FgiwH9wiady1H4GgC+ X-Received: by 2002:aa7:d80a:0:b0:49e:1e:14ee with SMTP id v10-20020aa7d80a000000b0049e001e14eemr4975307edq.34.1673839890230; Sun, 15 Jan 2023 19:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673839890; cv=none; d=google.com; s=arc-20160816; b=KUMa9RJxtzY0ApdOD9y2n1KnXo3GQTJYOhChHtcnWoXmeVT+KDteLr+sFPATEnr1iE nMK13JuoxoLOlNsftPWhcd8FNfn3XUYcixxoXYUayius8GchS4REA19W82/7Gf2dX3uu tiegwciKzclggiPDZ7sffMxRmTtm4KWhrQQOnwwoU2geMG6K91yirCB6Ip4wQxJLfu3m Z1UOImyzYfYuphEk/NQj5F/GlrK/NbhAS8rhoceWMw+Nmz2gKg2iGEGPdpi05ncvHUoe w4fvMTU8v034eiV6Pt5PgY3px1dvydhoqcK5w5Ymrpduy3ly74FhP+15mpDq1blW0nd5 YOVA== 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:dkim-signature; bh=vZgR6XrcQdfRcjoVZjERFvas8vDe9zTI0Gm4QdyJhqc=; b=zJcaQ1+W2pTHyT/Fywt100mqeJBX/CMZvIJWUI1c73/g6z82+IDRCaybQqPqMds5qP rSazsWx8ZoUsoVGLrWE10Wb/fm3xlAu6Zkn7l4NwcvB7CtTRSYKMpoR50NmzdzzhVdJk RcpBTXfNBCUpyORSiFnmwWT+xOUtup4eauat/LsmtZRHjwKWOHaTig0xpjQ/5OgeFBQM ZzvTNEHeM/Tk6rq5KO91om2jffukADkvpYUIvla+lfBcwHT3YbKi79VGz159w677cH7Z N2mPQgzpKVE41ncgZVEcYYOMtQv+FpgtszZeT78o5IiyH6NIkcsOec0Yq8kn/5cntoiR o7Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OdsrWDtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eg24-20020a056402289800b00475a6378758si25705810edb.554.2023.01.15.19.31.16; Sun, 15 Jan 2023 19:31:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OdsrWDtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231887AbjAPDWQ (ORCPT + 54 others); Sun, 15 Jan 2023 22:22:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231809AbjAPDWE (ORCPT ); Sun, 15 Jan 2023 22:22:04 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37E3C7AA6; Sun, 15 Jan 2023 19:21:59 -0800 (PST) X-UUID: eaecb61e954c11ed945fc101203acc17-20230116 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=vZgR6XrcQdfRcjoVZjERFvas8vDe9zTI0Gm4QdyJhqc=; b=OdsrWDtZQgZ89d3z9NNQus9mdQJOlABssnNzfciRH+c1veEM/V/QI2xOMT9dkzV4RbVfvF/SgUkAA3NjfJwCQl9yg9PGCCQemsf91BV5azPRaW3rrermVia75RHI75L+0GeUij7cjs0R7FFHwlndhsJ2VmMxLcnmTGtrSThlvEE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:d61169c4-754b-4c3a-b980-63e0bec086ea,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:543e81c,CLOUDID:3ff6558c-8530-4eff-9f77-222cf6e2895b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: eaecb61e954c11ed945fc101203acc17-20230116 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1614832561; Mon, 16 Jan 2023 11:21:50 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Mon, 16 Jan 2023 11:21:49 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Mon, 16 Jan 2023 11:21:49 +0800 From: Moudy Ho To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Matthias Brugger CC: , , , , , , Moudy Ho Subject: [RESEND v3 09/13] media: platform: mtk-mdp3: add the blend of component in MUTEX MOD Date: Mon, 16 Jan 2023 11:21:43 +0800 Message-ID: <20230116032147.23607-10-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230116032147.23607-1-moudy.ho@mediatek.com> References: <20230116032147.23607-1-moudy.ho@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,RDNS_NONE, SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In further chips, some components will cooperate to achieve advanced functions, and these MODs need to be set at the same time. Signed-off-by: Moudy Ho --- drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 6 ++++++ drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c index 72b5dc4cb3b1..f21dfce9098e 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c @@ -122,6 +122,7 @@ static int mdp_path_subfrm_require(const struct mdp_path *path, /* Set mutex mod */ for (index = 0; index < num_comp; index++) { s32 inner_id = MDP_COMP_NONE; + const struct mdp_comp_blend *b; if (CFG_CHECK(MT8183, p_id)) inner_id = CFG_GET(MT8183, path->config, components[index].type); @@ -133,6 +134,11 @@ static int mdp_path_subfrm_require(const struct mdp_path *path, id = ctx->comp->public_id; mtk_mutex_write_mod(mutex, data->mdp_mutex_table_idx[id], false); + b = &data->comp_data[id].blend; + if (b->mod_aid) + mtk_mutex_write_mod(mutex, + data->mdp_mutex_table_idx[b->mod_id], + false); } mtk_mutex_write_sof(mutex, MUTEX_SOF_IDX_SINGLE_MODE); diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h index d9442679cf53..c91d87359b17 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h @@ -201,9 +201,15 @@ struct mdp_comp_info { u32 dts_reg_ofst; }; +struct mdp_comp_blend { + bool mod_aid; + enum mtk_mdp_comp_id mod_id; +}; + struct mdp_comp_data { struct mdp_comp_match match; struct mdp_comp_info info; + struct mdp_comp_blend blend; }; struct mdp_comp_ops; -- 2.18.0