Skip to content

Commit 48bfb13

Browse files
AngeloGioacchino Del RegnoChun-Kuang Hu
authored andcommitted
drm/mediatek: Add support for MT8195 Digital Parallel Interface
Add support for the DPI block found in the MT8195 and MT8188 SoCs. Inside of the SoC, this block is directly connected to the HDMI IP. Reviewed-by: CK Hu <[email protected]> Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent 473c33f commit 48bfb13

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

drivers/gpu/drm/mediatek/mtk_dpi.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,24 @@ static const struct mtk_dpi_conf mt8192_conf = {
11391139
.csc_enable_bit = CSC_ENABLE,
11401140
};
11411141

1142+
static const struct mtk_dpi_conf mt8195_conf = {
1143+
.max_clock_khz = 594000,
1144+
.output_fmts = mt8183_output_fmts,
1145+
.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
1146+
.pixels_per_iter = 1,
1147+
.is_ck_de_pol = true,
1148+
.swap_input_support = true,
1149+
.support_direct_pin = true,
1150+
.dimension_mask = HPW_MASK,
1151+
.hvsize_mask = HSIZE_MASK,
1152+
.channel_swap_shift = CH_SWAP,
1153+
.yuv422_en_bit = YUV422_EN,
1154+
.csc_enable_bit = CSC_ENABLE,
1155+
.input_2p_en_bit = DPI_INPUT_2P_EN,
1156+
.clocked_by_hdmi = true,
1157+
.output_1pixel = true,
1158+
};
1159+
11421160
static const struct mtk_dpi_conf mt8195_dpintf_conf = {
11431161
.dpi_factor = dpi_factor_mt8195_dp_intf,
11441162
.num_dpi_factor = ARRAY_SIZE(dpi_factor_mt8195_dp_intf),
@@ -1242,6 +1260,7 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
12421260
{ .compatible = "mediatek,mt8188-dp-intf", .data = &mt8195_dpintf_conf },
12431261
{ .compatible = "mediatek,mt8192-dpi", .data = &mt8192_conf },
12441262
{ .compatible = "mediatek,mt8195-dp-intf", .data = &mt8195_dpintf_conf },
1263+
{ .compatible = "mediatek,mt8195-dpi", .data = &mt8195_conf },
12451264
{ /* sentinel */ },
12461265
};
12471266
MODULE_DEVICE_TABLE(of, mtk_dpi_of_ids);

drivers/gpu/drm/mediatek/mtk_dpi_regs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
/* DPI_CON: DPI instances */
4545
#define DPI_OUTPUT_1T1P_EN BIT(24)
46+
#define DPI_INPUT_2P_EN BIT(25)
4647
/* DPI_CON: DPINTF instances */
4748
#define DPINTF_YUV422_EN BIT(24)
4849
#define DPINTF_CSC_ENABLE BIT(26)

drivers/gpu/drm/mediatek/mtk_drm_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
810810
.data = (void *)MTK_DPI },
811811
{ .compatible = "mediatek,mt8195-dp-intf",
812812
.data = (void *)MTK_DP_INTF },
813+
{ .compatible = "mediatek,mt8195-dpi",
814+
.data = (void *)MTK_DPI },
813815
{ .compatible = "mediatek,mt2701-dsi",
814816
.data = (void *)MTK_DSI },
815817
{ .compatible = "mediatek,mt8173-dsi",

0 commit comments

Comments
 (0)