All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Add check for max clock rate in mode_valid
@ 2021-02-08  1:42 ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: airlied, daniel, robh+dt, matthias.bgg, srv_heupstream,
	yingjoe.chen, eddie.huang, ck.hu, dri-devel, devicetree,
	stonea168, huijuan.xie, linux-kernel, linux-arm-kernel,
	linux-mediatek, shuijing.li, Jitao Shi

Changes since v2:
 - add const struct drm_display_info *info in mtk_dpi_bridge_mode_valid

Jitao Shi (3):
  drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  drm/mediatek: mtk_dpi: Add dpi config for mt8192
  dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi

 .../display/mediatek/mediatek,dpi.yaml        |  1 +
 drivers/gpu/drm/mediatek/mtk_dpi.c            | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+)

-- 
2.25.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v3 0/3] Add check for max clock rate in mode_valid
@ 2021-02-08  1:42 ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Changes since v2:
 - add const struct drm_display_info *info in mtk_dpi_bridge_mode_valid

Jitao Shi (3):
  drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  drm/mediatek: mtk_dpi: Add dpi config for mt8192
  dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi

 .../display/mediatek/mediatek,dpi.yaml        |  1 +
 drivers/gpu/drm/mediatek/mtk_dpi.c            | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+)

-- 
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v3 0/3] Add check for max clock rate in mode_valid
@ 2021-02-08  1:42 ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Changes since v2:
 - add const struct drm_display_info *info in mtk_dpi_bridge_mode_valid

Jitao Shi (3):
  drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  drm/mediatek: mtk_dpi: Add dpi config for mt8192
  dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi

 .../display/mediatek/mediatek,dpi.yaml        |  1 +
 drivers/gpu/drm/mediatek/mtk_dpi.c            | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+)

-- 
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v3 0/3] Add check for max clock rate in mode_valid
@ 2021-02-08  1:42 ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, robh+dt,
	linux-mediatek, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Changes since v2:
 - add const struct drm_display_info *info in mtk_dpi_bridge_mode_valid

Jitao Shi (3):
  drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  drm/mediatek: mtk_dpi: Add dpi config for mt8192
  dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi

 .../display/mediatek/mediatek,dpi.yaml        |  1 +
 drivers/gpu/drm/mediatek/mtk_dpi.c            | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+)

-- 
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  2021-02-08  1:42 ` Jitao Shi
  (?)
  (?)
@ 2021-02-08  1:42   ` Jitao Shi
  -1 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: airlied, daniel, robh+dt, matthias.bgg, srv_heupstream,
	yingjoe.chen, eddie.huang, ck.hu, dri-devel, devicetree,
	stonea168, huijuan.xie, linux-kernel, linux-arm-kernel,
	linux-mediatek, shuijing.li, Jitao Shi

Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 52f11a63a330..ffa4a0f1989f 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
 struct mtk_dpi_conf {
 	unsigned int (*cal_factor)(int clock);
 	u32 reg_h_fre_con;
+	u32 max_clock_khz;
 	bool edge_sel_en;
 };
 
@@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
 	mtk_dpi_set_display_mode(dpi, &dpi->mode);
 }
 
+static enum drm_mode_status
+mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
+			  const struct drm_display_mode *mode)
+{
+	struct mtk_dpi *dpi = bridge_to_dpi(bridge);
+
+	if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
 static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
 	.attach = mtk_dpi_bridge_attach,
 	.mode_set = mtk_dpi_bridge_mode_set,
+	.mode_valid = mtk_dpi_bridge_mode_valid,
 	.disable = mtk_dpi_bridge_disable,
 	.enable = mtk_dpi_bridge_enable,
 };
@@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
 static const struct mtk_dpi_conf mt8173_conf = {
 	.cal_factor = mt8173_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 300000,
 };
 
 static const struct mtk_dpi_conf mt2701_conf = {
 	.cal_factor = mt2701_calculate_factor,
 	.reg_h_fre_con = 0xb0,
 	.edge_sel_en = true,
+	.max_clock_khz = 150000,
 };
 
 static const struct mtk_dpi_conf mt8183_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 100000,
 };
 
 static int mtk_dpi_probe(struct platform_device *pdev)
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 52f11a63a330..ffa4a0f1989f 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
 struct mtk_dpi_conf {
 	unsigned int (*cal_factor)(int clock);
 	u32 reg_h_fre_con;
+	u32 max_clock_khz;
 	bool edge_sel_en;
 };
 
@@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
 	mtk_dpi_set_display_mode(dpi, &dpi->mode);
 }
 
