From patchwork Tue May 31 05:52:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TW91ZHkgSG8gKOS9leWul+WOnyk=?= X-Patchwork-Id: 12865102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B70CDC433FE for ; Tue, 31 May 2022 06:03:05 +0000 (UTC) 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: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:In-Reply-To:References: List-Owner; bh=2zpiLVUOmwn0yoMKIZ+/UcdFwhz9q+vc0XTinRL3ChA=; b=Pk9SOrvXQ2ztFr GK7+XBBhIIYnXJBKPqC+FDOYWP5MopH42b0YYijDESTQOx2kczaeuwcbspKNiGyIRg9dWEQ+pOVGa xHjK/qFldx3IjBifhiirCDaaFms+mh/kISX4nYD2Hvbp5tzOKiU1PMoKJuJZ5uN0BefSRl5GrCmsd 8WApZMJcWT8F1tNAZ57iAB8548XbpPjkR/0gBAay9jsOH28qM/L1iRT/AElyLcSGEbT9A7hroc6Oq sJQmlTNAWfX4uloT73r7DczPOkE+j/fLR8gN8u6qieZTz9JkWeLXLYl58U1dXAI4Aag1rYs8ikn7N grPzKtHxq7Ymg35JEVRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvuy4-009TUR-1d; Tue, 31 May 2022 06:03:00 +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 1nvuxd-009TKQ-81; Tue, 31 May 2022 06:02:36 +0000 X-UUID: a3b95f9cf19a4ee7a6c2a3ed41fe4acb-20220530 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:9615e528-c3f6-4a1d-b574-48ae245f744c,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACT ION:release,TS:-5 X-CID-META: VersionHash:2a19b09,CLOUDID:1b315814-f88c-475e-badf-d9ee54230b8f,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:0,BEC:nil X-UUID: a3b95f9cf19a4ee7a6c2a3ed41fe4acb-20220530 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1873756109; Mon, 30 May 2022 23:02:29 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 30 May 2022 22:52:27 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 May 2022 13:52:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Tue, 31 May 2022 13:52:25 +0800 From: Moudy Ho To: Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , "Krzysztof Kozlowski" , Hans Verkuil CC: Chun-Kuang Hu , Rob Landley , Laurent Pinchart , , , , , , Alexandre Courbot , , , , , Benjamin Gaignard , AngeloGioacchino Del Regno , daoyuan huang , Ping-Hsun Wu , , , , , , , , , Subject: [PATCH v19 0/6] Add mutex support for MDP Date: Tue, 31 May 2022 13:52:18 +0800 Message-ID: <20220531055224.19280-1-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_230233_360133_0612A651 X-CRM114-Status: GOOD ( 17.37 ) 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 Change since V18: - Rebase on v5.19-rc1 - Remove unnecessary functions: "mtk_mutex_set_mod", "mtk_mutex_clear_mod", "mtk_mutex_set_sof" and "mtk_mutex_clear_sof", and export "mtk_mutex_write_mod" and "mtk_mutex_write_sof" to set MOD/SOF directly. - Remove unnecessary SOF tables and add new enumerations of SOF instead. - Adjust the error checking for CMDQ operations. Change since V17: - Rebase on v5.18-rc6 - Fix undeclared identifier causing compilation to fail. Change since V16: - Rebase on v5.18-rc4 - Fix misplacement of definition "CONFIG_MTK_CMDQ" which caused compilation error when CMD is not supported. Change since V15: - Rebase on linux-next. - As suggested by Angelo, split common parts into independent functions to make functions more concise. - Based on safety considerations, increase the returned error number and message to facilitate error handling. Change since V14: - Rebase on linux-next. - Add new SOF and MOD table for general interface to integrate the requirement of different modules. - Remove unnecessary MOD structure. - By Rob Herring's suggestion, revise the description of "mediatek,gce-client-reg" in MUTEX dt-bindings. - Delete the redundant definition of MTK_MUTEX_ENABLE and modify corresponding function. Change since V13: - Rebase on linux-next tag:next-20220316 - Adjust the MUTEX MOD table structure and corresponding functions. - Adjust the definition style about 8183 MDP MOD. - Remove redundant definitions and enumerations. - Adjust the CMDQ operation in MUTEX to be backward compatible Change since V12: - Rebase on linux-next - Remove ISP related settings in MMSYS - Removed CMDQ operations previously used by MDP in MMSYS - Move mediatek MUTEX dt-binding path - Add additional property in MUTEX for CMDQ operations Change since V11: - Rebase on v5.17-rc6. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux.git/commit/?h=v5.17-next/soc&id=5f9b5b757e44de47ebdc116c14b90e3cc8bc7acb [2]: https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux.git/commit/?h=v5.17-next/soc&id=831785f0e5b919c29e1bc5f9a74e9ebd38289e24 [3]: https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux.git/commit/?h=v5.17-next/soc&id=15f1768365aed810826a61fef4a744437aa5b426 Change since v10: - For some ISP application scenarios, such as preview and recording at the same time. The routing table needs to be discarded, and the calculation result on the SCP side is used to write a suitable mux setting for 1 input and 2 output. - Adjust the GCE client register parsing method to avoid redundant warning logs. Change since v9: - Add API for MDP getting mutex mod. Hi, This patch splits mmsys and mutex settings from Media Data Path 3 (MDP3), and original mailling list list below: https://patchwork.kernel.org/project/linux-mediatek/cover/20211201095031.31606-1-moudy.ho@mediatek.com/ Corresponding settings and interfaces are added for MDP operation in the mmsys and mutex drivers, which increases the independence of the modules Moudy Ho (6): soc: mediatek: mutex: add common interface for modules setting soc: mediatek: mutex: add 8183 MUTEX MOD settings for MDP dt-bindings: soc: mediatek: move out common module from display folder dt-bindings: soc: mediatek: add gce-client-reg for MUTEX dts: arm64: mt8183: add GCE client property for Mediatek MUTEX soc: mediatek: mutex: add functions that operate registers by CMDQ .../mediatek/mediatek,mutex.yaml | 14 +- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 + drivers/soc/mediatek/mtk-mutex.c | 125 +++++++++++++++++- include/linux/soc/mediatek/mtk-mutex.h | 28 ++++ 4 files changed, 166 insertions(+), 2 deletions(-) rename Documentation/devicetree/bindings/{display => soc}/mediatek/mediatek,mutex.yaml (81%)