Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp461688rwb; Mon, 26 Sep 2022 01:02:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4BS5z7e3K5vm485WF1T6k8eOZP2eIr2cci8INYQLX6utQA4KzX17hNX6miOu/jsvXh7JWy X-Received: by 2002:a17:90b:4a85:b0:202:4f3f:1f65 with SMTP id lp5-20020a17090b4a8500b002024f3f1f65mr23124091pjb.241.1664179335473; Mon, 26 Sep 2022 01:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664179335; cv=none; d=google.com; s=arc-20160816; b=k2U6UxXomv/gllA+8CkbE9t7bwaYpQs0PTC9RkSo+zepkFiH9WfBUmHcFnhMf2JWkX LsVqMq2FArfrTqaOgvlimHl31/bAbbnbDGAFipIuLsKzaBrg87frPDgFr1SFpYMBG4oV LfuwtkWev5Htw0hmrLeInbRgmItsmNOCcFNx0qwDyrXqza6fNLzO9tfs3fngJuctgmLL 6iXZKEsZEldPkvGgDhQ4BM6R7LPJMm82gZOox4J5QvL9NO9gF6l0XLvSTo4C8pXtSJON FcvZWv41t8DdD118l5qMhzgJO5A4jWvzrxgqsqQ6X71HGN9svy6l7EeUkmnEmkYeLp90 tl1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=rapjfEd/0fAeylvQDoAQRYCFWy0PBtBkE73tULqyTRg=; b=DtuuJmq7yCgFaskGouYRUFlY5JDmHGqd2w63chHCPkZnTov6r+39RvLyIqKkI3H+ni vFz6wTxtBKb77uCXbhcqOZAgXO1BZfRs1BAo8Y5w0PqlZ2tsZONdMV3gRHU7ZpF94pGd mXFvDQYoXozwUF7y+se5j+2PlteWo7ihFeM4bG8RTcQu+V5JGNhou4PRV7s6XrNergXi xjWdXY+ODZBjpWHfO/SeipE3YXk3+SLMKlGaGMT+X2+ZtsauhL+BVzV4QOv3nswSzj3q kl0ONRbtDhaBTOiB2J5wNugM53m7Put8I/ty/r7ish3x8GuiwhMqFWPuCIqKOjIvA+zw Bsrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hZb20YDM; 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 a9-20020a17090a854900b002024f3f1f8bsi9373922pjw.70.2022.09.26.01.02.03; Mon, 26 Sep 2022 01:02:15 -0700 (PDT) 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=hZb20YDM; 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 S233506AbiIZHnX (ORCPT + 99 others); Mon, 26 Sep 2022 03:43:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233290AbiIZHnW (ORCPT ); Mon, 26 Sep 2022 03:43:22 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5970F2A271 for ; Mon, 26 Sep 2022 00:43:19 -0700 (PDT) X-UUID: 65b34ffee1ef48f287a66a07b0581513-20220926 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=rapjfEd/0fAeylvQDoAQRYCFWy0PBtBkE73tULqyTRg=; b=hZb20YDM+fjSh9t11Sxc6aOXq3LO2vwADpv5BXz6ykoKwHfDBfTeLSdegGXjrfMEINg3CvkfvFcwsH6UCkh736d2Y/FUdb/BEXjRNxJi+zu6BsuDU6qkP88zfeSTVkxJif0BR/PWbi6vamofycuE5YsQS3Y4gY0952Q9SorL/bs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:a1eb8932-90af-454b-9d54-14a3130ef499,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:39a5ff1,CLOUDID:4fad11a3-dc04-435c-b19b-71e131a5fc35,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 65b34ffee1ef48f287a66a07b0581513-20220926 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 1323352504; Mon, 26 Sep 2022 15:43:14 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 26 Sep 2022 15:43:12 +0800 Received: from mszsdaap41.gcn.mediatek.inc (10.16.6.141) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 26 Sep 2022 15:43:12 +0800 From: To: , , , , , , , CC: , , , , , , Xinlei Lee Subject: [PATCH v11,0/3] Add dpi output format control for MT8186 Date: Mon, 26 Sep 2022 15:43:08 +0800 Message-ID: <1664178191-27964-1-git-send-email-xinlei.lee@mediatek.com> X-Mailer: git-send-email 2.6.4 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 From: Xinlei Lee From: Xinlei Lee Base on the branch of ck-linux-next/mediatek-drm-fixes. Change since v10: 1. Modify patch title and add review tag. Change since v9: 1. Modify the location of the mmsys_dev member variable. Change since v8: 1. Modified the title and some description information. Changes since v7: 1. This series is based on the following patch: [1] soc: mediatek: Add mmsys func to adapt to dpi output for MT8186 https://patchwork.kernel.org/project/linux-mediatek/patch/1663161662-1598-2-git-send-email-xinlei.lee@mediatek.com/ 2. Modify the DPI_FORMAT_MASK macro definition to GENMASK(1, 0); 3. Add all settings to mtk_mmsys_ddp_dpi_fmt_config; 4. Modify the commit title to Add mt8186 dpi compatibles and platform data. Changes since v6: 1. Different from other ICs, when mt8186 DPI changes the output format, the mmsys_base+400 register needs to be set to be valid at the same time. In this series, all the situations that mmsys need to be set up are perfected (not necessarily used in practice). 2. Put the value that controls the mmsys function in mtk-mmsys.h. 3. Encountered the sink ic switched between dual edge and single edge, perfected setting and clearing mmsys bit operations in mtk_dpi.c. Changes since v5: 1. Separate the patch that adds edge_cfg_in_mmsys from the patch that adds mt8186 dpi support. 2. Move the mmsys register definition to mmsys driver. Changes since v4: 1. This series of cancellations is based on the following patches: [1] Add MediaTek SoC(vdosys1) support for mt8195 https://patchwork.kernel.org/project/linux-mediatek/cover/20220711075245.10492-1-nancy.lin@mediatek.com/ [2] Add MediaTek SoC DRM (vdosys1) support for mt8195 https://patchwork.kernel.org/project/linux-mediatek/cover/20220804072827.22383-1-nancy.lin@mediatek.com/ 2. Added mtk_mmsys_update_bits function in mtk-mmsys.c; 3. MMSYS 0x400 register is modified to MT8186_MMSYS_DPI_OUTPUT_FORMAT; 4. Fix formatting issues. Changes since v3: 1. Fix formatting issues; 2. Modify the edge output control name & description; 3. Fix the threading problem. Changes since v2: 1. Modify key nouns in the description; 2. Add the label of jitao to Co-developed-by; 3. Macro definition address lowercase problem and function naming; 4. Add missing a description of this property in the mtk_dpi_conf. Change since v1: 1. Modify mt8186 compatiable location. 2. Modify MT8186_DPI_OUTPUT_FORMAT name. When MT8186 outputs dpi signal, it is necessary to add dual edge output format control in mmsys. Xinlei Lee (3): soc: mediatek: Add all settings to mtk_mmsys_ddp_dpi_fmt_config func drm: mediatek: Set dpi format in mmsys drm: mediatek: Add mt8186 dpi compatibles and platform data drivers/gpu/drm/mediatek/mtk_dpi.c | 32 ++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ drivers/soc/mediatek/mt8186-mmsys.h | 8 ++++--- drivers/soc/mediatek/mtk-mmsys.c | 27 +++++++++++++++++----- include/linux/soc/mediatek/mtk-mmsys.h | 7 ++++++ 5 files changed, 67 insertions(+), 9 deletions(-) -- 2.18.0