Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp568039pxv; Fri, 9 Jul 2021 04:30:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxru+lOQD2N+dr1RbKrHCZ5jFG7LXTRPDzTQtis8BB/YuCqjc7WrILJElDetglw+V3MZohL X-Received: by 2002:a05:6402:64e:: with SMTP id u14mr8898039edx.122.1625830203381; Fri, 09 Jul 2021 04:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625830203; cv=none; d=google.com; s=arc-20160816; b=A5IULneoyqdyxEMJffmUYwr1bTqG5xuDvh70su/wUN7w7TaZwr71MbmNB86BNgXe2d /fEejuF9OLH8yrxT3rOyIr7/xO3h5LhtVGdZaeAF7m5fO9HmLpwEpc4u3IPRvMyFblgW 13WUlhwCNLTVADVwTOO0F6/1FdV8TL0H2vFLQGyT0P9X6bSupB2XfpqzU1eXei2Bq1vR A6GMl2voXoJ4AHZqaqKaOzRoFDBFzeIu9kyarmyF2oi+LzEFrNCdzbO0GEPc+xr4xjWP mN11rdBgfqMpnfpe4o+lh9jj4H4hOg1EalXmiYgu+Dw7Jqd5SpVhCYTh03ntz3BYN2uC JH8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :sensitivity:importance:date:subject:cc:to:from:message-id :mime-version:dkim-signature; bh=gt+XjDa9MhX9Q6aesGTCTsW0w4byz3lCCbTrJQoIx4k=; b=S9mq+tNdQPI8HUbe1kpm6lD899GpTcst5RB7e1rFf8ApuEeModUoePe+U+NExHezKe S4CaeT1mf6EKObncJf9hYvacKWwq1QAvA4WCLD+S7RduPX9+VxINrD0ZQKCrfrQGd0Ro 0HaSo5ZMYNpXFp6re4OqsVaVKqL+u5w8L2Ho7lYWR03ToOYvoga8DETdIKMtUf8cBEx+ zJKBTD75dwlMmxSqaLTTmfbxt8P0Q/GJ6yndCE8sVHdfiIr8fAAso+4AZ9BesvC3X8ap tSASdA5Tk4Mt6J7WNr9tRohB8vi2KEdAQlNN5Kcr2slB8M4FAoxz91L7eizkZ067Xn9s zl6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=aQKTUaB+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si6377095ejf.188.2021.07.09.04.29.38; Fri, 09 Jul 2021 04:30:03 -0700 (PDT) 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; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=aQKTUaB+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbhGILbb (ORCPT + 99 others); Fri, 9 Jul 2021 07:31:31 -0400 Received: from mout.gmx.net ([212.227.17.22]:60621 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbhGILba (ORCPT ); Fri, 9 Jul 2021 07:31:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1625830110; bh=j6rzl1T2VppWbP//akxXTOsnokNfQHS/1AZyiol3FiY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=aQKTUaB+t57AI1VLXEbZeO4kiHHBr4GyDifUjWrRqEuRN75IHjwEFyJhyZEI4BXYo B/TMplp2rMzI4g/4KcOYiIINMUTY38x/k0tXmxlKcx/yzZ6WlkuaByU9W3J/BIUFHe u2WsCau4I8xJXd+CFjNFzX1XA+ol/Mkxc52wC6HY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [80.245.72.148] ([80.245.72.148]) by web-mail.gmx.net (3c-app-gmx-bap43.server.lan [172.19.172.113]) (via HTTP); Fri, 9 Jul 2021 13:28:30 +0200 MIME-Version: 1.0 Message-ID: From: Frank Wunderlich To: Frank Wunderlich Cc: Enric Balletbo Serra , CK Hu , Dafna Hirschfeld , chunkuang Hu , Thomas Zimmermann , David Airlie , linux-kernel , Enric Balletbo i Serra , "moderated list:ARM/Mediatek SoC support" , dri-devel , Matthias Brugger , Collabora Kernel ML Subject: Aw: Re: Re: BUG: MTK DRM/HDMI broken on 5.13 (mt7623/bpi-r2) Content-Type: text/plain; charset=UTF-8 Date: Fri, 9 Jul 2021 13:28:30 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: <25d61873-38ae-5648-faab-03431b74f777@collabora.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:AhrRymJLG798R6GlUJTbNXqVLA1onupKDy3QLdwBQ5EYAo7ciyRAU2pghP2iI4fOpy0d3 HLJITFxviSNxFnviafc49JthpmaVeocjLJi2OqJHTilPAP0HeBFEz4Q2e5dp1RPLomdNw4hzaI3e zVrFI31RZ0abng4Rr5ke1nXgsyTNC9cHTAv03vpYk0I5sCtsX0K2mo06J7mv1C5u3tThGHPkpCpi KsWpqlFp7NtSfCph2QlCHSis9zn0C4lc3xgIk8n8HjOWZR+qyaM0LCdSW9I6GhKnK5KqDm5oVRcW tg= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:u/imABG7Iec=:u2nsH1ZpUrdBA+kERlefig JGl0qkxTikV9vr6rF1CNQmnX+KQWdMeSbOINRt4eobJDvdGVMOHJAWdemloYuj2An8Z5Bt1z/ y8odNW9trnqMqpHcg94RSyld8xW0TFZR1nWkGRcidcGDVQoEpaMGm8JJmPWJ/OlSQ7oBa0r0F fAW2YyVM5SmQ4gRtV35Tk/rj+lHnm97AsTezin5NIqD2Tpmhg2M+lxcRVpzDEriT1unulX/zg xCUPFqurpvbDGWUqbbJpr6lEBw1X4Py5pEaxNnM8XdoIYgHXti6knT4AYrssXKHjqwLs2SotK xvweXIg0kTpHGCXWfJbkR9en47rjLgC7VcttYlD/6m5o/JnA4djtsZQqnOhDNwP8ZV8y4FFH6 PUimzCdiV6jYCb6R2P0rkJ/10Qf2huYZOnNog8OyQ9HHzUWF410cqA5ZjQ5IVGX2gc3JSub6Q 7MXhA92e14Ik4EywTpPOA/LPHIcczUZLhPPEqZiPGJkkjw6Qg2WmbLrBQ7EXoXNDfhFbn2qnV EIwai2UnUPY6eyWEYKL1AIzYcfERPjWqTkAiWdiLFeE9T2crlh7E86kEVK7bN/DZtp8cPVZDN 6x7ueZs+JY0pB09SSKoqGQSIQmDqViH48oiiu17Z5a1BuOdg54v60WyLO4Ld0++6ZNsLlgBPt 5ICgzjtR0ycZBr8nbDaWii7QwpBi0k6O8+nJrT7l84U4At7DcXTHJnltNb6rqjEWYUZ0QAnr1 5rxJZMx/2Ca7Cr6bI4y73M5y1+FzKej00kqCkveVQinet4A9GhDEfntbW36VjE3VqTKgLFwyk cYN8gs6AtXlA9cVYZr3Zb9CDuyuDmhnHXyC+9f556eoCuNHCu0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Gesendet: Freitag, 09. Juli 2021 um 12:38 Uhr > Von: "Frank Wunderlich" > An: "Enric Balletbo Serra" > Cc: "CK Hu" , "Dafna Hirschfeld" , "chunkuang Hu" , "Thomas Zimmerman= n" , "David Airlie" , "linux-kernel= " , "Enric Balletbo i Serra" , "moderated list:ARM/Mediatek SoC support" , "dri-devel" , "Mat= thias Brugger" , "Collabora Kernel ML" > Betreff: Aw: Re: Re: BUG: MTK DRM/HDMI broken on 5.13 (mt7623/bpi-r2) > > > > Gesendet: Freitag, 09. Juli 2021 um 12:24 Uhr > > Von: "Enric Balletbo Serra" > > If this is the offending commit, could you try if the following patch > > fixes the issue for you? > > > > https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux.git= /commit/?h=3Dv5.13-next/fixes&id=3Ddb39994e0bd852c6612a9709e63c09b98b161e0= 0 > > > > If not, and that patch is the offending commit, it probably means that > > the default routing table doesn't work for mt7623. Needs a specific > > soc table. > > Hi Eric, > > thanks for response, but it does not fix the issue for me. hdmi on mt762= 3 is DPI not DSI. There is already a mt7623 specific routing-table defined= (one for DPI/HDMI and one for external=3DDSI/MIPI): > > https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/mediatek/= mtk_drm_drv.c#L74 > > maybe it can be included or compared with the "default" route? > > regards Frank Hi i tried to convert the old routing table into the new format diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-m= msys.c index 080660ef11bf..134dae13382f 100644 =2D-- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -20,6 +20,12 @@ static const struct mtk_mmsys_driver_data mt2701_mmsys_= driver_data =3D { .num_routes =3D ARRAY_SIZE(mmsys_default_routing_table), }; +static const struct mtk_mmsys_driver_data mt7623_mmsys_driver_data =3D { + .clk_driver =3D "clk-mt2701-mm", + .routes =3D mmsys_mt7623_routing_table, + .num_routes =3D ARRAY_SIZE(mmsys_mt7623_routing_table), +}; + static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data =3D { .clk_driver =3D "clk-mt2712-mm", .routes =3D mmsys_default_routing_table, @@ -133,6 +139,10 @@ static const struct of_device_id of_match_mtk_mmsys[]= =3D { .compatible =3D "mediatek,mt2701-mmsys", .data =3D &mt2701_mmsys_driver_data, }, + { + .compatible =3D "mediatek,mt7623-mmsys", + .data =3D &mt7623_mmsys_driver_data, + }, { .compatible =3D "mediatek,mt2712-mmsys", .data =3D &mt2712_mmsys_driver_data, diff --git a/drivers/soc/mediatek/mtk-mmsys.h b/drivers/soc/mediatek/mtk-m= msys.h index 11388961dded..fd397f68339c 100644 =2D-- a/drivers/soc/mediatek/mtk-mmsys.h +++ b/drivers/soc/mediatek/mtk-mmsys.h @@ -214,5 +214,14 @@ static const struct mtk_mmsys_routes mmsys_default_ro= uting_table[] =3D { DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, UFOE_MOUT_EN_DSI0, } }; - +static const struct mtk_mmsys_routes mmsys_mt7623_routing_table[] =3D { + //HDMI + { + DDP_COMPONENT_OVL0, DDP_COMPONENT_RDMA0, + DISP_REG_CONFIG_DISP_OVL_MOUT_EN, OVL_MOUT_EN_RDMA + }, { + DDP_COMPONENT_RDMA0, DDP_COMPONENT_DPI0, + DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN, RDMA0_SOUT_DPI0 + } +}; #endif /* __SOC_MEDIATEK_MTK_MMSYS_H */ :...skipping... diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-m= msys.c index 080660ef11bf..134dae13382f 100644 =2D-- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -20,6 +20,12 @@ static const struct mtk_mmsys_driver_data mt2701_mmsys_= driver_data =3D { .num_routes =3D ARRAY_SIZE(mmsys_default_routing_table), }; +static const struct mtk_mmsys_driver_data mt7623_mmsys_driver_data =3D { + .clk_driver =3D "clk-mt2701-mm",//leave clock as mt7623 is based o= n mt2701 + .routes =3D mmsys_mt7623_routing_table, + .num_routes =3D ARRAY_SIZE(mmsys_mt7623_routing_table), +}; + static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data =3D { .clk_driver =3D "clk-mt2712-mm", .routes =3D mmsys_default_routing_table, @@ -133,6 +139,10 @@ static const struct of_device_id of_match_mtk_mmsys[]= =3D { .compatible =3D "mediatek,mt2701-mmsys", .data =3D &mt2701_mmsys_driver_data, }, + { + .compatible =3D "mediatek,mt7623-mmsys", + .data =3D &mt7623_mmsys_driver_data, + }, { .compatible =3D "mediatek,mt2712-mmsys", .data =3D &mt2712_mmsys_driver_data, diff --git a/drivers/soc/mediatek/mtk-mmsys.h b/drivers/soc/mediatek/mtk-m= msys.h index 11388961dded..fd397f68339c 100644 =2D-- a/drivers/soc/mediatek/mtk-mmsys.h +++ b/drivers/soc/mediatek/mtk-mmsys.h @@ -214,5 +214,14 @@ static const struct mtk_mmsys_routes mmsys_default_ro= uting_table[] =3D { DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, UFOE_MOUT_EN_DSI0, } }; - +static const struct mtk_mmsys_routes mmsys_mt7623_routing_table[] =3D { + //HDMI + { + DDP_COMPONENT_OVL0, DDP_COMPONENT_RDMA0, + DISP_REG_CONFIG_DISP_OVL_MOUT_EN, OVL_MOUT_EN_RDMA + }, { + DDP_COMPONENT_RDMA0, DDP_COMPONENT_DPI0, + DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN, RDMA0_SOUT_DPI0 + } +}; here i've left out COLOR0 and BLS because i have not found the 3rd (addres= s) and 4th params (value) for the routing between them and edging componen= ts this is the old route: DDP_COMPONENT_OVL0, DDP_COMPONENT_RDMA0, DDP_COMPONENT_COLOR0, DDP_COMPONENT_BLS, DDP_COMPONENT_DPI0, so i guess i need: DISP_REG_CONFIG_DISP_RDMA0_MOUT_EN, RDMA0_MOUT_EN_COLOR0 DISP_REG_CONFIG_DISP_COLOR0_MOUT_EN, COLOR0_MOUT_EN_BLS DISP_REG_CONFIG_DISP_BLS_MOUT_EN, BLS_MOUT_EN_DPI0 thinking OUT is right for display...it's no HDMI-in but i'm unsure whats the difference between MOUT and SOUT compatible for mmsys is already set to mediatek,mt7623-mmsys in arch/arm/b= oot/dts/mt7623n.dtsi but it's not working, i guess because color0 and bls = are missing in route any hint how to add them? regards Frank