Skip to content

Commit

Permalink
Merge tag 'mediatek-drm-next-5.7' of https://github.com/ckhu-mediatek…
Browse files Browse the repository at this point in the history
…/linux.git-tags into drm-next

Mediatek DRM Next for Linux 5.7

This include MT8183 DPI support.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1584580683.29614.5.camel@mtksdaap41
  • Loading branch information
Dave Airlie committed Mar 20, 2020
2 parents 0425393 + 93e97f7 commit cb7adfd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ output bus.

Required properties:
- compatible: "mediatek,<chip>-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
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5629,7 +5629,7 @@ F: include/uapi/drm/lima_drm.h
T: git git://anongit.freedesktop.org/drm/drm-misc

DRM DRIVERS FOR MEDIATEK
M: CK Hu <ck.hu@mediatek.com>
M: Chun-Kuang Hu <chunkuang.hu@kernel.org>
M: Philipp Zabel <p.zabel@pengutronix.de>
L: dri-devel@lists.freedesktop.org
S: Supported
Expand Down
18 changes: 18 additions & 0 deletions drivers/gpu/drm/mediatek/mtk_dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -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,
},
{ },
};

Expand Down

0 comments on commit cb7adfd

Please sign in to comment.