From patchwork Mon Oct 24 02:04:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WGlubGVpIExlZSAo5p2O5piV56OKKQ==?= X-Patchwork-Id: 568 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp211150wru; Sun, 23 Oct 2022 19:09:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7xJ0zyHMS9LYUwShLbSnrNtqhR0lUYzF9xQLvxsrfcmNvVIR16JvUIYhKL0tvR3iz5g+/I X-Received: by 2002:a62:1a8d:0:b0:544:1309:19f3 with SMTP id a135-20020a621a8d000000b00544130919f3mr31093308pfa.37.1666577363458; Sun, 23 Oct 2022 19:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666577363; cv=none; d=google.com; s=arc-20160816; b=JBKr0+kNyymHuSdHC8WSpRAwmqbWurj5mXR2LeWjsRaQ4uUxV1W5EkPJoRbqFXiv5d ty6xizwgSxuzTdHaWF4mUE6VZ8nFGQvuLozUhYC/DPsUPl0iqkOVsho1jc7L5UJHyA5s 49ohS1CWLaN9+5G64mjzCXBErw+zmCYHf6pSgNgGndxw54lJfR9AHNTBqp2+Pi/WtadS N9zA36vCMDp/hdOF3leeCtU3+0pSmSju+Yc4tFyFVFI8/br11DUPUjcdivFsBfC72DcR xgd8fCKJiq86OD17IAx6ezVp6QQoyAI3r/NLiav5jd/g+NnZNs71jqz5pqiFaAEBZ2Jx x4iQ== 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=mqyrONuC+EXxhyAr1nd2evYoabOhakvcEv+wAgzZrnw=; b=bqZMq/jKufz4b/GnoGFIOjE3dDpnH81KZWK/PmzjSsZGjoTG5EWGVUaaPv4b4AbTyy YpdLpWVhR/bRAJkZO/+dDb3xFUZUIdLF5aJn6/1TL7KLM32gNlPGAJhAenMfqtyoNcMJ G/2qbwUQ3rlfQ+eeNa8KMuCIDtJVa8Zq92X3QyAnTe0PxwZZmuKIDH6FjsiI6nWaU3Da pFOipUqCuDjC5KW9kb4aLdACLg4FBXXINbubha9mjVgIJHM+kQCygrQyXtwDSY5/aqFk 7mWezlTo6diMUYnE+O6+npy3qy8J7bKwj+0VeT6/9FD9WWjfZ/GtaZRJ68uxdQeFZnoq m7nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=JBo2RwED; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b136-20020a621b8e000000b0055214e179d5si31751100pfb.63.2022.10.23.19.09.10; Sun, 23 Oct 2022 19:09:23 -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=JBo2RwED; 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 S229980AbiJXCFX (ORCPT + 99 others); Sun, 23 Oct 2022 22:05:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbiJXCFU (ORCPT ); Sun, 23 Oct 2022 22:05:20 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 085A23684C for ; Sun, 23 Oct 2022 19:05:12 -0700 (PDT) X-UUID: ce9610f6201d442cb5e66ff4fb32eb12-20221024 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=mqyrONuC+EXxhyAr1nd2evYoabOhakvcEv+wAgzZrnw=; b=JBo2RwED5dyspr/hYgMRrajfZCmy291kt9mh4mTa4ow6vJD+P/RQqSacCuP1RymjUTBqbrPe7dru539fmKVWllHyzrBiryt37gBOx5JhRbhrMT+iN+aMeZJ/9aPetzIMO0LSm6lH9JYE60e4lZMK3qjuH1hTqsFpOGglfve9DWQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.12,REQID:6e336be1-441d-471e-9f45-caad61db7cc8,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.12,REQID:6e336be1-441d-471e-9f45-caad61db7cc8,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:62cd327,CLOUDID:0621d96c-89d3-4bfa-baad-dc632a24bca3,B ulkID:221024100505LDDE3LKK,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: ce9610f6201d442cb5e66ff4fb32eb12-20221024 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1211678878; Mon, 24 Oct 2022 10:05:03 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Mon, 24 Oct 2022 10:05:01 +0800 Received: from mszsdaap41.gcn.mediatek.inc (10.16.6.141) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Mon, 24 Oct 2022 10:05:01 +0800 From: To: , , , , , , , , CC: , , , , , Xinlei Lee Subject: [PATCH v13,0/3] Add dpi output format control for MT8186 Date: Mon, 24 Oct 2022 10:04:56 +0800 Message-ID: <1666577099-3859-1-git-send-email-xinlei.lee@mediatek.com> X-Mailer: git-send-email 2.6.4 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747533025356497247?= X-GMAIL-MSGID: =?utf-8?q?1747533025356497247?= From: Xinlei Lee Base on the branch of linus/master v6.1 rc1. Change since v12: 1. Add MT8186_ prefix to variables added in mt8186-mmsys.h file. Change since v11: 1. Rebase on v6.1-rc1. Change nothing. 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(-)