From patchwork Tue Apr 16 14:58:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10904687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 08151922 for ; Wed, 17 Apr 2019 07:04:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E54442624D for ; Wed, 17 Apr 2019 07:04:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D98D128737; Wed, 17 Apr 2019 07:04:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 782452624D for ; Wed, 17 Apr 2019 07:04:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99F5789E14; Wed, 17 Apr 2019 07:03:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 916A189E35 for ; Tue, 16 Apr 2019 15:00:10 +0000 (UTC) X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MQdAP-1hPv0g3zR7-00U6nL; Tue, 16 Apr 2019 16:59:08 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 1/4] drm/mediatek: config component output by device node port Date: Tue, 16 Apr 2019 16:58:45 +0200 Message-Id: <20190416145848.11932-2-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:kF6Fe8nmXqHsGRsCBMzwIHxJsQ4jrJQeH0U7ChtBG+ENZtnMU4P mzP3fZ6LmMQ9wzkXLEtxyhTug7mVNnZ5aRzOFtDq+bXEq6StIN1HuPxF+cEbqgUyw0rBmgQ Grs0BXCKVhhEvUQ8wh8nQ0gJs1jDIDs0wbAfatxsea8E+iWDx3z9vtBnYDPza0MyYsJ+W/X muRpCNbF5TU+fI8/fFP2w== X-UI-Out-Filterresults: notjunk:1;V03:K0:E/3inT9AlIQ=:44r0/nuzjukXaTBsgKDboP pT1POkQ6M8/HZoLcCnmLj6XfuC9q7DdHAHhC0f8xyemgxH2+P+PbSYbo6hJ0R6FW04r7RYktR 3AJ0EctkNLJY4ZE2FTigSx7zhDYnKQHl22HcIktqkShVG2ae9nZvsU136yXkjt0pHLU3qN+Hb 5pAV8Z4kWSxi8mPsovmk7joxceR6CndqpwobMZ0mgjKM4AoJ8MIiaMuFPMrH0hcwzjEiWNs8d kPhSutKkZZhI/OMypx7X7A3GOCmzjggy5CY2n1q8kDhwARFXruJY/lcvtvRFPSUv7QA2si8kl L7C0TPt6pBapGDcDc8yfp3p00+Pg+f07LRdJY6acAeIu/DMeMwc3MplvT09NkRUCNLu1Beqd0 Ddi1YtffUaXk8hnCBvwOV9GPxTEt8+Ygkb/3focXigvUs1FEBX3NVxjrCRoglLmwvYdEo50Yb Sg4VTQgfiHCRvvUOHhnN4Rp/pV7AZbMJ/+AMCnwbC1SH4l4ZbK2ClhiwKM0TiiuplrVtXxr9C GRSQl4WaSo4cipbjQ5EDg+Q1GzSRSMwGTROqov6kaweq6COjudOjUdR4Yf70e3a4eaprrMerJ r9bp5qq7OGfNWasVi+3DZu25Q9duElGrUuBPndKbmSO84ZdPbNX1eq6qCC0FZIenrxjS0ZqqD v2VGMdYvJYi4xI70aBKp3w8sXlJorf47gMeakPNnNn0mAsH8nMHPqgpCeBS+hMLOVBZBpiTFH aHsHrvZrgdRFesO41hodsMWn+JGStrbehCVlSCCLwD0WcxllDbh53t8ZRO73R/lfvkx9Jp85c T0kgK2WEwcIjydFfPS5+STf1UVXaOstdjMt3wXdSeQLUL81evXnLoU05IERBQzm+DUsn7arne J2Z3dLQJ1XeiihsRk8BbnwnyDx4F8k2PpPligzJUVJy9mwb4QKvfQmBoJxKz95 X-Mailman-Approved-At: Wed, 17 Apr 2019 07:03:29 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555426748; bh=vb89RwI58hI4Muw6KGF7jp8e4/iof1jiOcMOYSRKE5s=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=L7X9sbiK0JQchn7H1/1F0Y67m8s/KWTebMXVBIhxYh41Dzb/bCTrYu0Zm5GawaA+3 UAWPBKAnCOZOmDssnQhB2a5i5EBTv3KZezzVKSNIb8UOd/mvH4VM2+cuVJTWgDsq2E 04vDisehgKGy+BtiQjE6muI+AjHWYCgwsp2QqSks= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Bibby Hsieh We can select output component by decive node port. Main path default output component is DSI. External path default output component is DPI. Signed-off-by: Bibby Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 41 ++++++++++++++++++++++---- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 4 +-- 2 files changed, 37 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 57ce4708ef1b..d3e86426dc65 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -22,7 +22,9 @@ #include #include #include +#include #include +#include #include #include @@ -134,7 +136,7 @@ static const struct drm_mode_config_funcs mtk_drm_mode_config_funcs = { .atomic_commit = mtk_atomic_commit, }; -static const enum mtk_ddp_comp_id mt2701_mtk_ddp_main[] = { +static enum mtk_ddp_comp_id mt2701_mtk_ddp_main[] = { DDP_COMPONENT_OVL0, DDP_COMPONENT_RDMA0, DDP_COMPONENT_COLOR0, @@ -142,12 +144,12 @@ static const enum mtk_ddp_comp_id mt2701_mtk_ddp_main[] = { DDP_COMPONENT_DSI0, }; -static const enum mtk_ddp_comp_id mt2701_mtk_ddp_ext[] = { +static enum mtk_ddp_comp_id mt2701_mtk_ddp_ext[] = { DDP_COMPONENT_RDMA1, DDP_COMPONENT_DPI0, }; -static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = { +static enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = { DDP_COMPONENT_OVL0, DDP_COMPONENT_COLOR0, DDP_COMPONENT_AAL0, @@ -157,7 +159,7 @@ static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = { DDP_COMPONENT_PWM0, }; -static const enum mtk_ddp_comp_id mt2712_mtk_ddp_ext[] = { +static enum mtk_ddp_comp_id mt2712_mtk_ddp_ext[] = { DDP_COMPONENT_OVL1, DDP_COMPONENT_COLOR1, DDP_COMPONENT_AAL1, @@ -173,7 +175,7 @@ static const enum mtk_ddp_comp_id mt2712_mtk_ddp_third[] = { DDP_COMPONENT_PWM2, }; -static const enum mtk_ddp_comp_id mt8173_mtk_ddp_main[] = { +static enum mtk_ddp_comp_id mt8173_mtk_ddp_main[] = { DDP_COMPONENT_OVL0, DDP_COMPONENT_COLOR0, DDP_COMPONENT_AAL0, @@ -184,7 +186,7 @@ static const enum mtk_ddp_comp_id mt8173_mtk_ddp_main[] = { DDP_COMPONENT_PWM0, }; -static const enum mtk_ddp_comp_id mt8173_mtk_ddp_ext[] = { +static enum mtk_ddp_comp_id mt8173_mtk_ddp_ext[] = { DDP_COMPONENT_OVL1, DDP_COMPONENT_COLOR1, DDP_COMPONENT_GAMMA, @@ -479,6 +481,7 @@ static int mtk_drm_probe(struct platform_device *pdev) /* Iterate over sibling DISP function blocks */ for_each_child_of_node(dev->of_node->parent, node) { + struct device_node *port, *ep, *remote; const struct of_device_id *of_id; enum mtk_ddp_comp_type comp_type; int comp_id; @@ -538,6 +541,32 @@ static int mtk_drm_probe(struct platform_device *pdev) private->ddp_comp[comp_id] = comp; } + + if (comp_type != MTK_DSI && comp_type != MTK_DPI) { + port = of_graph_get_port_by_id(node, 0); + if (!port) + continue; + ep = of_get_child_by_name(port, "endpoint"); + of_node_put(port); + if (!ep) + continue; + remote = of_graph_get_remote_port_parent(ep); + of_node_put(ep); + if (!remote) + continue; + of_id = of_match_node(mtk_ddp_comp_dt_ids, remote); + if (!of_id) + continue; + comp_type = (enum mtk_ddp_comp_type)of_id->data; + for (i = 0; i < private->data->main_len - 1; i++) + if (private->data->main_path[i] == comp_id) + private->data->main_path[i + 1] = + mtk_ddp_comp_get_id(node, comp_type); + for (i = 0; i < private->data->ext_len - 1; i++) + if (private->data->ext_path[i] == comp_id) + private->data->ext_path[i + 1] = + mtk_ddp_comp_get_id(node, comp_type); + } } if (!private->mutex_node) { diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h b/drivers/gpu/drm/mediatek/mtk_drm_drv.h index ecc00ca3221d..256a3ff2e66e 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h @@ -29,9 +29,9 @@ struct drm_property; struct regmap; struct mtk_mmsys_driver_data { - const enum mtk_ddp_comp_id *main_path; + enum mtk_ddp_comp_id *main_path; unsigned int main_len; - const enum mtk_ddp_comp_id *ext_path; + enum mtk_ddp_comp_id *ext_path; unsigned int ext_len; const enum mtk_ddp_comp_id *third_path; unsigned int third_len; From patchwork Tue Apr 16 14:58:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10904715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F8E617E0 for ; Wed, 17 Apr 2019 07:04:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57AB4284D2 for ; Wed, 17 Apr 2019 07:04:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B81C28707; Wed, 17 Apr 2019 07:04:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94167284D2 for ; Wed, 17 Apr 2019 07:04:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3B8289F03; Wed, 17 Apr 2019 07:04:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id A80B689E33 for ; Tue, 16 Apr 2019 15:00:11 +0000 (UTC) X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mg0IT-1hSB8S09sT-00NRtT; Tue, 16 Apr 2019 16:59:09 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 2/4] arm: dts: mt7623: add display subsystem related device nodes Date: Tue, 16 Apr 2019 16:58:46 +0200 Message-Id: <20190416145848.11932-3-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:xeru4vEJ5OWBm6t9PohoLIQO9YX/PIsODiQ2AJirGabJJ+r5ntM mTQPLEmIrmT4fohcsGVQeIm03nx+mlF5JXmI7ZgLrXVnwQj81NwDtCjjFXguQicPmEWX3Q9 DYU+EVkdOd7go/bdMbHlsBix6sd8FemfReFMo6PoCxgXSqjrYdLJyYLERplM4ELc2JuhfSV ifbpQvxltyYdUMzIJz1BQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:/FyxCRLIKfs=:KRERBqrBKFgNPtbtHAdCIR djcqnLFI0KtjIfCgKs93O3zUggavtjNS/m2xYtCAi0Ta2yXWqzE3JqfWy38ftXw/ON8eYPnXp JnRay9gDmBqPp2QxFL3r8WfFGoEcnMoFsvoP18dllPSV1JW96Q1Y11x8jvhtMuW53zIWTppAo pbk283hHhzvw5nz9+G1BhQWBg5Qab5rpIE8ahanQqenEbK41JQWsL/mF5zvNdPP0abrb4ycoi HhViTARGBKoo9qUHNTbXQH9a7etfbN1SdLXpwZ9EuV4Z/sqQN2U6+dS16WK7jMirmHVwetnZf BKS8dmyfwhoaP6nFA5TJMRZUKnkobLxgyl7mEo39ZVxa9k5UZspqpisFONjH4cx3L6EOFJc+Z wFXl7OMR3PcQpzU6W8Sw92fEpACMA6L6wTTv9fnGDh0vfLNs+72Y3lXmEYbL61kbgdJwDN6+p +03WbwaMxmYjPv/5kh64B2kJpAHPtCbetmagX8e6Ga7HQEdw9UmHfqClfDlX39726C4AM3GBm KsSQObaCcswPA5xOTK2Q3rHgCiQ6kCT6a9kFcI6xK93Z9DQtqmOpJ9kc18TtPEJe8nh6dk0Iz KrkMaYTSB+HwwsLTdReTLFduuon2lc0xlvzWvWW5vjry9wiYlr+KuOd+IfpPy6Tp2yuKVa+im Rafly169Q4IznLdGICPEgH7PuEsL+l10ynqLNu4bg+Jq3kCpvG7yAqWkObIgEn8Lss2C7h/3S iE/enmUWtnf85RiVB0kcrWWFushCLsfUeQr6TDs1qYRaRqCD1vTYApVrUrIwma3DF3XcP1nyo v6HX2jmc7H35ae/WRyJhKdOKbFea+Z0MbwMZn75hnskBEHp1nsGhRt9D5ef7NSXZY6ExC4BW/ sEv2zHU6C73I0+6K2YpQj/y4IjD7qpGHzUtJYglSLpPp7kASqvcLf3Xfn/FVoG X-Mailman-Approved-At: Wed, 17 Apr 2019 07:03:29 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555426749; bh=cmq3uTCvNem4hMhZFbGqISt7XCnjnlr87tqFEthDUxc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MouFGr/c4CTHWqfu4yfrraeajvLikZEZwMBnpVz9p052qM7L7JAGkG/5Ffnai5wwh XdXvSM+Be2rbduNr546iIWvqYSI9Cgyj+Co8GjDCICWErjVkG0MzYMdf5czTrPou5a XLYXT5ieeMnqT6JMB2qUZNJgo5cEyYYbs6HP+iQA= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Ryder Lee Add display subsystem related device nodes for MT7623. Cc: CK Hu Signed-off-by: chunhui dai Signed-off-by: Bibby Hsieh Signed-off-by: Ryder Lee additional fixes: [hdmi,dts] fixed dts-warnings author: Bibby Hsieh [dtsi] fix dpi0-node author: Ryder Lee Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich --- arch/arm/boot/dts/mt7623.dtsi | 177 ++++++++++++++++++ arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 85 +++++++++ arch/arm/boot/dts/mt7623n-rfb-emmc.dts | 85 +++++++++ 3 files changed, 347 insertions(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index 59e69f3dffa2..f1880ff04193 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -23,6 +23,11 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + rdma0 = &rdma0; + rdma1 = &rdma1; + }; + cpu_opp_table: opp-table { compatible = "operating-points-v2"; opp-shared; @@ -320,6 +325,25 @@ clock-names = "spi", "wrap"; }; + mipi_tx0: mipi-dphy@10010000 { + compatible = "mediatek,mt7623-mipi-tx", + "mediatek,mt2701-mipi-tx"; + reg = <0 0x10010000 0 0x90>; + clocks = <&clk26m>; + clock-output-names = "mipi_tx0_pll"; + #clock-cells = <0>; + #phy-cells = <0>; + }; + + cec: cec@10012000 { + compatible = "mediatek,mt7623-cec", + "mediatek,mt8173-cec"; + reg = <0 0x10012000 0 0xbc>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_CEC>; + status = "disabled"; + }; + cir: cir@10013000 { compatible = "mediatek,mt7623-cir"; reg = <0 0x10013000 0 0x1000>; @@ -368,6 +392,18 @@ #clock-cells = <1>; }; + hdmi_phy: phy@10209100 { + compatible = "mediatek,mt7623-hdmi-phy", + "mediatek,mt2701-hdmi-phy"; + reg = <0 0x10209100 0 0x24>; + clocks = <&apmixedsys CLK_APMIXED_HDMI_REF>; + clock-names = "pll_ref"; + clock-output-names = "hdmitx_dig_cts"; + #clock-cells = <0>; + #phy-cells = <0>; + status = "disabled"; + }; + rng: rng@1020f000 { compatible = "mediatek,mt7623-rng"; reg = <0 0x1020f000 0 0x1000>; @@ -567,6 +603,16 @@ status = "disabled"; }; + hdmiddc0: i2c@11013000 { + compatible = "mediatek,mt7623-hdmi-ddc", + "mediatek,mt8173-hdmi-ddc"; + interrupts = ; + reg = <0 0x11013000 0 0x1C>; + clocks = <&pericfg CLK_PERI_I2C3>; + clock-names = "ddc-i2c"; + status = "disabled"; + }; + nor_flash: spi@11014000 { compatible = "mediatek,mt7623-nor", "mediatek,mt8173-nor"; @@ -741,6 +787,84 @@ #clock-cells = <1>; }; + display_components: dispsys@14000000 { + compatible = "mediatek,mt7623-mmsys", + "mediatek,mt2701-mmsys"; + reg = <0 0x14000000 0 0x1000>; + power-domains = <&scpsys MT2701_POWER_DOMAIN_DISP>; + }; + + ovl@14007000 { + compatible = "mediatek,mt7623-disp-ovl", + "mediatek,mt2701-disp-ovl"; + reg = <0 0x14007000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_OVL>; + iommus = <&iommu MT2701_M4U_PORT_DISP_OVL_0>; + mediatek,larb = <&larb0>; + }; + + rdma0: rdma@14008000 { + compatible = "mediatek,mt7623-disp-rdma", + "mediatek,mt2701-disp-rdma"; + reg = <0 0x14008000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_RDMA>; + iommus = <&iommu MT2701_M4U_PORT_DISP_RDMA>; + mediatek,larb = <&larb0>; + }; + + wdma@14009000 { + compatible = "mediatek,mt7623-disp-wdma", + "mediatek,mt2701-disp-wdma"; + reg = <0 0x14009000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_WDMA>; + iommus = <&iommu MT2701_M4U_PORT_DISP_WDMA>; + mediatek,larb = <&larb0>; + }; + + bls: pwm@1400a000 { + compatible = "mediatek,mt7623-disp-pwm", + "mediatek,mt2701-disp-pwm"; + reg = <0 0x1400a000 0 0x1000>; + #pwm-cells = <2>; + clocks = <&mmsys CLK_MM_MDP_BLS_26M>, + <&mmsys CLK_MM_DISP_BLS>; + clock-names = "main", "mm"; + status = "disabled"; + }; + + color@1400b000 { + compatible = "mediatek,mt7623-disp-color", + "mediatek,mt2701-disp-color"; + reg = <0 0x1400b000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_COLOR>; + }; + + dsi: dsi@1400c000 { + compatible = "mediatek,mt7623-dsi", + "mediatek,mt2701-dsi"; + reg = <0 0x1400c000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DSI_ENGINE>, + <&mmsys CLK_MM_DSI_DIG>, + <&mipi_tx0>; + clock-names = "engine", "digital", "hs"; + phys = <&mipi_tx0>; + phy-names = "dphy"; + status = "disabled"; + }; + + mutex: mutex@1400e000 { + compatible = "mediatek,mt7623-disp-mutex", + "mediatek,mt2701-disp-mutex"; + reg = <0 0x1400e000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_MUTEX_32K>; + }; + larb0: larb@14010000 { compatible = "mediatek,mt7623-smi-larb", "mediatek,mt2701-smi-larb"; @@ -753,6 +877,44 @@ power-domains = <&scpsys MT2701_POWER_DOMAIN_DISP>; }; + rdma1: rdma@14012000 { + compatible = "mediatek,mt7623-disp-rdma", + "mediatek,mt2701-disp-rdma"; + reg = <0 0x14012000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_RDMA1>; + iommus = <&iommu MT2701_M4U_PORT_DISP_RDMA1>; + mediatek,larb = <&larb0>; + }; + + dpi0: dpi@14014000 { + compatible = "mediatek,mt7623-dpi", + "mediatek,mt2701-dpi"; + reg = <0 0x14014000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DPI1_DIGL>, + <&mmsys CLK_MM_DPI1_ENGINE>, + <&apmixedsys CLK_APMIXED_TVDPLL>; + clock-names = "pixel", "engine", "pll"; + status = "disabled"; + }; + + hdmi0: hdmi@14015000 { + compatible = "mediatek,mt7623-hdmi", + "mediatek,mt8173-hdmi"; + reg = <0 0x14015000 0 0x400>; + clocks = <&mmsys CLK_MM_HDMI_PIXEL>, + <&mmsys CLK_MM_HDMI_PLL>, + <&mmsys CLK_MM_HDMI_AUDIO>, + <&mmsys CLK_MM_HDMI_SPDIF>; + clock-names = "pixel", "pll", "bclk", "spdif"; + phys = <&hdmi_phy>; + phy-names = "hdmi"; + mediatek,syscon-hdmi = <&mmsys 0x900>; + cec = <&cec>; + status = "disabled"; + }; + imgsys: syscon@15000000 { compatible = "mediatek,mt7623-imgsys", "mediatek,mt2701-imgsys", @@ -1077,6 +1239,21 @@ }; }; + hdmi_pins_a: hdmi-default { + pins-hdmi { + pinmux = ; + input-enable; + bias-pull-down; + }; + }; + + hdmi_ddc_pins_a: hdmi_ddc-default { + pins-hdmi-ddc { + pinmux = , + ; + }; + }; + i2c0_pins_a: i2c0-default { pins-i2c0 { pinmux = , diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts index 2b760f90f38c..7a1763472018 100644 --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts @@ -21,6 +21,19 @@ stdout-path = "serial2:115200n8"; }; + connector { + compatible = "hdmi-connector"; + label = "hdmi"; + type = "d"; + ddc-i2c-bus = <&hdmiddc0>; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi0_out>; + }; + }; + }; + cpus { cpu@0 { proc-supply = <&mt6323_vproc_reg>; @@ -114,10 +127,24 @@ }; }; +&bls { + status = "okay"; + + port { + bls_out: endpoint { + remote-endpoint = <&dpi0_in>; + }; + }; +}; + &btif { status = "okay"; }; +&cec { + status = "okay"; +}; + &cir { pinctrl-names = "default"; pinctrl-0 = <&cir_pins_a>; @@ -128,6 +155,28 @@ status = "okay"; }; +&dpi0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + dpi0_out: endpoint { + remote-endpoint = <&hdmi0_in>; + }; + }; + + port@1 { + reg = <1>; + dpi0_in: endpoint { + remote-endpoint = <&bls_out>; + }; + }; + }; +}; + ð { status = "okay"; @@ -199,6 +248,42 @@ }; }; +&hdmi0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_pins_a>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + hdmi0_in: endpoint { + remote-endpoint = <&dpi0_out>; + }; + }; + + port@1 { + reg = <1>; + hdmi0_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; +}; + +&hdmiddc0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_ddc_pins_a>; + status = "okay"; +}; + +&hdmi_phy { + mediatek,ibias = <0xa>; + mediatek,ibias_up = <0x1c>; + status = "okay"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; diff --git a/arch/arm/boot/dts/mt7623n-rfb-emmc.dts b/arch/arm/boot/dts/mt7623n-rfb-emmc.dts index b7606130ade9..3e5911d8d6bc 100644 --- a/arch/arm/boot/dts/mt7623n-rfb-emmc.dts +++ b/arch/arm/boot/dts/mt7623n-rfb-emmc.dts @@ -24,6 +24,19 @@ stdout-path = "serial2:115200n8"; }; + connector { + compatible = "hdmi-connector"; + label = "hdmi"; + type = "d"; + ddc-i2c-bus = <&hdmiddc0>; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi0_out>; + }; + }; + }; + cpus { cpu@0 { proc-supply = <&mt6323_vproc_reg>; @@ -106,10 +119,24 @@ }; }; +&bls { + status = "okay"; + + port { + bls_out: endpoint { + remote-endpoint = <&dpi0_in>; + }; + }; +}; + &btif { status = "okay"; }; +&cec { + status = "okay"; +}; + &cir { pinctrl-names = "default"; pinctrl-0 = <&cir_pins_a>; @@ -120,6 +147,28 @@ status = "okay"; }; +&dpi0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + dpi0_out: endpoint { + remote-endpoint = <&hdmi0_in>; + }; + }; + + port@1 { + reg = <1>; + dpi0_in: endpoint { + remote-endpoint = <&bls_out>; + }; + }; + }; +}; + ð { status = "okay"; @@ -202,6 +251,42 @@ }; }; +&hdmi0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_pins_a>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + hdmi0_in: endpoint { + remote-endpoint = <&dpi0_out>; + }; + }; + + port@1 { + reg = <1>; + hdmi0_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; +}; + +&hdmiddc0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_ddc_pins_a>; + status = "okay"; +}; + +&hdmi_phy { + mediatek,ibias = <0xa>; + mediatek,ibias_up = <0x1c>; + status = "okay"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; From patchwork Tue Apr 16 14:58:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10904653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5745922 for ; Wed, 17 Apr 2019 07:03:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F373284FC for ; Wed, 17 Apr 2019 07:03:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 824CD28699; Wed, 17 Apr 2019 07:03:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C54D9284FC for ; Wed, 17 Apr 2019 07:03:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9874589DA6; Wed, 17 Apr 2019 07:03:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9BBF089E36 for ; Tue, 16 Apr 2019 15:00:10 +0000 (UTC) X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MCwbX-1h7qxh0exv-009fzp; Tue, 16 Apr 2019 16:59:10 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 3/4] drm/mediatek: fix boot up for 720 and 480 but 1080 Date: Tue, 16 Apr 2019 16:58:47 +0200 Message-Id: <20190416145848.11932-4-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:PiJgWiG+Mo0uMUDwX8rwuLcYg4MxdatLBtp4pICKQlJHr2Nhy2T T75TERfqyQkmhcL4Wz6tnIJ5JYuJgNoc+hpit4D33Rh6xcvtyODJUfViYejgx3O1xSGcJXs xSIRqq67asWYV61vY+hp+pW1S0LtdVOr9xX9e1c8UrNcMh7lTjoQI9R/jkiIDGRHJ1psbY/ dE0Pc/BS2OxQt7q8WFNmg== X-UI-Out-Filterresults: notjunk:1;V03:K0:gdUGEW4INsw=:dIPi0TF04leMtAK5KC/cBr +rpCeJs7tcDAPLKsgOP5r4iP7wJS0brLeb0C8eYtgaoXbkgQvf/UfkAjw1pQ2ruCtgsEJE888 K11is0HPzpTRUHZqB1dNFN+rHJBeb9xUIEUo4/37vvBr92u5QY8sQegqjI/3RiecAfQm1pXyh I8FZ2/wb6GIqEHnYMIcIFvK+YNF7hvFUkXBujBje6h3VX5eNADUZ/P9BdGpq+ES21+5eHUmZj ycc5CJEoiY4cxJXwSSEgexcf9nZ2fAVTTbGmuCLV8tyQyJcncCn3tVF64Uyr2UAlnPy9jhavm em+qlq/tVl238Y3mdHD+GapQiHmkFbsafYTeSDcP00uAoMXOB4mHnK+8gjB7q3eJOy9+CxiWe TG4TMAWsvKZLKOBz/6CDuC7Bt9ST9GqGzmp1WJV1y7cit97GmMq+CTd+i8hdteL2+SsUViS9W r+FUP9+Xq/Du/U6NTGOkaPQOck3Z7KGg0gpZ/+4DHU3jbgjRrVgEblDC5YiriakrzLyQAJ+fO yxwcawASedZHHHVBidJFOBPnWq5IT/8IHf6K5ZdNrG+XqJ6sUcY1QYyBUG7KmON/eCxKhs2kc l5UNSNocuZRxbSkrKqxiaUX/+SqRdvQw/27MOZREVdyHlpuUH4IZ33qhu+SP3yxSMLBF3bFja p3aS/qdnr02Jjsohu4Kd8YByB4yUMhdwLF6Y4sNI/AMMDwBsT/Nk9Ck9crtNHsOHsXFQI5ZhA pIIOh6qrjLxVjYl8n9RTjeKum/fpTtkA75xpIgeXixkOPZ3XHt6T0YaY0DwBmw2Pvz48VQkCE nksMYjkQ+IoTGhxDb1ty11pHb1XixlIHfoZ3sWhbYGQOuZHAITXkPIHrAdZDs5v0HVBxqg3nJ XckjoaMvrfPsqHeesZ/WOzqf3DeD4qpboDnws05XjEdL3VmgRaqBHg381QLsXY X-Mailman-Approved-At: Wed, 17 Apr 2019 07:03:29 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555426750; bh=V+zaO1oNND4YPt599ysKBo3HAApCHzDDfia1P8jPJ5Y=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=fqpCQmYRC4IViathwE3LSgtixwoUFESenPT9Wu59Ka/0cIl950PXx7JjRxH62ZNlx c8dKpBn0g2pUPdqWznDaw/vbA9oTRR8Hoy3qCMjl33j6gZXUjk2IhiYhVecoYY8KL/ AuFVnpvNySOamTCbc7EQ6TbUneSlZO6V3CT3ePUk= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: chunhui dai - 1080 plg in/out with ng/ok - support other resolutions like 1280x1024 Signed-off-by: chunhui dai Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich --- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 3 +++ drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 + drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 + 3 files changed, 5 insertions(+) -- 2.17.1 diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c index 5223498502c4..edadb7a700f1 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c @@ -184,6 +184,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) return PTR_ERR(phy_provider); } + if (hdmi_phy->conf->pll_default_off) + hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); + return of_clk_add_provider(dev->of_node, of_clk_src_simple_get, hdmi_phy->pll); } diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h index 2d8b3182470d..f472fdeb63dc 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h @@ -22,6 +22,7 @@ struct mtk_hdmi_phy; struct mtk_hdmi_phy_conf { bool tz_disabled; unsigned long flags; + bool pll_default_off; const struct clk_ops *hdmi_phy_clk_ops; void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy); diff --git a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c index d3cc4022e988..6fbedacfc1e8 100644 --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c @@ -239,6 +239,7 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { .tz_disabled = true, .flags = CLK_SET_RATE_GATE, + .pll_default_off = true, .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, .hdmi_phy_disable_tmds = mtk_hdmi_phy_disable_tmds, From patchwork Tue Apr 16 14:58:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10904693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CDE53922 for ; Wed, 17 Apr 2019 07:04:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B85312624D for ; Wed, 17 Apr 2019 07:04:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC2DE2872F; Wed, 17 Apr 2019 07:04:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 232D72624D for ; Wed, 17 Apr 2019 07:04:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8243689EF7; Wed, 17 Apr 2019 07:03:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E66F89E32 for ; Tue, 16 Apr 2019 15:00:10 +0000 (UTC) X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LsOsW-1grxln1gwy-01242I; Tue, 16 Apr 2019 16:59:11 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 4/4] drm/mediatek: fix possible_crtcs Date: Tue, 16 Apr 2019 16:58:48 +0200 Message-Id: <20190416145848.11932-5-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:9GPlP7IlVWKnFgYWpkxNnSyxoKqbdPAOhYPuzOGEhvtnm/dnvDc u0aZ6E09ZQ+c0lL/CBmKiBqESl128QUe38K6t0MlPeCuzA8eJMORcnnA2iNslAeyJ+0Z2lC I36MEpQImXtGi5bdpUsnPLatQQ8f2w+RitysYEOi3Q7SqESYkKXRwwvHzoL8heMo24QY9+D Fe0s0ddS+mVFkZU3RW9HQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:DkHhuo31RME=:aT6nZd241Pbf2Q68hLlW5Q 1sAycQMEUyvfRYBu4tlZaNvCtCuyAnZbrQQuyVX81aFSGpUquUUN6fRq4lAJT7jxJS3/hl2aA g5RNwVqDuHudo05/VFmXaanMGZyKwuNObCl3GxKV8NV9XTkse1pgh60qgWoPS+R5i8HhqF5Kf BwTMV/O8oLLr2NwMcW+bXaPfhrVKAddPONP92fUnKylRCyjME983xSEuiHUW/AhXv7Bh7e8yM 09t04hA8w6D8BNYRGegwiLNgbwwaDVEA9H2LcNLLruJt+wOtqg5aE2vFxd0KFpD4HV/30uTBk qiVYr0qL2pyrZoFVrE2Gu2UufFua6WflqO0TYtmh5fV9N8c7ppXTSHY64QsFf5LETAR3ViORq FVoO0l+tIZwcub6ou0AyT4jr+t8cO41us/x5CpIhYHb5R5N4Kt2Imnmpk0cKXVHlKY1p35Fit s19b+9kgE2x6nJM/8TnlzVYYYMnBlObiQf8b3+hNy5wtnS7KHuliRKgBFH0wGwIRz2EtUZ1ZP FQo8o5f51FhsuaG6ZWnhP0kmRjzkSkcsWBQF9LDGQ2Ruy0b0Qh6nvFWrApGQ26AJ+MgdNNtWe +/axL6j6a6WYY7De1RV6bmP/015ZRIwi7xaRF8FnNFdeG4jqQpEhqSX5IYYyTcSMPtzvX0nCC e6isWms/iHqothv3VHKqBYZLfD45U5agN+H8uT4i7fJB4aIedctt7F7FQIkIC/rVJs7V8i3ql 8L8hXJJVQfzfIOvshcrnMMdjr/v/gxp9wxyXogrdSPTVPI08xgxZgxNtmSC9u3W4GX/5GjVKo 0kBLVvAPwyCWV6CtN2g17Db0kbiaS3IayyPYoI6i7xKEzbym9xiUVcIv1Va60FUod0bQEw+3P BVnZ3htBKHknyboSs6oIl+Oy8AHyuRrI63jYsOAq8heGlSLETeZNJGk+Pfxvdm X-Mailman-Approved-At: Wed, 17 Apr 2019 07:03:29 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555426751; bh=Y8YBUeQRMwzr7J9CrhokVN2JmnDLZgiR6/FvJ8s0awA=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=hFSnZtrhJMFyrkK+OSxZKbZteH751XTq6PflO4v0YcuSASZUH2TtO0xLW287EFMMn rTdbm8p8VlG45xwHNIvqRb8fiDOUv0Srpt4y7QXORrv0uQxqPUOwTkAhKyw4ImRLMW yAnOlcvey2JUxg6r48gBmZxZawsKBabbuuxQtiV0= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Ryder Lee without this patch there is purple stretched font on fbconsole source: http://forum.banana-pi.org/t/kernel-4-19-rc1-for-testers/6618/52 Signed-off-by: Ryder Lee Tested-by: Frank Wunderlich --- drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 5d333138f913..c171b01f77e0 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -610,7 +610,7 @@ static int mtk_dpi_bind(struct device *dev, struct device *master, void *data) drm_encoder_helper_add(&dpi->encoder, &mtk_dpi_encoder_helper_funcs); /* Currently DPI0 is fixed to be driven by OVL1 */ - dpi->encoder.possible_crtcs = BIT(1); + dpi->encoder.possible_crtcs = BIT(0)|BIT(1); ret = drm_bridge_attach(&dpi->encoder, dpi->bridge, NULL); if (ret) {