From patchwork Wed Oct 4 02:40:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SmFzb24tSkggTGluICjmnpfnnb/npaUp?= X-Patchwork-Id: 13408236 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EF3FE8FDC8 for ; Wed, 4 Oct 2023 02:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xQMlq8rX11H5WF8TuAv+3v+gGvSEJmzn/gaIwSR7LDk=; b=XOUYmLgnDAPtFn uZMwbVWitSA+MHhIRPx2jDsZNBKz/BpdsfsbLK/06ABwVrzNJX4tLp/eH28ZHOm20YEjSrD2LcPiO xMTNGsiu9bFV8gJAeR6cSZIhO13UcM+6Xm9JRaE9H6lDz34TBd1pYsE8712mXmGaC2v4eFfTHm8kU BFRJn5y475ftxN9aSzzPNgCn/3jPzIKm9GhruriFoPmYyLPPtSFm0S57ZJEqfO61IktInl0a2PL7/ s73w921SD7HAZBZDhCq9f+LqkyjujBoPhPv4c4I1/cY1AHH/8NYcgK6WF6f4cHUSD6xkFPZMBjxUU fE0VICVqQuCu/Atcs/aA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qnroM-00FnZE-2L; Wed, 04 Oct 2023 02:40:30 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qnroJ-00FnYO-0L; Wed, 04 Oct 2023 02:40:28 +0000 X-UUID: 5b5d667a625f11ee86758d4a7c00f3a0-20231003 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=GLG0McDXD3RiSj25NXjkBPEr/Jx8+lcRk5C/BaVVWvs=; b=JPRGvl0FyTzEaodFEzAHOLLR+NwMy7WHmz8Rua7uW3be5swTcdALVyi4YzScexnZfmozznyVcaqXXi3DGXR2TQ+9FGsj42p/Y8ZnxGkypMl6kfByWG8HgeYQG+3u09fq2zbZnzaqza7kuP6Bpoeh+YLnIwmdxoFVYcd7l4lS/iA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:bc21cba6-d78c-474a-ac53-004bf684261a,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:5f78ec9,CLOUDID:79708ebf-14cc-44ca-b657-2d2783296e72,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 5b5d667a625f11ee86758d4a7c00f3a0-20231003 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1160226194; Tue, 03 Oct 2023 19:40:18 -0700 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by MTKMBS14N2.mediatek.inc (172.21.101.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 4 Oct 2023 10:40:15 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 4 Oct 2023 10:40:15 +0800 From: Jason-JH.Lin To: Chun-Kuang Hu , AngeloGioacchino Del Regno CC: Matthias Brugger , Jason-ch Chen , Johnson Wang , "Jason-JH . Lin" , Singo Chang , Nancy Lin , Shawn Sung , , , , , Subject: [PATCH v11 7/9] drm/mediatek: Support dynamic selection of DP_INTF0 on MT8188 VDOSYS0 Date: Wed, 4 Oct 2023 10:40:11 +0800 Message-ID: <20231004024013.18956-8-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231004024013.18956-1-jason-jh.lin@mediatek.com> References: <20231004024013.18956-1-jason-jh.lin@mediatek.com> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--5.967700-8.000000 X-TMASE-MatchedRID: QNCxZxSW5lrUbyut0lXeoED6z8N1m1ALnhD9A3Sa7pZcU0dNErOD+vlY oV6p/cSxNFCzr/YjTjM/j7zt48dCSZsYdIGP6PlZkDpLRKO9xhR9LQinZ4QefPcjNeVeWlqY+gt Hj7OwNO0UQCQtpNwWeuvXUIEHYfY0GmaFOppS/NxmzbyaB9t9FR3vvlo+MTGG X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.967700-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 980030E620D8BDC97A45A00A4B4E7DB9D4760DABC8FF37A7B7D3A75158DF0FE02000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231003_194027_148669_6DE31C33 X-CRM114-Status: GOOD ( 10.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Move DDP_COMPONENT_DP_INTF0 from mt8188_mtk_ddp_main array to a connector routes array called mt8188_mtk_ddp_main_routes to support dynamic selection capability for mt8188. Signed-off-by: Jason-JH.Lin Reviewed-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 5d2e191b4106..70c9501250a0 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -186,7 +186,10 @@ static const unsigned int mt8188_mtk_ddp_main[] = { DDP_COMPONENT_GAMMA, DDP_COMPONENT_POSTMASK0, DDP_COMPONENT_DITHER0, - DDP_COMPONENT_DP_INTF0, +}; + +static const struct mtk_drm_route mt8188_mtk_ddp_main_routes[] = { + {0, DDP_COMPONENT_DP_INTF0}, }; static const unsigned int mt8192_mtk_ddp_main[] = { @@ -288,6 +291,8 @@ static const struct mtk_mmsys_driver_data mt8186_mmsys_driver_data = { static const struct mtk_mmsys_driver_data mt8188_vdosys0_driver_data = { .main_path = mt8188_mtk_ddp_main, .main_len = ARRAY_SIZE(mt8188_mtk_ddp_main), + .conn_routes = mt8188_mtk_ddp_main_routes, + .num_conn_routes = ARRAY_SIZE(mt8188_mtk_ddp_main_routes), .mmsys_dev_num = 1, };