Skip to contentSkip to conversation

Add dpi compatibles and platform data for MT8188

PATCH In review [email protected] 3 participants 5 messages Oct 20, 2022 – Nov 23, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover Add dpi compatibles and platform data for MT8188

From: xinlei lee <[email protected]>

Rebase on linus/master v6.1-rc1.

change note:

v1: Modify variable name.

xinlei lee (2):
dt-bindings: display: mediatek: dpi: Add compatible for MediaTek

    MT8188

drm: mediatek: Add mt8188 dpi compatibles and platform data

 .../bindings/display/mediatek/mediatek,dpi.yaml         |  1 +
 drivers/gpu/drm/mediatek/mtk_dpi.c                      | 17 +++++++++++++++++
 drivers/gpu/drm/mediatek/mtk_drm_drv.c                  |  2 ++
 3 files changed, 20 insertions(+)
Signature · 1 line
2.6.4
#1 lore raw

PATCH v2 1/2 dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8188

From: xinlei lee <[email protected]>

For MT8188, the vdosys0 only supports 1T1P mode while the vdosys0 supports 2T1P mode in MT8195.

So we need to add dt-binding documentation of dpi for MediaTek MT8188 SoC.

---
 Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1 -0
index 5bb23e9..d976380 100644
@@ -23,6 +23,7 @@ properties:
       - mediatek,mt8173-dpi
       - mediatek,mt8183-dpi
       - mediatek,mt8186-dpi
+      - mediatek,mt8188-dp-intf
       - mediatek,mt8192-dpi
       - mediatek,mt8195-dp-intf
 
Signature · 1 line
2.6.4
Acked-by on v2 1/2
#2 lore raw

Re: [PATCH v2,1/2] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8188

Quoted 5 lines · On 20/10/2022 07:45, [email protected] wrote:

From: xinlei lee <[email protected]>

For MT8188, the vdosys0 only supports 1T1P mode while the vdosys0 supports 2T1P mode in MT8195.

So we need to add dt-binding documentation of dpi for MediaTek MT8188 SoC.

Best regards,
Krzysztof

#3 lore raw

PATCH v2 2/2 drm: mediatek: Add mt8188 dpi compatibles and platform data

In reply to [email protected]

From: xinlei lee <[email protected]>

For MT8188, the vdosys0 only supports 1T1P mode, so we need to add the compatible for mt8188 edp-intf.

---
 drivers/gpu/drm/mediatek/mtk_dpi.c     | 17 +++++++++++++++++
 drivers/gpu/drm/mediatek/mtk_drm_drv.c |  2 ++
 2 files changed, 19 insertions(+)
drivers/gpu/drm/mediatek/mtk_dpi.c +17 -0
index 508a6d9..02c2a00 100644
@@ -929,6 +929,20 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.csc_enable_bit = CSC_ENABLE,
 };
 
+static const struct mtk_dpi_conf mt8188_dpintf_conf = {
+	.cal_factor = mt8195_dpintf_calculate_factor,
+	.max_clock_khz = 600000,
+	.output_fmts = mt8195_output_fmts,
+	.num_output_fmts = ARRAY_SIZE(mt8195_output_fmts),
+	.pixels_per_iter = 4,
+	.input_2pixel = false,
+	.dimension_mask = DPINTF_HPW_MASK,
+	.hvsize_mask = DPINTF_HSIZE_MASK,
+	.channel_swap_shift = DPINTF_CH_SWAP,
+	.yuv422_en_bit = DPINTF_YUV422_EN,
+	.csc_enable_bit = DPINTF_CSC_ENABLE,
+};
+
 static const struct mtk_dpi_conf mt8192_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,
@@ -1079,6 +1093,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8188-dp-intf",
+	  .data = &mt8188_dpintf_conf,
+	},
 	{ .compatible = "mediatek,mt8192-dpi",
 	  .data = &mt8192_conf,
 	},
drivers/gpu/drm/mediatek/mtk_drm_drv.c +2 -0
index 91f58db..950bd04 100644
@@ -631,6 +631,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
 	  .data = (void *)MTK_DPI },
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = (void *)MTK_DPI },
+	{ .compatible = "mediatek,mt8188-dp-intf",
+	  .data = (void *)MTK_DP_INTF },
 	{ .compatible = "mediatek,mt8192-dpi",
 	  .data = (void *)MTK_DPI },
 	{ .compatible = "mediatek,mt8195-dp-intf",
Signature · 1 line
2.6.4
maintainer
#4 lore raw

Re: [PATCH v2,2/2] drm: mediatek: Add mt8188 dpi compatibles and platform data

Hi, Xinlei:

<[email protected]> 於 2022年10月20日 週四 晚上7:46寫道:

Quoted 4 lines

From: xinlei lee <[email protected]>

For MT8188, the vdosys0 only supports 1T1P mode, so we need to add the compatible for mt8188 edp-intf.

For this series, applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Quoted 58 lines
---
 drivers/gpu/drm/mediatek/mtk_dpi.c     | 17 +++++++++++++++++
 drivers/gpu/drm/mediatek/mtk_drm_drv.c |  2 ++
 2 files changed, 19 insertions(+)
drivers/gpu/drm/mediatek/mtk_dpi.c +17 -0
index 508a6d9..02c2a00 100644
@@ -929,6 +929,20 @@ static const struct mtk_dpi_conf mt8183_conf = {
        .csc_enable_bit = CSC_ENABLE,
 };
 
+static const struct mtk_dpi_conf mt8188_dpintf_conf = {
+       .cal_factor = mt8195_dpintf_calculate_factor,
+       .max_clock_khz = 600000,
+       .output_fmts = mt8195_output_fmts,
+       .num_output_fmts = ARRAY_SIZE(mt8195_output_fmts),
+       .pixels_per_iter = 4,
+       .input_2pixel = false,
+       .dimension_mask = DPINTF_HPW_MASK,
+       .hvsize_mask = DPINTF_HSIZE_MASK,
+       .channel_swap_shift = DPINTF_CH_SWAP,
+       .yuv422_en_bit = DPINTF_YUV422_EN,
+       .csc_enable_bit = DPINTF_CSC_ENABLE,
+};
+
 static const struct mtk_dpi_conf mt8192_conf = {
        .cal_factor = mt8183_calculate_factor,
        .reg_h_fre_con = 0xe0,
@@ -1079,6 +1093,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
        { .compatible = "mediatek,mt8183-dpi",
          .data = &mt8183_conf,
        },
+       { .compatible = "mediatek,mt8188-dp-intf",
+         .data = &mt8188_dpintf_conf,
+       },
        { .compatible = "mediatek,mt8192-dpi",
          .data = &mt8192_conf,
        },
drivers/gpu/drm/mediatek/mtk_drm_drv.c +2 -1
index 91f58db..950bd04 100644
@@ -631,6 +631,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
          .data = (void *)MTK_DPI },
        { .compatible = "mediatek,mt8183-dpi",
          .data = (void *)MTK_DPI },
+       { .compatible = "mediatek,mt8188-dp-intf",
+         .data = (void *)MTK_DP_INTF },
        { .compatible = "mediatek,mt8192-dpi",
          .data = (void *)MTK_DPI },
        { .compatible = "mediatek,mt8195-dp-intf",
--

2.6.4