| From c3063e0f8eb17a1f4f7999e000541b12af52c965 Mon Sep 17 00:00:00 2001 |
| From: Xinlei Lee <xinlei.lee@mediatek.com> |
| Date: Mon, 26 Sep 2022 15:43:11 +0800 |
| Subject: [PATCH] FROMLIST: drm: mediatek: Add mt8186 dpi compatibles and |
| platform data |
| |
| Add the compatible because use edge_cfg_in_mmsys in mt8186. |
| |
| Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com> |
| Reviewed-by: CK Hu <ck.hu@mediatek.com> |
| Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> |
| (am from https://patchwork.kernel.org/patch/12988331/) |
| (also found at https://lore.kernel.org/r/1664178191-27964-4-git-send-email-xinlei.lee@mediatek.com) |
| |
| BUG=b:204222699 |
| TEST=emerge-corsola sys-kernel/chromeos-kernel-5_15 |
| UPSTREAM-TASK=b:249194989 |
| |
| Signed-off-by: Allen-kh Cheng <allen-kh.cheng@mediatek.corp-partner.google.com> |
| Change-Id: I2735e8589cfd67c4b7b45e806410277af7804db6 |
| Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3921079 |
| Reviewed-by: Sean Paul <sean@poorly.run> |
| Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org> |
| Commit-Queue: Hsin-Yi Wang <hsinyi@chromium.org> |
| --- |
| drivers/gpu/drm/mediatek/mtk_dpi.c | 20 ++++++++++++++++++++ |
| drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ |
| 2 files changed, 22 insertions(+) |
| |
| diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c |
| index 00f7b9112466cf40e74b45bfe0ce894695eeb7a4..d314366ecc9c36d0e2f63707e1b59e426023eb5a 100644 |
| --- a/drivers/gpu/drm/mediatek/mtk_dpi.c |
| +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c |
| @@ -954,6 +954,24 @@ static const struct mtk_dpi_conf mt8188_dpintf_conf = { |
| .csc_enable_bit = DPINTF_CSC_ENABLE, |
| }; |
| |
| +static const struct mtk_dpi_conf mt8186_conf = { |
| + .cal_factor = mt8183_calculate_factor, |
| + .reg_h_fre_con = 0xe0, |
| + .max_clock_khz = 150000, |
| + .output_fmts = mt8183_output_fmts, |
| + .num_output_fmts = ARRAY_SIZE(mt8183_output_fmts), |
| + .edge_cfg_in_mmsys = true, |
| + .pixels_per_iter = 1, |
| + .is_ck_de_pol = true, |
| + .swap_input_support = true, |
| + .support_direct_pin = true, |
| + .dimension_mask = HPW_MASK, |
| + .hvsize_mask = HSIZE_MASK, |
| + .channel_swap_shift = CH_SWAP, |
| + .yuv422_en_bit = YUV422_EN, |
| + .csc_enable_bit = CSC_ENABLE, |
| +}; |
| + |
| static const struct mtk_dpi_conf mt8192_conf = { |
| .cal_factor = mt8183_calculate_factor, |
| .reg_h_fre_con = 0xe0, |
| @@ -1106,6 +1124,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { |
| }, |
| { .compatible = "mediatek,mt8188-dp-intf", |
| .data = &mt8188_dpintf_conf, |
| + }, |
| + { .compatible = "mediatek,mt8186-dpi", |
| + .data = &mt8186_conf, |
| }, |
| { .compatible = "mediatek,mt8192-dpi", |
| .data = &mt8192_conf, |
| diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c |
| index e6dfb04120d9f331dd4b3679d733a18173c17e44..22710ae28e275cf9a52582d6c797562329cae598 100644 |
| --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c |
| +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c |
| @@ -654,6 +654,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { |
| .data = (void *)MTK_DPI }, |
| { .compatible = "mediatek,mt8188-dp-intf", |
| .data = (void *)MTK_DP_INTF }, |
| + { .compatible = "mediatek,mt8186-dpi", |
| + .data = (void *)MTK_DPI }, |
| { .compatible = "mediatek,mt8192-dpi", |
| .data = (void *)MTK_DPI }, |
| { .compatible = "mediatek,mt8195-dp-intf", |
| -- |
| 2.39.0.314.g84b9a713c41-goog |
| |