diff mbox series

[v3,1/5] drm: mediatek: add ddp routing for mt7623

Message ID 20200804105849.70876-2-linux@fw-web.de (mailing list archive)
State New, archived
Headers show
Series make hdmi work on bananapi-r2 | expand

Commit Message

Frank Wunderlich Aug. 4, 2020, 10:58 a.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>

on BPi-R2/mt7623 main-path have to be routed to DPI0 (hdmi) instead of DSI0
using compatible "mt7623-mmsys" already defined in dts

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 drivers/gpu/drm/mediatek/mtk_drm_drv.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

Comments

Chun-Kuang Hu Aug. 4, 2020, 2:34 p.m. UTC | #1
Hi, Frank:

Frank Wunderlich <linux@fw-web.de> 於 2020年8月4日 週二 下午7:00寫道:
>
> From: Frank Wunderlich <frank-w@public-files.de>
>
> on BPi-R2/mt7623 main-path have to be routed to DPI0 (hdmi) instead of DSI0
> using compatible "mt7623-mmsys" already defined in dts
>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_drv.c | 25 ++++++++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> index 6bd369434d9d..9e418b83be48 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> @@ -74,7 +74,20 @@ static const enum mtk_ddp_comp_id mt2701_mtk_ddp_ext[] = {
>         DDP_COMPONENT_DPI0,
>  };
>
> -static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {
> +static const enum mtk_ddp_comp_id mt7623_mtk_ddp_main[] = {
> +       DDP_COMPONENT_OVL0,
> +       DDP_COMPONENT_RDMA0,
> +       DDP_COMPONENT_COLOR0,
> +       DDP_COMPONENT_BLS,
> +       DDP_COMPONENT_DPI0,
> +};
> +
> +static const enum mtk_ddp_comp_id mt7623_mtk_ddp_ext[] = {
> +       DDP_COMPONENT_RDMA1,
> +       DDP_COMPONENT_DSI0,
> +};
> +
> +static enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {

Why do you remove 'const'?

>         DDP_COMPONENT_OVL0,
>         DDP_COMPONENT_COLOR0,
>         DDP_COMPONENT_AAL0,
> @@ -127,6 +140,14 @@ static const struct mtk_mmsys_driver_data mt2701_mmsys_driver_data = {
>         .shadow_register = true,
>  };
>
> +static const struct mtk_mmsys_driver_data mt7623_mmsys_driver_data = {
> +       .main_path = mt7623_mtk_ddp_main,
> +       .main_len = ARRAY_SIZE(mt7623_mtk_ddp_main),
> +       .ext_path = mt7623_mtk_ddp_ext,
> +       .ext_len = ARRAY_SIZE(mt7623_mtk_ddp_ext),
> +       .shadow_register = true,
> +};
> +
>  static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = {
>         .main_path = mt2712_mtk_ddp_main,
>         .main_len = ARRAY_SIZE(mt2712_mtk_ddp_main),
> @@ -422,6 +443,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
>  static const struct of_device_id mtk_drm_of_ids[] = {
>         { .compatible = "mediatek,mt2701-mmsys",
>           .data = &mt2701_mmsys_driver_data},
> +       { .compatible = "mediatek,mt7623-mmsys",
> +         .data = &mt7623_mmsys_driver_data},
>         { .compatible = "mediatek,mt2712-mmsys",
>           .data = &mt2712_mmsys_driver_data},
>         { .compatible = "mediatek,mt8173-mmsys",
> --
> 2.25.1
>
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
Frank Wunderlich Aug. 4, 2020, 2:44 p.m. UTC | #2
Hi,

> Gesendet: Dienstag, 04. August 2020 um 16:34 Uhr
> Von: "Chun-Kuang Hu" <chunkuang.hu@kernel.org>

> > -static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {
> > +static enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {
>
> Why do you remove 'const'?

was removed by previous patch and not re-added (revert failed), sorry. will fix in next version, if all other is ok.

regards Frank
Chun-Kuang Hu Aug. 4, 2020, 3:01 p.m. UTC | #3
Frank Wunderlich <frank-w@public-files.de> 於 2020年8月4日 週二 下午10:44寫道:
>
> Hi,
>
> > Gesendet: Dienstag, 04. August 2020 um 16:34 Uhr
> > Von: "Chun-Kuang Hu" <chunkuang.hu@kernel.org>
>
> > > -static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {
> > > +static enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {
> >
> > Why do you remove 'const'?
>
> was removed by previous patch and not re-added (revert failed), sorry. will fix in next version, if all other is ok.

all other is ok.

Regards,
Chun-Kuang.

>
> regards Frank
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 6bd369434d9d..9e418b83be48 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -74,7 +74,20 @@  static const enum mtk_ddp_comp_id mt2701_mtk_ddp_ext[] = {
 	DDP_COMPONENT_DPI0,
 };
 
-static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {
+static const enum mtk_ddp_comp_id mt7623_mtk_ddp_main[] = {
+	DDP_COMPONENT_OVL0,
+	DDP_COMPONENT_RDMA0,
+	DDP_COMPONENT_COLOR0,
+	DDP_COMPONENT_BLS,
+	DDP_COMPONENT_DPI0,
+};
+
+static const enum mtk_ddp_comp_id mt7623_mtk_ddp_ext[] = {
+	DDP_COMPONENT_RDMA1,
+	DDP_COMPONENT_DSI0,
+};
+
+static enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = {
 	DDP_COMPONENT_OVL0,
 	DDP_COMPONENT_COLOR0,
 	DDP_COMPONENT_AAL0,
@@ -127,6 +140,14 @@  static const struct mtk_mmsys_driver_data mt2701_mmsys_driver_data = {
 	.shadow_register = true,
 };
 
+static const struct mtk_mmsys_driver_data mt7623_mmsys_driver_data = {
+	.main_path = mt7623_mtk_ddp_main,
+	.main_len = ARRAY_SIZE(mt7623_mtk_ddp_main),
+	.ext_path = mt7623_mtk_ddp_ext,
+	.ext_len = ARRAY_SIZE(mt7623_mtk_ddp_ext),
+	.shadow_register = true,
+};
+
 static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = {
 	.main_path = mt2712_mtk_ddp_main,
 	.main_len = ARRAY_SIZE(mt2712_mtk_ddp_main),
@@ -422,6 +443,8 @@  static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
 static const struct of_device_id mtk_drm_of_ids[] = {
 	{ .compatible = "mediatek,mt2701-mmsys",
 	  .data = &mt2701_mmsys_driver_data},
+	{ .compatible = "mediatek,mt7623-mmsys",
+	  .data = &mt7623_mmsys_driver_data},
 	{ .compatible = "mediatek,mt2712-mmsys",
 	  .data = &mt2712_mmsys_driver_data},
 	{ .compatible = "mediatek,mt8173-mmsys",