+static enum drm_mode_status
+mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
+			  const struct drm_display_mode *mode)
+{
+	struct mtk_dpi *dpi = bridge_to_dpi(bridge);
+
+	if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
 static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
 	.attach = mtk_dpi_bridge_attach,
 	.mode_set = mtk_dpi_bridge_mode_set,
+	.mode_valid = mtk_dpi_bridge_mode_valid,
 	.disable = mtk_dpi_bridge_disable,
 	.enable = mtk_dpi_bridge_enable,
 };
@@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
 static const struct mtk_dpi_conf mt8173_conf = {
 	.cal_factor = mt8173_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 300000,
 };
 
 static const struct mtk_dpi_conf mt2701_conf = {
 	.cal_factor = mt2701_calculate_factor,
 	.reg_h_fre_con = 0xb0,
 	.edge_sel_en = true,
+	.max_clock_khz = 150000,
 };
 
 static const struct mtk_dpi_conf mt8183_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 100000,
 };
 
 static int mtk_dpi_probe(struct platform_device *pdev)
-- 
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 52f11a63a330..ffa4a0f1989f 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
 struct mtk_dpi_conf {
 	unsigned int (*cal_factor)(int clock);
 	u32 reg_h_fre_con;
+	u32 max_clock_khz;
 	bool edge_sel_en;
 };
 
@@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
 	mtk_dpi_set_display_mode(dpi, &dpi->mode);
 }
 
+static enum drm_mode_status
+mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
+			  const struct drm_display_mode *mode)
+{
+	struct mtk_dpi *dpi = bridge_to_dpi(bridge);
+
+	if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
 static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
 	.attach = mtk_dpi_bridge_attach,
 	.mode_set = mtk_dpi_bridge_mode_set,
+	.mode_valid = mtk_dpi_bridge_mode_valid,
 	.disable = mtk_dpi_bridge_disable,
 	.enable = mtk_dpi_bridge_enable,
 };
@@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
 static const struct mtk_dpi_conf mt8173_conf = {
 	.cal_factor = mt8173_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 300000,
 };
 
 static const struct mtk_dpi_conf mt2701_conf = {
 	.cal_factor = mt2701_calculate_factor,
 	.reg_h_fre_con = 0xb0,
 	.edge_sel_en = true,
+	.max_clock_khz = 150000,
 };
 
 static const struct mtk_dpi_conf mt8183_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 100000,
 };
 
 static int mtk_dpi_probe(struct platform_device *pdev)
-- 
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, robh+dt,
	linux-mediatek, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 52f11a63a330..ffa4a0f1989f 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
 struct mtk_dpi_conf {
 	unsigned int (*cal_factor)(int clock);
 	u32 reg_h_fre_con;
+	u32 max_clock_khz;
 	bool edge_sel_en;
 };
 
@@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
 	mtk_dpi_set_display_mode(dpi, &dpi->mode);
 }
 
+static enum drm_mode_status
+mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
+			  const struct drm_display_mode *mode)
+{
+	struct mtk_dpi *dpi = bridge_to_dpi(bridge);
+
+	if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
 static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
 	.attach = mtk_dpi_bridge_attach,
 	.mode_set = mtk_dpi_bridge_mode_set,
+	.mode_valid = mtk_dpi_bridge_mode_valid,
 	.disable = mtk_dpi_bridge_disable,
 	.enable = mtk_dpi_bridge_enable,
 };
@@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
 static const struct mtk_dpi_conf mt8173_conf = {
 	.cal_factor = mt8173_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 300000,
 };
 
 static const struct mtk_dpi_conf mt2701_conf = {
 	.cal_factor = mt2701_calculate_factor,
 	.reg_h_fre_con = 0xb0,
 	.edge_sel_en = true,
+	.max_clock_khz = 150000,
 };
 
 static const struct mtk_dpi_conf mt8183_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 100000,
 };
 
 static int mtk_dpi_probe(struct platform_device *pdev)
-- 
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
  2021-02-08  1:42 ` Jitao Shi
  (?)
  (?)
@ 2021-02-08  1:42   ` Jitao Shi
  -1 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: airlied, daniel, robh+dt, matthias.bgg, srv_heupstream,
	yingjoe.chen, eddie.huang, ck.hu, dri-devel, devicetree,
	stonea168, huijuan.xie, linux-kernel, linux-arm-kernel,
	linux-mediatek, shuijing.li, Jitao Shi

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index ffa4a0f1989f..f6f71eb67ff1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.max_clock_khz = 100000,
 };
 
+static const struct mtk_dpi_conf mt8192_conf = {
+	.cal_factor = mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+};
+
 static int mtk_dpi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8192-dpi",
