From patchwork Thu Apr 27 08:40:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason-JH.Lin" X-Patchwork-Id: 13225259 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 77524C77B61 for ; Thu, 27 Apr 2023 08:41:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=oIbfjJ3OavkLDjGoIVUXgc/e5g7Z0WCTQAniVtrOY2Q=; b=nVZWKPkr7ITZmODmNvrb1r+BbS zVJCEHD+cvM9OaTLlGRAB/Qgdco4GeDkWWHu3wcjw6D601vaIOrA1P20tbAc8n7vWAPW6MEoULDP7 pfqUeibh215qdN4O7dg1zlYo5Q7ws8aRLajDz0auAZhDNe8xagff4OxRzF3g2rDTT0Kl8tmGbD5TK BjZ8G/IgAZQhzRrbaRk7NA0SqwwoARiaHjjJmJIJjE1/dexYg32XvXdNIghGB7g+vNpS2nXtoY4FY Jkx4QOAEzow2t3Q77jwVu7X6sz8dpGtYY19p1m8a057jYvcZWf3UEHWpchQJg823l1Uod4s+E+mGx E14F8icw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prxBv-005qUB-0h; Thu, 27 Apr 2023 08:41:27 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prxBr-005qSL-0N; Thu, 27 Apr 2023 08:41:24 +0000 X-UUID: 45a082fae4d711ed8687db9d93187ff1-20230427 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=oIbfjJ3OavkLDjGoIVUXgc/e5g7Z0WCTQAniVtrOY2Q=; b=OpnaGd0p35h4iW7OpdCsl0MLb+a/ZAK7tcHujSI6XoPga3pSyDKOOMETrTxdxZmHkJCFJOLlOmwfG5ft14lW9NxVBkSgU/TnK8yb/LPTjZv9iR7hbDw+7uxoGR9/X5bWL6WKCFpQnHDyyfH4VjgN+KCdmPh5NSpZimra+gCtABg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:ed5812c0-2f3d-4a8b-90f6-d6ac450effdd,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:120426c,CLOUDID:a7d11cbf-e32c-4c97-918d-fbb3fc224d4e,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 45a082fae4d711ed8687db9d93187ff1-20230427 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1107124480; Thu, 27 Apr 2023 01:41:15 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) 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.1118.25; Thu, 27 Apr 2023 16:40:41 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 27 Apr 2023 16:40:41 +0800 From: Jason-JH.Lin To: Chun-Kuang Hu , AngeloGioacchino Del Regno , Alexandre Mergnat CC: Matthias Brugger , Rex-BC Chen , Jason-ch Chen , Johnson Wang , "Jason-JH . Lin" , Singo Chang , Nancy Lin , Shawn Sung , , , , , Subject: [PATCH v2 0/2] Add dynamic connector selection mechanism Date: Thu, 27 Apr 2023 16:40:38 +0800 Message-ID: <20230427084040.3651-1-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230427_014123_158281_140DF7C4 X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org To support DSI and eDP as main display connector without modifying mtk-drm driver, we add the dynamic connector selection mechanism. Change in v2: 1. rebase on linux-next: next-20230426 2. Fix alphabetical order and max_num condition check problem. Change in v1: 1. based on mediatek-drm maintainer's tree / mediatek-drm-next branch: https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Jason-JH.Lin (2): drm/mediatek: Add ability to support dynamic connector selection drm/mediatek: Add DSI support for mt8188 vdosys0 drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 + drivers/gpu/drm/mediatek/mtk_dpi.c | 9 ++ drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 112 +++++++++++++++++++- drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 5 +- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 28 +++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 8 ++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 49 +++++++-- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 8 ++ drivers/gpu/drm/mediatek/mtk_dsi.c | 9 ++ 9 files changed, 219 insertions(+), 11 deletions(-)