Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2688546pxb; Mon, 31 Jan 2022 02:01:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLdL1luVMxQtGg5Ckg/ReiEj66Tkp8subhNdSytCAK70WJsgAKRyUQvBN6HWJGpqzCDHKM X-Received: by 2002:a05:6a00:1342:: with SMTP id k2mr19453713pfu.20.1643623303710; Mon, 31 Jan 2022 02:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643623303; cv=none; d=google.com; s=arc-20160816; b=VItPT4+oAGUp95YbEwiXs1H/3nUDSEg7rq7UxvK+zFQ6fCCtsxQ+cdGmFwg2oiY5T0 6ssSA2g7gSLJy+JS6ERIHU8aV47sBd4DhqwAI6y/7NiH4+cuPhZKRARhfUQW3EsStOIQ ddoB8RT4+PektvpAuNfM0ZuEXjxkiwyCubg46+A0RPhC2OHGr/5wtJZmQQOUYhA9iW03 d6VCtuljACJ7PXGmdwB0tATDODW8ojA5vjFG+ZgtNqKgzID6VdGlS1LMc9h95xG7+40M cZHHUaB7Vfi9BDqPM/BktWvxa965OmID3FWWEzmVzY0KIR7OkBLEfj8W73PsIUOVEI++ mVfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xbDP7E4yJ/bHnd7QA50a/VCPp9e/j4fsK5IbE6fe2gU=; b=jNV652/QDaJHWawQSz8dzcpptWgFETLQy/r7wnEhxfmk1rJpKl/kfGtHeKFoIF5X+V by1U+95tT04OEunVp2ZqDpsvzGLPGoshysFVCE3fxDGKZC/57wNLcMCiZHUxjVBKEyhg KdrJ3vFiq1VetxxwtBNYCCVVDjnegQrA/QHnq15pjQJoEBLdbsekuW4zy+MvNPZaFIEl cAVfd4wT28PCUmkOg2jTcQV8C1oZ8xQPmnE/59P7aTIXdxYQYzGVxexoZk9neXOt5FI+ /TmZUb+Xse7BxClfDQc6y9/Kpt9duvLMv6t3sxYe2Fd/wjYEhrTk6uyB/12n4qvXfuT3 fQCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d69si13766360pgc.244.2022.01.31.02.01.32; Mon, 31 Jan 2022 02:01:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348301AbiA1MHi (ORCPT + 99 others); Fri, 28 Jan 2022 07:07:38 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:36994 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1348309AbiA1MHa (ORCPT ); Fri, 28 Jan 2022 07:07:30 -0500 X-UUID: 54ff6678d0d74ad48bfe97e81d84ef3d-20220128 X-UUID: 54ff6678d0d74ad48bfe97e81d84ef3d-20220128 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1365193302; Fri, 28 Jan 2022 20:07:26 +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; Fri, 28 Jan 2022 20:07:24 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 28 Jan 2022 20:07:23 +0800 From: Yongqiang Niu To: Chun-Kuang Hu CC: Rob Herring , Matthias Brugger , Philipp Zabel , "David Airlie" , Daniel Vetter , Jassi Brar , Yongqiang Niu , Fabien Parent , Dennis YC Hsieh , , , , , , , Hsin-Yi Wang Subject: [PATCH v1, 4/4] drm/mediatek: add mt8186 display support Date: Fri, 28 Jan 2022 20:07:18 +0800 Message-ID: <20220128120718.30545-5-yongqiang.niu@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220128120718.30545-1-yongqiang.niu@mediatek.com> References: <20220128120718.30545-1-yongqiang.niu@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Yongqiang Niu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 6efb423ccc92..754b1be25d0d 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -158,6 +158,24 @@ static const enum mtk_ddp_comp_id mt8183_mtk_ddp_ext[] = { DDP_COMPONENT_DPI0, }; +static const enum mtk_ddp_comp_id mt8186_mtk_ddp_main[] = { + DDP_COMPONENT_OVL0, + DDP_COMPONENT_RDMA0, + DDP_COMPONENT_COLOR0, + DDP_COMPONENT_CCORR, + DDP_COMPONENT_AAL0, + DDP_COMPONENT_GAMMA, + DDP_COMPONENT_POSTMASK0, + DDP_COMPONENT_DITHER, + DDP_COMPONENT_DSI0, +}; + +static const enum mtk_ddp_comp_id mt8186_mtk_ddp_ext[] = { + DDP_COMPONENT_OVL_2L0, + DDP_COMPONENT_RDMA1, + DDP_COMPONENT_DPI0, +}; + static const enum mtk_ddp_comp_id mt8192_mtk_ddp_main[] = { DDP_COMPONENT_OVL0, DDP_COMPONENT_OVL_2L0, @@ -221,6 +239,13 @@ static const struct mtk_mmsys_driver_data mt8183_mmsys_driver_data = { .ext_len = ARRAY_SIZE(mt8183_mtk_ddp_ext), }; +static const struct mtk_mmsys_driver_data mt8186_mmsys_driver_data = { + .main_path = mt8186_mtk_ddp_main, + .main_len = ARRAY_SIZE(mt8186_mtk_ddp_main), + .ext_path = mt8186_mtk_ddp_ext, + .ext_len = ARRAY_SIZE(mt8186_mtk_ddp_ext), +}; + static const struct mtk_mmsys_driver_data mt8192_mmsys_driver_data = { .main_path = mt8192_mtk_ddp_main, .main_len = ARRAY_SIZE(mt8192_mtk_ddp_main), @@ -463,6 +488,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { .data = (void *)MTK_DISP_MUTEX }, { .compatible = "mediatek,mt8183-disp-mutex", .data = (void *)MTK_DISP_MUTEX }, + { .compatible = "mediatek,mt8186-disp-mutex", + .data = (void *)MTK_DISP_MUTEX }, { .compatible = "mediatek,mt8192-disp-mutex", .data = (void *)MTK_DISP_MUTEX }, { .compatible = "mediatek,mt8173-disp-od", @@ -475,14 +502,20 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { .data = (void *)MTK_DISP_OVL }, { .compatible = "mediatek,mt8183-disp-ovl", .data = (void *)MTK_DISP_OVL }, + { .compatible = "mediatek,mt8186-disp-ovl", + .data = (void *)MTK_DISP_OVL }, { .compatible = "mediatek,mt8192-disp-ovl", .data = (void *)MTK_DISP_OVL }, { .compatible = "mediatek,mt8183-disp-ovl-2l", .data = (void *)MTK_DISP_OVL_2L }, + { .compatible = "mediatek,mt8186-disp-ovl-2l", + .data = (void *)MTK_DISP_OVL_2L }, { .compatible = "mediatek,mt8192-disp-ovl-2l", .data = (void *)MTK_DISP_OVL_2L }, { .compatible = "mediatek,mt8192-disp-postmask", .data = (void *)MTK_DISP_POSTMASK }, + { .compatible = "mediatek,mt8186-disp-postmask", + .data = (void *)MTK_DISP_POSTMASK}, { .compatible = "mediatek,mt2701-disp-pwm", .data = (void *)MTK_DISP_BLS }, { .compatible = "mediatek,mt8167-disp-pwm", @@ -511,12 +544,16 @@ 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,mt2701-dsi", .data = (void *)MTK_DSI }, { .compatible = "mediatek,mt8173-dsi", .data = (void *)MTK_DSI }, { .compatible = "mediatek,mt8183-dsi", .data = (void *)MTK_DSI }, + { .compatible = "mediatek,mt8186-dsi", + .data = (void *)MTK_DSI }, { } }; @@ -533,6 +570,8 @@ static const struct of_device_id mtk_drm_of_ids[] = { .data = &mt8173_mmsys_driver_data}, { .compatible = "mediatek,mt8183-mmsys", .data = &mt8183_mmsys_driver_data}, + { .compatible = "mediatek,mt8186-mmsys", + .data = &mt8186_mmsys_driver_data}, { .compatible = "mediatek,mt8192-mmsys", .data = &mt8192_mmsys_driver_data}, { } -- 2.25.1