All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix EoTp flag
@ 2021-02-01  3:36 ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: linux-mediatek, devicetree, linux-arm-kernel, srv_heupstream,
	yingjoe.chen, eddie.huang, cawa.cheng, bibby.hsieh, ck.hu,
	stonea168, huijuan.xie, Jitao Shi

Changes since v1:
 - Seperate the line time as single patch.

Jitao Shi (2):
  drm/mediatek: dsi: Fix EoTp flag
  drm/mediatek: dsi: fine tune the line time cause by EOTp

 drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
2.12.5

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

* [PATCH v2 0/2] Fix EoTp flag
@ 2021-02-01  3:36 ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, bibby.hsieh, ck.hu, yingjoe.chen,
	eddie.huang, linux-arm-kernel

Changes since v1:
 - Seperate the line time as single patch.

Jitao Shi (2):
  drm/mediatek: dsi: Fix EoTp flag
  drm/mediatek: dsi: fine tune the line time cause by EOTp

 drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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

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

* [PATCH v2 0/2] Fix EoTp flag
@ 2021-02-01  3:36 ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, bibby.hsieh, ck.hu, yingjoe.chen,
	eddie.huang, linux-arm-kernel

Changes since v1:
 - Seperate the line time as single patch.

Jitao Shi (2):
  drm/mediatek: dsi: Fix EoTp flag
  drm/mediatek: dsi: fine tune the line time cause by EOTp

 drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
2.12.5
_______________________________________________
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] 20+ messages in thread

* [PATCH v2 0/2] Fix EoTp flag
@ 2021-02-01  3:36 ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Changes since v1:
 - Seperate the line time as single patch.

Jitao Shi (2):
  drm/mediatek: dsi: Fix EoTp flag
  drm/mediatek: dsi: fine tune the line time cause by EOTp

 drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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

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

* [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
  2021-02-01  3:36 ` Jitao Shi
  (?)
  (?)
@ 2021-02-01  3:36   ` Jitao Shi
  -1 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: linux-mediatek, devicetree, linux-arm-kernel, srv_heupstream,
	yingjoe.chen, eddie.huang, cawa.cheng, bibby.hsieh, ck.hu,
	stonea168, huijuan.xie, Jitao Shi

SoC will transmit the EoTp (End of Transmission packet) when
MIPI_DSI_MODE_EOT_PACKET flag is set.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 65fd99c528af..2bc46f2350f1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
 		break;
 	}
 
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
+	if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
+		tmp_reg |= HSTX_CKLP_EN;
+
+	if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
+		tmp_reg |= DIS_EOT;
 
 	writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
 }
-- 
2.12.5

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

* [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
@ 2021-02-01  3:36   ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, bibby.hsieh, ck.hu, yingjoe.chen,
	eddie.huang, linux-arm-kernel

SoC will transmit the EoTp (End of Transmission packet) when
MIPI_DSI_MODE_EOT_PACKET flag is set.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 65fd99c528af..2bc46f2350f1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
 		break;
 	}
 
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
+	if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
+		tmp_reg |= HSTX_CKLP_EN;
+
+	if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
+		tmp_reg |= DIS_EOT;
 
 	writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
 }
-- 
2.12.5
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
@ 2021-02-01  3:36   ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, bibby.hsieh, ck.hu, yingjoe.chen,
	eddie.huang, linux-arm-kernel

SoC will transmit the EoTp (End of Transmission packet) when
MIPI_DSI_MODE_EOT_PACKET flag is set.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 65fd99c528af..2bc46f2350f1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
 		break;
 	}
 
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
+	if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
+		tmp_reg |= HSTX_CKLP_EN;
+
+	if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
+		tmp_reg |= DIS_EOT;
 
 	writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
 }
-- 
2.12.5
_______________________________________________
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] 20+ messages in thread

* [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
@ 2021-02-01  3:36   ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, yingjoe.chen, eddie.huang,
	linux-arm-kernel

SoC will transmit the EoTp (End of Transmission packet) when
MIPI_DSI_MODE_EOT_PACKET flag is set.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 65fd99c528af..2bc46f2350f1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
 		break;
 	}
 
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
-	tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
+	if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
+		tmp_reg |= HSTX_CKLP_EN;
+
+	if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
+		tmp_reg |= DIS_EOT;
 
 	writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
 }
-- 
2.12.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
  2021-02-01  3:36 ` Jitao Shi
  (?)
  (?)
@ 2021-02-01  3:36   ` Jitao Shi
  -1 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: linux-mediatek, devicetree, linux-arm-kernel, srv_heupstream,
	yingjoe.chen, eddie.huang, cawa.cheng, bibby.hsieh, ck.hu,
	stonea168, huijuan.xie, Jitao Shi

Enabling EoTp will make the line time larger, so the hfp and
hbp should be reduced to keep line time.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 2bc46f2350f1..8c70ec39bfe1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
 			  timing->da_hs_zero + timing->da_hs_exit + 3;
 
 	delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
+	delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
 
 	horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
 	horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
-- 
2.12.5

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