+	  .data = &mt8192_conf,
+	},
 	{ },
 };
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index ffa4a0f1989f..f6f71eb67ff1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.max_clock_khz = 100000,
 };
 
+static const struct mtk_dpi_conf mt8192_conf = {
+	.cal_factor = mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+};
+
 static int mtk_dpi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8192-dpi",
+	  .data = &mt8192_conf,
+	},
 	{ },
 };
 
-- 
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index ffa4a0f1989f..f6f71eb67ff1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.max_clock_khz = 100000,
 };
 
+static const struct mtk_dpi_conf mt8192_conf = {
+	.cal_factor = mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+};
+
 static int mtk_dpi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8192-dpi",
+	  .data = &mt8192_conf,
+	},
 	{ },
 };
 
-- 
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, robh+dt,
	linux-mediatek, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index ffa4a0f1989f..f6f71eb67ff1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.max_clock_khz = 100000,
 };
 
+static const struct mtk_dpi_conf mt8192_conf = {
+	.cal_factor = mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+};
+
 static int mtk_dpi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8192-dpi",
+	  .data = &mt8192_conf,
+	},
 	{ },
 };
 
-- 
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
  2021-02-08  1:42 ` Jitao Shi
  (?)
  (?)
@ 2021-02-08  1:42   ` Jitao Shi
  -1 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: airlied, daniel, robh+dt, matthias.bgg, srv_heupstream,
	yingjoe.chen, eddie.huang, ck.hu, dri-devel, devicetree,
	stonea168, huijuan.xie, linux-kernel, linux-arm-kernel,
	linux-mediatek, shuijing.li, Jitao Shi

Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
index 6cdb734c91a9..2f566f19e6e0 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
@@ -22,6 +22,7 @@ properties:
       - mediatek,mt7623-dpi
       - mediatek,mt8173-dpi
       - mediatek,mt8183-dpi
+      - mediatek,mt8192-dpi
 
   reg:
     maxItems: 1
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
index 6cdb734c91a9..2f566f19e6e0 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
@@ -22,6 +22,7 @@ properties:
       - mediatek,mt7623-dpi
       - mediatek,mt8173-dpi
       - mediatek,mt8183-dpi
+      - mediatek,mt8192-dpi
 
   reg:
     maxItems: 1
-- 
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, ck.hu, robh+dt,
	linux-mediatek, daniel, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
index 6cdb734c91a9..2f566f19e6e0 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
@@ -22,6 +22,7 @@ properties:
       - mediatek,mt7623-dpi
       - mediatek,mt8173-dpi
       - mediatek,mt8183-dpi
+      - mediatek,mt8192-dpi
 
   reg:
     maxItems: 1
-- 
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
@ 2021-02-08  1:42   ` Jitao Shi
  0 siblings, 0 replies; 42+ messages in thread
From: Jitao Shi @ 2021-02-08  1:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: devicetree, Jitao Shi, srv_heupstream, shuijing.li, airlied,
	huijuan.xie, stonea168, linux-kernel, dri-devel, robh+dt,
	linux-mediatek, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
index 6cdb734c91a9..2f566f19e6e0 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
@@ -22,6 +22,7 @@ properties:
       - mediatek,mt7623-dpi
       - mediatek,mt8173-dpi
       - mediatek,mt8183-dpi
+      - mediatek,mt8192-dpi
 
   reg:
     maxItems: 1
-- 
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
  2021-02-08  1:42   ` Jitao Shi
  (?)
  (?)
