From a4a417ac829d081fe65e11dc91516f411a5b6655 Mon Sep 17 00:00:00 2001 From: Jitao Shi Date: Tue, 25 Feb 2020 17:40:52 +0800 Subject: [PATCH 1/3] dt-bindings: display: mediatek: update dpi supported chips Add descriptions about supported chips, including MT2701 & MT8173 & mt8183 Signed-off-by: Jitao Shi Reviewed-by: Rob Herring Signed-off-by: CK Hu --- .../devicetree/bindings/display/mediatek/mediatek,dpi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt index b6a7e7397b8b4..58914cf681b89 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt @@ -7,6 +7,7 @@ output bus. Required properties: - compatible: "mediatek,-dpi" + the supported chips are mt2701 , mt8173 and mt8183. - reg: Physical base address and length of the controller's registers - interrupts: The interrupt signal from the function block. - clocks: device clocks From b472094402f19d940fa447fd2bdcbb1fdf1e38c0 Mon Sep 17 00:00:00 2001 From: Jitao Shi Date: Tue, 25 Feb 2020 17:40:56 +0800 Subject: [PATCH 2/3] drm/mediatek: add mt8183 dpi clock factor The factor depends on the divider of DPI in MT8183, therefore, we should fix this factor to the right and new one. Signed-off-by: Jitao Shi Signed-off-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 01fa8b8d763d1..087f5ce732e18 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -664,6 +664,16 @@ static unsigned int mt2701_calculate_factor(int clock) return 1; } +static unsigned int mt8183_calculate_factor(int clock) +{ + if (clock <= 27000) + return 8; + else if (clock <= 167000) + return 4; + else + return 2; +} + static const struct mtk_dpi_conf mt8173_conf = { .cal_factor = mt8173_calculate_factor, .reg_h_fre_con = 0xe0, @@ -675,6 +685,11 @@ static const struct mtk_dpi_conf mt2701_conf = { .edge_sel_en = true, }; +static const struct mtk_dpi_conf mt8183_conf = { + .cal_factor = mt8183_calculate_factor, + .reg_h_fre_con = 0xe0, +}; + static int mtk_dpi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -770,6 +785,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { { .compatible = "mediatek,mt8173-dpi", .data = &mt8173_conf, }, + { .compatible = "mediatek,mt8183-dpi", + .data = &mt8183_conf, + }, { }, }; From 93e97f715b24114169d18654e09c646fd9e14979 Mon Sep 17 00:00:00 2001 From: Chun-Kuang Hu Date: Sun, 8 Mar 2020 12:52:01 +0800 Subject: [PATCH 3/3] MAINTAINERS: Update Chun-Kuang Hu's email address Update my email address to @kernel.org Signed-off-by: Chun-Kuang Hu Signed-off-by: CK Hu --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 38fe2f3f7b6f2..dceaeebce52a9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5607,7 +5607,7 @@ F: include/uapi/drm/lima_drm.h T: git git://anongit.freedesktop.org/drm/drm-misc DRM DRIVERS FOR MEDIATEK -M: CK Hu +M: Chun-Kuang Hu M: Philipp Zabel L: dri-devel@lists.freedesktop.org S: Supported