* [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
@ 2021-02-01  3:36   ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, bibby.hsieh, ck.hu, yingjoe.chen,
	eddie.huang, linux-arm-kernel

Enabling EoTp will make the line time larger, so the hfp and
hbp should be reduced to keep line time.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 2bc46f2350f1..8c70ec39bfe1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
 			  timing->da_hs_zero + timing->da_hs_exit + 3;
 
 	delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
+	delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
 
 	horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
 	horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
-- 
2.12.5
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
@ 2021-02-01  3:36   ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, bibby.hsieh, ck.hu, yingjoe.chen,
	eddie.huang, linux-arm-kernel

Enabling EoTp will make the line time larger, so the hfp and
hbp should be reduced to keep line time.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 2bc46f2350f1..8c70ec39bfe1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
 			  timing->da_hs_zero + timing->da_hs_exit + 3;
 
 	delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
+	delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
 
 	horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
 	horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
-- 
2.12.5
_______________________________________________
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] 20+ messages in thread

* [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
@ 2021-02-01  3:36   ` Jitao Shi
  0 siblings, 0 replies; 20+ messages in thread
From: Jitao Shi @ 2021-02-01  3:36 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, dri-devel, linux-kernel
  Cc: devicetree, Jitao Shi, srv_heupstream, huijuan.xie, stonea168,
	cawa.cheng, linux-mediatek, yingjoe.chen, eddie.huang,
	linux-arm-kernel

Enabling EoTp will make the line time larger, so the hfp and
hbp should be reduced to keep line time.

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

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 2bc46f2350f1..8c70ec39bfe1 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
 			  timing->da_hs_zero + timing->da_hs_exit + 3;
 
 	delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
+	delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
 
 	horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
 	horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
-- 
2.12.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
  2021-02-01  3:36   ` Jitao Shi
  (?)
  (?)
@ 2021-03-07  0:28     ` Chun-Kuang Hu
  -1 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:28 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, DRI Development, linux-kernel, DTML,
	srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
	moderated list:ARM/Mediatek SoC support, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> SoC will transmit the EoTp (End of Transmission packet) when
> MIPI_DSI_MODE_EOT_PACKET flag is set.

I've modified the title and message as:

drm/mediatek: dsi: Use symbolized register definition

For HSTX_CKLP_EN and DIS_EOT, use symbolized register
definition instead of magic number.


And applied to mediatek-drm-next [1], thanks.

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

Regards,
Chun-Kuang.


>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 65fd99c528af..2bc46f2350f1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
>                 break;
>         }
>
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
> +       if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
> +               tmp_reg |= HSTX_CKLP_EN;
> +
> +       if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
> +               tmp_reg |= DIS_EOT;
>
>         writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
>  }
> --
> 2.12.5
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
@ 2021-03-07  0:28     ` Chun-Kuang Hu
  0 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:28 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, DRI Development, linux-kernel, DTML,
	srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
	moderated list:ARM/Mediatek SoC support, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> SoC will transmit the EoTp (End of Transmission packet) when
> MIPI_DSI_MODE_EOT_PACKET flag is set.

I've modified the title and message as:

drm/mediatek: dsi: Use symbolized register definition

For HSTX_CKLP_EN and DIS_EOT, use symbolized register
definition instead of magic number.


And applied to mediatek-drm-next [1], thanks.

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

Regards,
Chun-Kuang.


>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 65fd99c528af..2bc46f2350f1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
>                 break;
>         }
>
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
> +       if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
> +               tmp_reg |= HSTX_CKLP_EN;
> +
> +       if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
> +               tmp_reg |= DIS_EOT;
>
>         writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
>  }
> --
> 2.12.5
> _______________________________________________
> 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] 20+ messages in thread

* Re: [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
@ 2021-03-07  0:28     ` Chun-Kuang Hu
  0 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:28 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, DRI Development, linux-kernel, DTML,
	srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
	moderated list:ARM/Mediatek SoC support, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> SoC will transmit the EoTp (End of Transmission packet) when
> MIPI_DSI_MODE_EOT_PACKET flag is set.

I've modified the title and message as:

drm/mediatek: dsi: Use symbolized register definition

For HSTX_CKLP_EN and DIS_EOT, use symbolized register
definition instead of magic number.


And applied to mediatek-drm-next [1], thanks.

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

Regards,
Chun-Kuang.


>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 65fd99c528af..2bc46f2350f1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
>                 break;
>         }
>
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
> +       if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
> +               tmp_reg |= HSTX_CKLP_EN;
> +
> +       if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
> +               tmp_reg |= DIS_EOT;
>
>         writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
>  }
> --
> 2.12.5
> _______________________________________________
> 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] 20+ messages in thread

* Re: [PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag
@ 2021-03-07  0:28     ` Chun-Kuang Hu
  0 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:28 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Mark Rutland, DTML, srv_heupstream, David Airlie, huijuan.xie,
	stonea168, linux-kernel, DRI Development, cawa.cheng,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Matthias Brugger, yingjoe.chen, eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> SoC will transmit the EoTp (End of Transmission packet) when
> MIPI_DSI_MODE_EOT_PACKET flag is set.

I've modified the title and message as:

drm/mediatek: dsi: Use symbolized register definition

For HSTX_CKLP_EN and DIS_EOT, use symbolized register
definition instead of magic number.


And applied to mediatek-drm-next [1], thanks.

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

Regards,
Chun-Kuang.


>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 65fd99c528af..2bc46f2350f1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
>                 break;
>         }
>
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
> -       tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
> +       if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
> +               tmp_reg |= HSTX_CKLP_EN;
> +
> +       if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET))
> +               tmp_reg |= DIS_EOT;
>
>         writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
>  }
> --
> 2.12.5
> _______________________________________________
> 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] 20+ messages in thread

* Re: [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
  2021-02-01  3:36   ` Jitao Shi
  (?)
  (?)
@ 2021-03-07  0:30     ` Chun-Kuang Hu
  -1 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:30 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, DRI Development, linux-kernel, DTML,
	srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
	moderated list:ARM/Mediatek SoC support, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> Enabling EoTp will make the line time larger, so the hfp and
> hbp should be reduced to keep line time.

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.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 2bc46f2350f1..8c70ec39bfe1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
>                           timing->da_hs_zero + timing->da_hs_exit + 3;
>
>         delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
> +       delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
>
>         horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
>         horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
> --
> 2.12.5
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
@ 2021-03-07  0:30     ` Chun-Kuang Hu
  0 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:30 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, DRI Development, linux-kernel, DTML,
	srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
	moderated list:ARM/Mediatek SoC support, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> Enabling EoTp will make the line time larger, so the hfp and
> hbp should be reduced to keep line time.

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.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 2bc46f2350f1..8c70ec39bfe1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
>                           timing->da_hs_zero + timing->da_hs_exit + 3;
>
>         delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
> +       delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
>
>         horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
>         horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
> --
> 2.12.5
> _______________________________________________
> 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] 20+ messages in thread

* Re: [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
@ 2021-03-07  0:30     ` Chun-Kuang Hu
  0 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:30 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
	David Airlie, DRI Development, linux-kernel, DTML,
	srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
	moderated list:ARM/Mediatek SoC support, yingjoe.chen,
	eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> Enabling EoTp will make the line time larger, so the hfp and
> hbp should be reduced to keep line time.

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.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 2bc46f2350f1..8c70ec39bfe1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
>                           timing->da_hs_zero + timing->da_hs_exit + 3;
>
>         delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
> +       delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
>
>         horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
>         horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
> --
> 2.12.5
> _______________________________________________
> 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] 20+ messages in thread

* Re: [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp
@ 2021-03-07  0:30     ` Chun-Kuang Hu
  0 siblings, 0 replies; 20+ messages in thread
From: Chun-Kuang Hu @ 2021-03-07  0:30 UTC (permalink / raw)
  To: Jitao Shi
  Cc: Mark Rutland, DTML, srv_heupstream, David Airlie, huijuan.xie,
	stonea168, linux-kernel, DRI Development, cawa.cheng,
	Rob Herring, moderated list:ARM/Mediatek SoC support,
	Matthias Brugger, yingjoe.chen, eddie.huang, Linux ARM

Hi, Jitao:

Jitao Shi <jitao.shi@mediatek.com> 於 2021年2月1日 週一 上午11:36寫道:
>
> Enabling EoTp will make the line time larger, so the hfp and
> hbp should be reduced to keep line time.

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.

>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 2bc46f2350f1..8c70ec39bfe1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
>                           timing->da_hs_zero + timing->da_hs_exit + 3;
>
>         delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
> +       delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
>
>         horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
>         horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;
> --
> 2.12.5
> _______________________________________________
> 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] 20+ messages in thread

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

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01  3:36 [PATCH v2 0/2] Fix EoTp flag Jitao Shi
2021-02-01  3:36 ` Jitao Shi
2021-02-01  3:36 ` Jitao Shi
2021-02-01  3:36 ` Jitao Shi
2021-02-01  3:36 ` [PATCH v2 1/2] drm/mediatek: dsi: " Jitao Shi
2021-02-01  3:36   ` Jitao Shi
2021-02-01  3:36   ` Jitao Shi
2021-02-01  3:36   ` Jitao Shi
2021-03-07  0:28   ` Chun-Kuang Hu
2021-03-07  0:28     ` Chun-Kuang Hu
2021-03-07  0:28     ` Chun-Kuang Hu
2021-03-07  0:28     ` Chun-Kuang Hu
2021-02-01  3:36 ` [PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp Jitao Shi
2021-02-01  3:36   ` Jitao Shi
2021-02-01  3:36   ` Jitao Shi
2021-02-01  3:36   ` Jitao Shi
2021-03-07  0:30   ` Chun-Kuang Hu
2021-03-07  0:30     ` Chun-Kuang Hu
2021-03-07  0:30     ` Chun-Kuang Hu
2021-03-07  0:30     ` 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.