Re: [PATCH] drm/mediatek: Add MT8188 Overlay Driver Data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 21/02/24 17:56, Justin Green ha scritto:
Add MT8188 overlay driver configuration data. This change consequently
enables 10-bit overlay support on MT8188 devices.

Tested by running ChromeOS UI on MT8188 and using modetest -P. AR30 and
BA30 overlays are confirmed to work from modetest.

Signed-off-by: Justin Green <greenjustin@xxxxxxxxxxxx>
Tested-by: Justin Green <greenjustin@xxxxxxxxxxxx>

Hello Justin,

I'm 99.9% sure that you don't need this, you can just use compatibles

compatible = "mediatek,mt8188-disp-ovl", "mediatek,mt8195-disp-ovl";

as they *are* indeed compatible, and MT8188 does support AFBC as well.

Cheers,
Angelo

---
  drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 13 +++++++++++++
  1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
index 2bffe4245466..696aabe124c2 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
@@ -635,6 +635,17 @@ static const struct mtk_disp_ovl_data mt8195_ovl_driver_data = {
  	.supports_clrfmt_ext = true,
  };
+static const struct mtk_disp_ovl_data mt8188_ovl_driver_data = {
+	.addr = DISP_REG_OVL_ADDR_MT8173,
+	.gmc_bits = 10,
+	.layer_nr = 4,
+	.fmt_rgb565_is_0 = true,
+	.smi_id_en = true,
+	.formats = mt8195_formats,
+	.num_formats = ARRAY_SIZE(mt8195_formats),
+	.supports_clrfmt_ext = true,
+};
+
  static const struct of_device_id mtk_disp_ovl_driver_dt_match[] = {
  	{ .compatible = "mediatek,mt2701-disp-ovl",
  	  .data = &mt2701_ovl_driver_data},
@@ -650,6 +661,8 @@ static const struct of_device_id mtk_disp_ovl_driver_dt_match[] = {
  	  .data = &mt8192_ovl_2l_driver_data},
  	{ .compatible = "mediatek,mt8195-disp-ovl",
  	  .data = &mt8195_ovl_driver_data},
+	{ .compatible = "mediatek,mt8188-disp-ovl",
+	  .data = &mt8188_ovl_driver_data},
  	{},
  };
  MODULE_DEVICE_TABLE(of, mtk_disp_ovl_driver_dt_match);




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux