From patchwork Wed Oct 19 02:52:13 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: 317 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp96377wrs; Tue, 18 Oct 2022 19:54:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5VXtefZtPr+ksXzeeYIgVxSCAjV12vQ2op56a03Di/UfPitZXhEqBAXmIpmmNqir5hpk/6 X-Received: by 2002:a05:6a00:2350:b0:541:b5bf:2774 with SMTP id j16-20020a056a00235000b00541b5bf2774mr5995399pfj.28.1666148063025; Tue, 18 Oct 2022 19:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666148063; cv=none; d=google.com; s=arc-20160816; b=lz9NM2BxspRNSt5dkuxdDexSlzhDNgQkVpbYUH9cnzL6mLTiWsBNHfSjUTZZW4Iw5X gD1h+OseDVuUbxAmTzAQ6OA12doow9zW2uSWDQ3+uxAY+ENN2qq6XGM3wor/Kb5viKy5 xtcyQi47ZUQlT8wi8zj2j3icPS/7PI+Sl7rGExAoPv+z1vEu8WIrKoCHr6NSfV8zJOzh WJHofG9cPouX7E/3z66LNJpL0NQUsNWcKIYBhKp5YN0RsctNj/qpweLG+oJzekLBnkvB 8kc8ptl83a7w6gOm3VDJeoOYcFV8fx9aij0z70GUk+MdUbKdlX+DPaXXkBnjcjr2RO+N gltQ== 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=VIMMLG0dXuwl6KEM8MBxM2bfM4gT2Sc13xFGqaWm6lg=; b=Diw50uWIi5ZU24n3I7niJsMvw1m99megVcGQPkykuk5PXKlNqMeSke+JbUoggkyqcm vWjj3o8xxfIghHefM1+175a4QBwJ1Cy8TvMpOHDW7Ui9DlirBkUQ0OzDHNSxsVm/YWJs vgVxPvIyWbpo7QVzNjkaAchrDCKasay3Wi5zhh0B/037AQ8rdZJy2c5J0y+Z8h6qtYZO 2TW0/UmH8oqBE65jBqDjuEOVlcdSaz9GQIm1pdWEP02s0SJpjdyTXcjj0N/fq20pKYyU z9iK7TKMV6Rltu9FpM6Glq/mNQVPRYuDXY+fczpzcR3oavYi1wzIcZp+a9p5ucnK15Df 3gEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=iG646NaH; 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 206-20020a6306d7000000b00460dd0eed0csi17871185pgg.176.2022.10.18.19.54.10; Tue, 18 Oct 2022 19:54: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=iG646NaH; 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 S229670AbiJSCwh (ORCPT + 99 others); Tue, 18 Oct 2022 22:52:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbiJSCwf (ORCPT ); Tue, 18 Oct 2022 22:52:35 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AFADE52CD for ; Tue, 18 Oct 2022 19:52:28 -0700 (PDT) X-UUID: 634b250efb884b76868e141e5afbb4b7-20221019 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=VIMMLG0dXuwl6KEM8MBxM2bfM4gT2Sc13xFGqaWm6lg=; b=iG646NaHTZK5FstIDLWZ6yaKWiyTHJ2EwR1eR8UiFXszmgAErXhwEwktb3ntJsFEsUuC57ckb3xPvktFJOQgN9VYqnCeDdeOkq617Ha/b9trtANIkYtO6THwHT/fNdyDVG3SMk3OyCCgW+X7hnZdAMLOhPz5ZfLwTpu6rV9FB5c=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:3b255795-bad7-4138-8aeb-cbb422660271,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:95 X-CID-INFO: VERSION:1.1.11,REQID:3b255795-bad7-4138-8aeb-cbb422660271,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTI ON:quarantine,TS:95 X-CID-META: VersionHash:39a5ff1,CLOUDID:3dcd3ca4-ebb2-41a8-a87c-97702aaf2e20,B ulkID:2210191052232YY0THHH,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: 634b250efb884b76868e141e5afbb4b7-20221019 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 352889621; Wed, 19 Oct 2022 10:52:20 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Wed, 19 Oct 2022 10:52:18 +0800 Received: from mszsdaap41.gcn.mediatek.inc (10.16.6.141) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Wed, 19 Oct 2022 10:52:18 +0800 From: To: , , , , , , , , CC: , , , , , Xinlei Lee Subject: [PATCH v12,0/3] Add dpi output format control for MT8186 Date: Wed, 19 Oct 2022 10:52:13 +0800 Message-ID: <1666147936-27368-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=-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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747082871021492635?= X-GMAIL-MSGID: =?utf-8?q?1747082871021492635?= From: Xinlei Lee Base on the branch of linus/master v6.1 rc1. 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(-)