@ 2021-02-09  0:08     ` Chun-Kuang Hu
  -1 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:08 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Daniel Vetter,
	Rob Herring, Matthias Brugger, srv_heupstream, yingjoe.chen,
	eddie.huang, CK Hu, DRI Development, DTML, stonea168,
	huijuan.xie, linux-kernel, Linux ARM,
	moderated list:ARM/Mediatek SoC support, shuijing.li

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
>

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> index 6cdb734c91a9..2f566f19e6e0 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> @@ -22,6 +22,7 @@ properties:
>        - mediatek,mt7623-dpi
>        - mediatek,mt8173-dpi
>        - mediatek,mt8183-dpi
> +      - mediatek,mt8192-dpi
>
>    reg:
>      maxItems: 1
> --
> 2.25.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi
@ 2021-02-09  0:08     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:08 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, srv_heupstream, DTML, David Airlie,
	huijuan.xie, stonea168, linux-kernel, DRI Development, CK Hu,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Daniel Vetter, shuijing.li, Matthias Brugger, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
>

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> index 6cdb734c91a9..2f566f19e6e0 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> @@ -22,6 +22,7 @@ properties:
>        - mediatek,mt7623-dpi
>        - mediatek,mt8173-dpi
>        - mediatek,mt8183-dpi
> +      - mediatek,mt8192-dpi
>
>    reg:
>      maxItems: 1
> --
> 2.25.1

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi
@ 2021-02-09  0:08     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:08 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, srv_heupstream, DTML, David Airlie,
	huijuan.xie, stonea168, linux-kernel, DRI Development, CK Hu,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Daniel Vetter, shuijing.li, Matthias Brugger, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
>

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> index 6cdb734c91a9..2f566f19e6e0 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> @@ -22,6 +22,7 @@ properties:
>        - mediatek,mt7623-dpi
>        - mediatek,mt8173-dpi
>        - mediatek,mt8183-dpi
> +      - mediatek,mt8192-dpi
>
>    reg:
>      maxItems: 1
> --
> 2.25.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi
@ 2021-02-09  0:08     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:08 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, srv_heupstream, DTML, David Airlie, huijuan.xie,
	stonea168, linux-kernel, DRI Development, Rob Herring,
	moderated list:ARM/Mediatek SoC support, shuijing.li,
	Matthias Brugger, yingjoe.chen, eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
>

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> index 6cdb734c91a9..2f566f19e6e0 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> @@ -22,6 +22,7 @@ properties:
>        - mediatek,mt7623-dpi
>        - mediatek,mt8173-dpi
>        - mediatek,mt8183-dpi
> +      - mediatek,mt8192-dpi
>
>    reg:
>      maxItems: 1
> --
> 2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  2021-02-08  1:42   ` Jitao Shi
  (?)
  (?)
@ 2021-02-09  0:13     ` Chun-Kuang Hu
  -1 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:13 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Daniel Vetter,
	Rob Herring, Matthias Brugger, srv_heupstream, yingjoe.chen,
	eddie.huang, CK Hu, DRI Development, DTML, stonea168,
	huijuan.xie, linux-kernel, Linux ARM,
	moderated list:ARM/Mediatek SoC support, shuijing.li

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-09  0:13     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:13 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, srv_heupstream, DTML, David Airlie,
	huijuan.xie, stonea168, linux-kernel, DRI Development, CK Hu,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Daniel Vetter, shuijing.li, Matthias Brugger, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-09  0:13     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:13 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, srv_heupstream, DTML, David Airlie,
	huijuan.xie, stonea168, linux-kernel, DRI Development, CK Hu,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Daniel Vetter, shuijing.li, Matthias Brugger, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-09  0:13     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:13 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, srv_heupstream, DTML, David Airlie, huijuan.xie,
	stonea168, linux-kernel, DRI Development, Rob Herring,
	moderated list:ARM/Mediatek SoC support, shuijing.li,
	Matthias Brugger, yingjoe.chen, eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
  2021-02-08  1:42   ` Jitao Shi
  (?)
  (?)
