Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp571239rwb; Fri, 13 Jan 2023 01:12:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXsHOgnB0LvaTaVqSCJsphgBtiZ3xwbG3x0QiFBXAmGLR0msNp2uVhV8jH5KHk0RuNpZwkav X-Received: by 2002:a05:6402:1842:b0:499:bec8:4d with SMTP id v2-20020a056402184200b00499bec8004dmr14705154edy.32.1673601143478; Fri, 13 Jan 2023 01:12:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673601143; cv=none; d=google.com; s=arc-20160816; b=sP4LDVjrd9QaIN8BLqXo1Dlo5jZwlSgz3NpU5MYkXqisrz4hi8HUgNts1OetO/Onb/ f288T9ScGwRt33e3gyYLWg6X61qxotf0fhWYoFa7Z2ArxsP60x07rKyRkF3u6sgvmd2i hRCLR/lViPBhZy22W30mBVZyGl7pTh7wm+9nzLSFXQoptIBvD9asJLxE9W+01J7/t8N3 h2NFRfRq2Ph/qgRHDLDxRNVJI4/nq49BCYzf3rP7yTj0XgIX4145EIDrNVDBzDcwkOgR CQQmsBuCOZK8lcWZ9bar5IjUrUMdLs7WRWsCkGPpdpmKzdavEBQhD+mnkHQBQQVeiYXP SDQg== 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=SfUBszp4dO84vq2nYKyY0IHmqBqG0KnML6VZd+caUoqtTswOp/SkIG9UnHbfY+XxmB AWzvnpijEInxkpJWPzZCYpRKhKeZfZB015KK7IpX1QhNYVRXPpIcm/ISrDhj/UYl7vUn NEN0G3TUmnJUoqWPNvpx0zyztAJIsZApQHWOrC1bGEsEHbURPA9vw7xztu1wt053A+L2 TmWYDVFff+Mb474S1We+15yY2RrHeeRqqGqNNF7/49L7Ux2rjWTo0XTX5FSyTxVqqoIx ZiiD56CVO892rGxOpnhDAz63qAeezbtxWQ/Aw++XUGsA+8yXOSI9zstW7FMJtVQGtG1P 2YCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=XDVTnyhI; 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 z3-20020a05640235c300b0048e9a2f7678si22432258edc.292.2023.01.13.01.12.10; Fri, 13 Jan 2023 01:12:23 -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=XDVTnyhI; 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 S233650AbjAMJDs (ORCPT + 51 others); Fri, 13 Jan 2023 04:03:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236680AbjAMJDb (ORCPT ); Fri, 13 Jan 2023 04:03:31 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD5275F92C; Fri, 13 Jan 2023 01:03:30 -0800 (PST) X-UUID: 22eea1b8932111eda06fc9ecc4dadd91-20230113 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=XDVTnyhIxtXvjh+IQhS3uwwBcxEvW9979NeB1dnex407cN/AlzPj2VdoI6FVrHZwXNt09EBs8ONWZHjXgxyt/t6jl2FwNHNVgWR0iyRtk/t56ZxtIjL0Y8cCl3gfrEZmHQ3uFyfWTbbbea8Ku2Boz4/0oGltvB4RK9Yx3MB8VoI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:cb0ca602-5b58-43ec-82af-a5706f03cbb2,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.17,REQID:cb0ca602-5b58-43ec-82af-a5706f03cbb2,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:543e81c,CLOUDID:f7979054-dd49-462e-a4be-2143a3ddc739,B ulkID:2301131703280JYSY1HV,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I:0,OSA:0 X-CID-APTURL: Status:success,Category:nil,Trust:0,Unknown:0,Malicious:0 X-CID-BVR: 0 X-UUID: 22eea1b8932111eda06fc9ecc4dadd91-20230113 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2092236139; Fri, 13 Jan 2023 17:03:24 +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; Fri, 13 Jan 2023 17:03:23 +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; Fri, 13 Jan 2023 17:03:23 +0800 From: Moudy Ho To: Mauro Carvalho Chehab , Matthias Brugger , Hans Verkuil CC: Chun-Kuang Hu , , , , , Moudy Ho Subject: [PATCH v3 09/13] media: platform: mtk-mdp3: add the blend of component in MUTEX MOD Date: Fri, 13 Jan 2023 17:03:17 +0800 Message-ID: <20230113090321.25128-10-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230113090321.25128-1-moudy.ho@mediatek.com> References: <20230113090321.25128-1-moudy.ho@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham 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