From patchwork Wed Oct 19 02:52:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?WGlubGVpIExlZSAo5p2O5piV56OKKQ==?= X-Patchwork-Id: 4416 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp96543wrs; Tue, 18 Oct 2022 19:55:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76JQ5K2G9Qznqwe8oACdjkPoe4VMMLgKefwU60i770rUJXDLcGRT0tuprb8Ec4yx75uXNJ X-Received: by 2002:a63:441b:0:b0:439:103b:25a4 with SMTP id r27-20020a63441b000000b00439103b25a4mr5148112pga.487.1666148110378; Tue, 18 Oct 2022 19:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666148110; cv=none; d=google.com; s=arc-20160816; b=yte9sA/8P0i5im8JYjpEcqCM8epCFi5JckvBA4km26NUM1hdmwfPq6GuSGbh08HLhV NXy7jDFE5D0meUCpF6bnuvNSDQdCGnSchMSuFPPdInMDAQnTzQF2qS5kpcc9SBWw0xFc qRwAZbwpymxTMSt8pGAmArhRkEXCUgrzH83iCyyBVevRb7dD05rwzby4MJyDj7JbSRB2 bnemYl4eg03TD+uVilhtE48SjjzI4t1o2kF9UTJE47A5GgGpS4sjIkS0A9AkUH9+sF5A 2PNtTUyH3ahAasVooz+6IOueW3LfXOm9+4EY3++0ziKJSyp/xSWhU7byJciV0jy83haD ynEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bM4zw0Ws9v3JR35vcccpkXU0oVomPL4aKPeu1Ed9LVE=; b=01f0yel7tmoOQVLBvLjx3+PHCaaGBfPglGGXkQovytAoP4zW/4Q6351rKY7dj1H81L vwVnlwmmUW7XU7/uHQHEYxvFklbN5dZxZDttmEzXpMneX1R4HvGaeZtwu/c9d7YHRUhW x5EYcWqKrLTF8s7nrDWJsuYBI1+u4oaybFqDhm86IrnLP/sWcKSPdwuQGm5S3wM/vuzd GR5Bw9fi55T9O/KHOXA9OB6vs1zm297PEzrkn0H97g88FdfDsd+Bs/Vyk4XehVau8eHk yIz+YTDKM4EdWnUqegbLBuWsaxaaLYseD/dsST2RIs+RrKZthZdDgh4NA2MGRTWJOOFC 3VJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Di5JxcoO; 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 cw15-20020a056a00450f00b00567719e34aesi1151887pfb.49.2022.10.18.19.54.39; Tue, 18 Oct 2022 19:55:10 -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=Di5JxcoO; 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 S229802AbiJSCwp (ORCPT + 99 others); Tue, 18 Oct 2022 22:52:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbiJSCwg (ORCPT ); Tue, 18 Oct 2022 22:52:36 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8341FE52EF for ; Tue, 18 Oct 2022 19:52:31 -0700 (PDT) X-UUID: aff05f426cec40fdb5c90833d9065a68-20221019 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=bM4zw0Ws9v3JR35vcccpkXU0oVomPL4aKPeu1Ed9LVE=; b=Di5JxcoOFu7pFzTpBX0QU/RpQhmObhwsnzxyRrqfGGjKe8bl0R5+TWVfAJSlmeP9ypb1KJekDqk71EXG8/PGQGVuHtKTuIfTG7Vs9rj81XolsjUoW2NDcVfGxZlIO4JWFwXG2ZA9QRum35yZxbd2rKmkLY5C6z7BVi4RjgrjdNY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:8a71a60a-63b3-4d84-8e8f-e005e3b4ed06,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:39a5ff1,CLOUDID:d5b53ba3-73e4-48dd-a911-57b5d5484f14,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: aff05f426cec40fdb5c90833d9065a68-20221019 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 1524502265; Wed, 19 Oct 2022 10:52:26 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) 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; Wed, 19 Oct 2022 10:52:24 +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:24 +0800 From: To: , , , , , , , , CC: , , , , , Xinlei Lee Subject: [PATCH v12,3/3] drm: mediatek: Add mt8186 dpi compatibles and platform data Date: Wed, 19 Oct 2022 10:52:16 +0800 Message-ID: <1666147936-27368-4-git-send-email-xinlei.lee@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1666147936-27368-1-git-send-email-xinlei.lee@mediatek.com> References: <1666147936-27368-1-git-send-email-xinlei.lee@mediatek.com> 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?1747082921184203059?= X-GMAIL-MSGID: =?utf-8?q?1747082921184203059?= From: Xinlei Lee Add the compatible because use edge_cfg_in_mmsys in mt8186. Signed-off-by: Xinlei Lee Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: NĂ­colas F. R. A. Prado --- drivers/gpu/drm/mediatek/mtk_dpi.c | 21 +++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ 2 files changed, 23 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index b9d740efdb6a..fa39e37caeb3 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -940,6 +940,24 @@ static const struct mtk_dpi_conf mt8183_conf = { .csc_enable_bit = CSC_ENABLE, }; +static const struct mtk_dpi_conf mt8186_conf = { + .cal_factor = mt8183_calculate_factor, + .reg_h_fre_con = 0xe0, + .max_clock_khz = 150000, + .output_fmts = mt8183_output_fmts, + .num_output_fmts = ARRAY_SIZE(mt8183_output_fmts), + .edge_cfg_in_mmsys = true, + .pixels_per_iter = 1, + .is_ck_de_pol = true, + .swap_input_support = true, + .support_direct_pin = true, + .dimension_mask = HPW_MASK, + .hvsize_mask = HSIZE_MASK, + .channel_swap_shift = CH_SWAP, + .yuv422_en_bit = YUV422_EN, + .csc_enable_bit = CSC_ENABLE, +}; + static const struct mtk_dpi_conf mt8192_conf = { .cal_factor = mt8183_calculate_factor, .reg_h_fre_con = 0xe0, @@ -1090,6 +1108,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { { .compatible = "mediatek,mt8183-dpi", .data = &mt8183_conf, }, + { .compatible = "mediatek,mt8186-dpi", + .data = &mt8186_conf, + }, { .compatible = "mediatek,mt8192-dpi", .data = &mt8192_conf, }, diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 91f58db5915f..a5a1a91429ec 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -631,6 +631,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { .data = (void *)MTK_DPI }, { .compatible = "mediatek,mt8183-dpi", .data = (void *)MTK_DPI }, + { .compatible = "mediatek,mt8186-dpi", + .data = (void *)MTK_DPI }, { .compatible = "mediatek,mt8192-dpi", .data = (void *)MTK_DPI }, { .compatible = "mediatek,mt8195-dp-intf",