@ 2021-02-09  0:14     ` Chun-Kuang Hu
  -1 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:14 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Daniel Vetter,
	Rob Herring, Matthias Brugger, srv_heupstream, yingjoe.chen,
	eddie.huang, CK Hu, DRI Development, DTML, stonea168,
	huijuan.xie, linux-kernel, Linux ARM,
	moderated list:ARM/Mediatek SoC support, shuijing.li

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:

Where is the description? Say something here.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index ffa4a0f1989f..f6f71eb67ff1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
>         .max_clock_khz = 100000,
>  };
>
> +static const struct mtk_dpi_conf mt8192_conf = {
> +       .cal_factor = mt8183_calculate_factor,
> +       .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 150000,
> +};
> +
>  static int mtk_dpi_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> @@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
>         { .compatible = "mediatek,mt8183-dpi",
>           .data = &mt8183_conf,
>         },
> +       { .compatible = "mediatek,mt8192-dpi",
> +         .data = &mt8192_conf,
> +       },
>         { },
>  };
>
> --
> 2.25.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
@ 2021-02-09  0:14     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:14 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, srv_heupstream, DTML, David Airlie,
	huijuan.xie, stonea168, linux-kernel, DRI Development, CK Hu,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Daniel Vetter, shuijing.li, Matthias Brugger, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:

Where is the description? Say something here.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index ffa4a0f1989f..f6f71eb67ff1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
>         .max_clock_khz = 100000,
>  };
>
> +static const struct mtk_dpi_conf mt8192_conf = {
> +       .cal_factor = mt8183_calculate_factor,
> +       .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 150000,
> +};
> +
>  static int mtk_dpi_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> @@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
>         { .compatible = "mediatek,mt8183-dpi",
>           .data = &mt8183_conf,
>         },
> +       { .compatible = "mediatek,mt8192-dpi",
> +         .data = &mt8192_conf,
> +       },
>         { },
>  };
>
> --
> 2.25.1

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
@ 2021-02-09  0:14     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:14 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, Philipp Zabel, srv_heupstream, DTML, David Airlie,
	huijuan.xie, stonea168, linux-kernel, DRI Development, CK Hu,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Daniel Vetter, shuijing.li, Matthias Brugger, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:

Where is the description? Say something here.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index ffa4a0f1989f..f6f71eb67ff1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
>         .max_clock_khz = 100000,
>  };
>
> +static const struct mtk_dpi_conf mt8192_conf = {
> +       .cal_factor = mt8183_calculate_factor,
> +       .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 150000,
> +};
> +
>  static int mtk_dpi_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> @@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
>         { .compatible = "mediatek,mt8183-dpi",
>           .data = &mt8183_conf,
>         },
> +       { .compatible = "mediatek,mt8192-dpi",
> +         .data = &mt8192_conf,
> +       },
>         { },
>  };
>
> --
> 2.25.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192
@ 2021-02-09  0:14     ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-02-09  0:14 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Chun-Kuang Hu, srv_heupstream, DTML, David Airlie, huijuan.xie,
	stonea168, linux-kernel, DRI Development, Rob Herring,
	moderated list:ARM/Mediatek SoC support, shuijing.li,
	Matthias Brugger, yingjoe.chen, eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月8日 週一 上午9:42寫道:

Where is the description? Say something here.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index ffa4a0f1989f..f6f71eb67ff1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -703,6 +703,12 @@ static const struct mtk_dpi_conf mt8183_conf = {
>         .max_clock_khz = 100000,
>  };
>
> +static const struct mtk_dpi_conf mt8192_conf = {
> +       .cal_factor = mt8183_calculate_factor,
> +       .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 150000,
> +};
> +
>  static int mtk_dpi_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> @@ -837,6 +843,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
>         { .compatible = "mediatek,mt8183-dpi",
>           .data = &mt8183_conf,
>         },
> +       { .compatible = "mediatek,mt8192-dpi",
> +         .data = &mt8192_conf,
> +       },
>         { },
>  };
>
> --
> 2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  2021-02-08  1:42   ` Jitao Shi
@ 2021-02-09 22:57     ` kernel test robot
  -1 siblings, 0 replies; 42+ messages in thread
From: kernel test robot @ 2021-02-09 22:57 UTC (permalink / raw)
  To: Jitao Shi, Chun-Kuang Hu, Philipp Zabel
  Cc: kbuild-all, clang-built-linux, devicetree, Jitao Shi,
	srv_heupstream, shuijing.li, airlied, huijuan.xie, stonea168,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2626 bytes --]

Hi Jitao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on pza/reset/next linux/master linus/master v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jitao-Shi/Add-check-for-max-clock-rate-in-mode_valid/20210208-094340
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-randconfig-r023-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/7036ee290c5a384eeaa0b45d739a8b024235671d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jitao-Shi/Add-check-for-max-clock-rate-in-mode_valid/20210208-094340
        git checkout 7036ee290c5a384eeaa0b45d739a8b024235671d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/mediatek/mtk_dpi.c:574:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' with an expression of type 'enum drm_mode_status (struct drm_bridge *, const struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types]
           .mode_valid = mtk_dpi_bridge_mode_valid,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +574 drivers/gpu/drm/mediatek/mtk_dpi.c

   570	
   571	static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
   572		.attach = mtk_dpi_bridge_attach,
   573		.mode_set = mtk_dpi_bridge_mode_set,
 > 574		.mode_valid = mtk_dpi_bridge_mode_valid,
   575		.disable = mtk_dpi_bridge_disable,
   576		.enable = mtk_dpi_bridge_enable,
   577	};
   578	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42213 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-09 22:57     ` kernel test robot
  0 siblings, 0 replies; 42+ messages in thread
From: kernel test robot @ 2021-02-09 22:57 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2680 bytes --]

