Skip to content

Commit cb7adfd

Browse files
committed
Merge tag 'mediatek-drm-next-5.7' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next
Mediatek DRM Next for Linux 5.7 This include MT8183 DPI support. Signed-off-by: Dave Airlie <[email protected]> From: CK Hu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/1584580683.29614.5.camel@mtksdaap41
2 parents 0425393 + 93e97f7 commit cb7adfd

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ output bus.
77

88
Required properties:
99
- compatible: "mediatek,<chip>-dpi"
10+
the supported chips are mt2701 , mt8173 and mt8183.
1011
- reg: Physical base address and length of the controller's registers
1112
- interrupts: The interrupt signal from the function block.
1213
- clocks: device clocks

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5629,7 +5629,7 @@ F: include/uapi/drm/lima_drm.h
56295629
T: git git://anongit.freedesktop.org/drm/drm-misc
56305630

56315631
DRM DRIVERS FOR MEDIATEK
5632-
M: CK Hu <ck.hu@mediatek.com>
5632+
M: Chun-Kuang Hu <chunkuang.hu@kernel.org>
56335633
M: Philipp Zabel <[email protected]>
56345634
56355635
S: Supported

drivers/gpu/drm/mediatek/mtk_dpi.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,16 @@ static unsigned int mt2701_calculate_factor(int clock)
664664
return 1;
665665
}
666666

667+
static unsigned int mt8183_calculate_factor(int clock)
668+
{
669+
if (clock <= 27000)
670+
return 8;
671+
else if (clock <= 167000)
672+
return 4;
673+
else
674+
return 2;
675+
}
676+
667677
static const struct mtk_dpi_conf mt8173_conf = {
668678
.cal_factor = mt8173_calculate_factor,
669679
.reg_h_fre_con = 0xe0,
@@ -675,6 +685,11 @@ static const struct mtk_dpi_conf mt2701_conf = {
675685
.edge_sel_en = true,
676686
};
677687

688+
static const struct mtk_dpi_conf mt8183_conf = {
689+
.cal_factor = mt8183_calculate_factor,
690+
.reg_h_fre_con = 0xe0,
691+
};
692+
678693
static int mtk_dpi_probe(struct platform_device *pdev)
679694
{
680695
struct device *dev = &pdev->dev;
@@ -770,6 +785,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
770785
{ .compatible = "mediatek,mt8173-dpi",
771786
.data = &mt8173_conf,
772787
},
788+
{ .compatible = "mediatek,mt8183-dpi",
789+
.data = &mt8183_conf,
790+
},
773791
{ },
774792
};
775793

0 commit comments

Comments
 (0)