Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp768773rwb; Thu, 22 Sep 2022 06:15:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5wPDW/NygkpmtZSfTMLPKiOUEjFDglBwKl7H/14ueMp1ObLGAOof4NIwZX4okbi/oT77OO X-Received: by 2002:a17:907:272a:b0:77c:d7df:c9da with SMTP id d10-20020a170907272a00b0077cd7dfc9damr2902683ejl.332.1663852553451; Thu, 22 Sep 2022 06:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663852553; cv=none; d=google.com; s=arc-20160816; b=yQSb2T6r8nXNEvjYnbYWwmDFYeXkoEN50dgHDXuoolCyc7E38JWKzSpcB7pZYQZJ3e zyTyqrlK2rMpy7M7KC972kJcJF+fYu3x2S686vkO6U5mT+KmvqDXqYCGAsXuPxbAMSY8 g6ij6d/zQTyvnLA0yCDWIip8r0BiwAbyEyec0vhIily3IlDmrWVRBNY8L2DV0iFLgfwE 6nbqdp5soyNKJIEY0qW9q2Na8JUmqiZmT8S5mAW3ouv7BLPcMF/pGTUBeVgpjTB9cyuM awdSEjdLRTwRi8eixOha08axm3I8rJa0ajIri99HMmgjTYz3ozQmgOizpPq7LhvXb/r/ J4EQ== 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=Xkw5w0gJRMEd4Xb0J/hlS/e3274+GxMEBDRNr69F+Ys=; b=VSZS5AFHNHWBWX3z9xWhgtuIqRLn0t3uXHX/CVHQQEjcMJkeMIVthJmf9gAgn1XQ7H NFrPDpLQN6IJ6H4a5TPYQIXKDNpLvLElYnVh9tzdQcYBqTGDXeQ5H3P82jXrmoTTFM1L 2jDgP3HNmNDpfcEwq1UN4FIzxgd/KSAwsNvwxYjw80G13/rqf/VwsOBfokcBdFWURrdB j8MDCQ9YAdW6ADGHp42SdkG+nwaU7UKpdGOxJLhd7dBoFNstkY9AFIKLU03NEQA/sx3H KmhldD0vlEYUGt4lHeuUrgoDOlBB8IePMrupBeq4Lano5xYFzitvvV7WqpqXb448Ffd6 xLNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="fhBkp/JG"; 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 x24-20020a170906b09800b0077087c45329si4345645ejy.968.2022.09.22.06.15.23; Thu, 22 Sep 2022 06:15:53 -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="fhBkp/JG"; 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 S230362AbiIVMpS (ORCPT + 99 others); Thu, 22 Sep 2022 08:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbiIVMpP (ORCPT ); Thu, 22 Sep 2022 08:45:15 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E700AE235 for ; Thu, 22 Sep 2022 05:45:12 -0700 (PDT) X-UUID: acefbee5d6b84b028298bf9d075543e7-20220922 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=Xkw5w0gJRMEd4Xb0J/hlS/e3274+GxMEBDRNr69F+Ys=; b=fhBkp/JGkR8vb+3cudDSy/C7ZLN5qOdAn/J9YU7YiVoRwD40hUMZPx4ozy5N1T7WyZvC+8kperZDyX/v+XJRK0BBN4W3eIj4JRedUQrcwvyxPnuznomKzsDfuezxzhPvcMyX5ludN5vNf4WHE0krGMQX4OrW3S5Uaj8ITPcxW6A=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:4c73154a-c6d0-4066-b1f6-f16be5df5648,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:7cecbda2-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: acefbee5d6b84b028298bf9d075543e7-20220922 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1540234213; Thu, 22 Sep 2022 20:45:06 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 22 Sep 2022 20:45:04 +0800 Received: from mszsdaap41.gcn.mediatek.inc (10.16.6.141) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 22 Sep 2022 20:45:04 +0800 From: To: , , , , , , , CC: , , , , , , Xinlei Lee Subject: [PATCH v8,0/3] Add dpi output format control for MT8186 Date: Thu, 22 Sep 2022 20:44:59 +0800 Message-ID: <1663850702-26529-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 Base on the branch of ck-linux-next/mediatek-drm-fixes. 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: Adjust the dpi output format to MT8186 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