Hi Jitao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on pza/reset/next linux/master linus/master v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jitao-Shi/Add-check-for-max-clock-rate-in-mode_valid/20210208-094340
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-randconfig-r023-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/7036ee290c5a384eeaa0b45d739a8b024235671d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jitao-Shi/Add-check-for-max-clock-rate-in-mode_valid/20210208-094340
        git checkout 7036ee290c5a384eeaa0b45d739a8b024235671d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/mediatek/mtk_dpi.c:574:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' with an expression of type 'enum drm_mode_status (struct drm_bridge *, const struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types]
           .mode_valid = mtk_dpi_bridge_mode_valid,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +574 drivers/gpu/drm/mediatek/mtk_dpi.c

   570	
   571	static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
   572		.attach = mtk_dpi_bridge_attach,
   573		.mode_set = mtk_dpi_bridge_mode_set,
 > 574		.mode_valid = mtk_dpi_bridge_mode_valid,
   575		.disable = mtk_dpi_bridge_disable,
   576		.enable = mtk_dpi_bridge_enable,
   577	};
   578	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42213 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
  2021-02-08  1:42   ` Jitao Shi
  (?)
  (?)
@ 2021-02-10 20:18     ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2021-02-10 20:18 UTC (permalink / raw)
  To: Jitao Shi
  Cc: srv_heupstream, Philipp Zabel, robh+dt, linux-kernel,
	matthias.bgg, airlied, devicetree, yingjoe.chen, stonea168,
	huijuan.xie, linux-mediatek, Chun-Kuang Hu, eddie.huang,
	linux-arm-kernel, dri-devel, shuijing.li

On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> 
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
@ 2021-02-10 20:18     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2021-02-10 20:18 UTC (permalink / raw)
  To: Jitao Shi
  Cc: devicetree, srv_heupstream, Chun-Kuang Hu, airlied, huijuan.xie,
	stonea168, linux-kernel, dri-devel, shuijing.li, robh+dt,
	linux-mediatek, Philipp Zabel, matthias.bgg, yingjoe.chen,
	eddie.huang, linux-arm-kernel

On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> 
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
@ 2021-02-10 20:18     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2021-02-10 20:18 UTC (permalink / raw)
  To: Jitao Shi
  Cc: devicetree, srv_heupstream, Chun-Kuang Hu, airlied, huijuan.xie,
	stonea168, linux-kernel, dri-devel, shuijing.li, robh+dt,
	linux-mediatek, Philipp Zabel, matthias.bgg, yingjoe.chen,
	eddie.huang, linux-arm-kernel

On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> 
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
@ 2021-02-10 20:18     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2021-02-10 20:18 UTC (permalink / raw)
  To: Jitao Shi
  Cc: devicetree, srv_heupstream, Chun-Kuang Hu, airlied, huijuan.xie,
	stonea168, linux-kernel, dri-devel, shuijing.li, robh+dt,
	linux-mediatek, matthias.bgg, yingjoe.chen, eddie.huang,
	linux-arm-kernel

On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> 
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
  2021-02-08  1:42   ` Jitao Shi
  (?)
  (?)
@ 2021-02-13 14:34     ` Nicolas Boichat
  -1 siblings, 0 replies; 42+ messages in thread
From: Nicolas Boichat @ 2021-02-13 14:34 UTC (permalink / raw)
  To: Jitao Shi, Pi-Hsun Shih
  Cc: Chun-Kuang Hu, Philipp Zabel, Devicetree List, srv_heupstream,
	shuijing.li, David Airlie, huijuan.xie, stonea168, lkml,
	dri-devel, Rob Herring, moderated list:ARM/Mediatek SoC support,
	Matthias Brugger, Yingjoe Chen, Eddie Huang,
	linux-arm Mailing List

+Pi-Hsun Shih

On Mon, Feb 8, 2021 at 9:42 AM Jitao Shi <jitao.shi@mediatek.com> wrote:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.
>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>

I believe this patch (and the following) were actually authored by
Pi-Hsun: https://crrev.com/c/2628812 . Would be best to keep the
author information (unless I'm missing something of course).


> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-13 14:34     ` Nicolas Boichat
  0 siblings, 0 replies; 42+ messages in thread
From: Nicolas Boichat @ 2021-02-13 14:34 UTC (permalink / raw)
  To: Jitao Shi, Pi-Hsun Shih
  Cc: Chun-Kuang Hu, srv_heupstream, Devicetree List, David Airlie,
	huijuan.xie, stonea168, lkml, dri-devel, shuijing.li,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Philipp Zabel, Matthias Brugger, Yingjoe Chen, Eddie Huang,
	linux-arm Mailing List

+Pi-Hsun Shih

On Mon, Feb 8, 2021 at 9:42 AM Jitao Shi <jitao.shi@mediatek.com> wrote:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.
>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>

I believe this patch (and the following) were actually authored by
Pi-Hsun: https://crrev.com/c/2628812 . Would be best to keep the
author information (unless I'm missing something of course).


> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-13 14:34     ` Nicolas Boichat
  0 siblings, 0 replies; 42+ messages in thread
From: Nicolas Boichat @ 2021-02-13 14:34 UTC (permalink / raw)
  To: Jitao Shi, Pi-Hsun Shih
  Cc: Chun-Kuang Hu, srv_heupstream, Devicetree List, David Airlie,
	huijuan.xie, stonea168, lkml, dri-devel, shuijing.li,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Philipp Zabel, Matthias Brugger, Yingjoe Chen, Eddie Huang,
	linux-arm Mailing List

+Pi-Hsun Shih

On Mon, Feb 8, 2021 at 9:42 AM Jitao Shi <jitao.shi@mediatek.com> wrote:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.
>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>

I believe this patch (and the following) were actually authored by
Pi-Hsun: https://crrev.com/c/2628812 . Would be best to keep the
author information (unless I'm missing something of course).


> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid
@ 2021-02-13 14:34     ` Nicolas Boichat
  0 siblings, 0 replies; 42+ messages in thread
From: Nicolas Boichat @ 2021-02-13 14:34 UTC (permalink / raw)
  To: Jitao Shi, Pi-Hsun Shih
  Cc: Chun-Kuang Hu, srv_heupstream, Devicetree List, David Airlie,
	huijuan.xie, stonea168, lkml, dri-devel, shuijing.li,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Matthias Brugger, Yingjoe Chen, Eddie Huang,
	linux-arm Mailing List

+Pi-Hsun Shih

On Mon, Feb 8, 2021 at 9:42 AM Jitao Shi <jitao.shi@mediatek.com> wrote:
>
> Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid.
>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>

I believe this patch (and the following) were actually authored by
Pi-Hsun: https://crrev.com/c/2628812 . Would be best to keep the
author information (unless I'm missing something of course).


> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 52f11a63a330..ffa4a0f1989f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -118,6 +118,7 @@ struct mtk_dpi_yc_limit {
>  struct mtk_dpi_conf {
>         unsigned int (*cal_factor)(int clock);
>         u32 reg_h_fre_con;
> +       u32 max_clock_khz;
>         bool edge_sel_en;
>  };
>
> @@ -555,9 +556,22 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
>         mtk_dpi_set_display_mode(dpi, &dpi->mode);
>  }
>
> +static enum drm_mode_status
> +mtk_dpi_bridge_mode_valid(struct drm_bridge *bridge,
> +                         const struct drm_display_mode *mode)
> +{
> +       struct mtk_dpi *dpi = bridge_to_dpi(bridge);
> +
> +       if (dpi->conf->max_clock_khz && mode->clock > dpi->conf->max_clock_khz)
> +               return MODE_CLOCK_HIGH;
> +
> +       return MODE_OK;
> +}
> +
>  static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .attach = mtk_dpi_bridge_attach,
>         .mode_set = mtk_dpi_bridge_mode_set,
> +       .mode_valid = mtk_dpi_bridge_mode_valid,
>         .disable = mtk_dpi_bridge_disable,
>         .enable = mtk_dpi_bridge_enable,
>  };
> @@ -673,17 +687,20 @@ static unsigned int mt8183_calculate_factor(int clock)
>  static const struct mtk_dpi_conf mt8173_conf = {
>         .cal_factor = mt8173_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 300000,
>  };
>
>  static const struct mtk_dpi_conf mt2701_conf = {
>         .cal_factor = mt2701_calculate_factor,
>         .reg_h_fre_con = 0xb0,
>         .edge_sel_en = true,
> +       .max_clock_khz = 150000,
>  };
>
>  static const struct mtk_dpi_conf mt8183_conf = {
>         .cal_factor = mt8183_calculate_factor,
>         .reg_h_fre_con = 0xe0,
> +       .max_clock_khz = 100000,
>  };
>
>  static int mtk_dpi_probe(struct platform_device *pdev)
> --
> 2.25.1
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi
  2021-02-10 20:18     ` Rob Herring
  (?)
  (?)
@ 2021-03-07  0:42       ` Chun-Kuang Hu
  -1 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:42 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jitao Shi, srv_heupstream, Philipp Zabel, Rob Herring,
	linux-kernel, Matthias Brugger, David Airlie, DTML, yingjoe.chen,
	stonea168, huijuan.xie, moderated list:ARM/Mediatek SoC support,
	Chun-Kuang Hu, eddie.huang, Linux ARM, DRI Development,
	shuijing.li

Hi, Jitao:

Rob Herring <robh@kernel.org> 於 2021年2月11日 週四 上午4:19寫道:
>
> On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> > Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> >
> > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > ---
> >  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> Acked-by: Rob Herring <robh@kernel.org>


Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi
@ 2021-03-07  0:42       ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:42 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jitao Shi, srv_heupstream, Philipp Zabel, Rob Herring,
	linux-kernel, Matthias Brugger, David Airlie, DTML, yingjoe.chen,
	stonea168, huijuan.xie, moderated list:ARM/Mediatek SoC support,
	Chun-Kuang Hu, eddie.huang, Linux ARM, DRI Development,
	shuijing.li

Hi, Jitao:

Rob Herring <robh@kernel.org> 於 2021年2月11日 週四 上午4:19寫道:
>
> On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> > Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> >
> > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > ---
> >  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> Acked-by: Rob Herring <robh@kernel.org>


Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi
@ 2021-03-07  0:42       ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:42 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jitao Shi, srv_heupstream, Philipp Zabel, Rob Herring,
	linux-kernel, Matthias Brugger, David Airlie, DTML, yingjoe.chen,
	stonea168, huijuan.xie, moderated list:ARM/Mediatek SoC support,
	Chun-Kuang Hu, eddie.huang, Linux ARM, DRI Development,
	shuijing.li

Hi, Jitao:

Rob Herring <robh@kernel.org> 於 2021年2月11日 週四 上午4:19寫道:
>
> On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> > Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> >
> > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > ---
> >  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> Acked-by: Rob Herring <robh@kernel.org>


Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi
@ 2021-03-07  0:42       ` Chun-Kuang Hu
  0 siblings, 0 replies; 42+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:42 UTC (permalink / raw)
  To: Rob Herring
  Cc: DTML, Jitao Shi, srv_heupstream, Chun-Kuang Hu, David Airlie,
	huijuan.xie, stonea168, linux-kernel, DRI Development,
	shuijing.li, Rob Herring,
	moderated list:ARM/Mediatek SoC support, Matthias Brugger,
	yingjoe.chen, eddie.huang, Linux ARM

Hi, Jitao:

Rob Herring <robh@kernel.org> 於 2021年2月11日 週四 上午4:19寫道:
>
> On Mon, 08 Feb 2021 09:42:21 +0800, Jitao Shi wrote:
> > Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi.
> >
> > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > ---
> >  .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> Acked-by: Rob Herring <robh@kernel.org>


Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2021-03-07  0:44 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  1:42 [PATCH v3 0/3] Add check for max clock rate in mode_valid Jitao Shi
2021-02-08  1:42 ` Jitao Shi
2021-02-08  1:42 ` Jitao Shi
2021-02-08  1:42 ` Jitao Shi
2021-02-08  1:42 ` [PATCH v3 1/3] drm/mediatek: mtk_dpi: " Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-09  0:13   ` Chun-Kuang Hu
2021-02-09  0:13     ` Chun-Kuang Hu
2021-02-09  0:13     ` Chun-Kuang Hu
2021-02-09  0:13     ` Chun-Kuang Hu
2021-02-09 22:57   ` kernel test robot
2021-02-09 22:57     ` kernel test robot
2021-02-13 14:34   ` Nicolas Boichat
2021-02-13 14:34     ` Nicolas Boichat
2021-02-13 14:34     ` Nicolas Boichat
2021-02-13 14:34     ` Nicolas Boichat
2021-02-08  1:42 ` [PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192 Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-09  0:14   ` Chun-Kuang Hu
2021-02-09  0:14     ` Chun-Kuang Hu
2021-02-09  0:14     ` Chun-Kuang Hu
2021-02-09  0:14     ` Chun-Kuang Hu
2021-02-08  1:42 ` [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-08  1:42   ` Jitao Shi
2021-02-09  0:08   ` Chun-Kuang Hu
2021-02-09  0:08     ` [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi Chun-Kuang Hu
2021-02-09  0:08     ` Chun-Kuang Hu
2021-02-09  0:08     ` Chun-Kuang Hu
2021-02-10 20:18   ` [PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi Rob Herring
2021-02-10 20:18     ` Rob Herring
2021-02-10 20:18     ` Rob Herring
2021-02-10 20:18     ` Rob Herring
2021-03-07  0:42     ` Chun-Kuang Hu
2021-03-07  0:42       ` [PATCH v3 3/3] dt-bindings: mediatek, dpi: add mt8192 to mediatek, dpi Chun-Kuang Hu
2021-03-07  0:42       ` Chun-Kuang Hu
2021-03-07  0:42       ` Chun-Kuang Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.