dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] drm/bridge: ti-sn65dsi83: Fix LVDS panel overclocking
@ 2022-10-04 11:57 estl
  2022-10-04 11:57 ` [RFC PATCH 1/1] drm/bridge: ti-sn65dsi83: Remove burst mode estl
  0 siblings, 1 reply; 3+ messages in thread
From: estl @ 2022-10-04 11:57 UTC (permalink / raw)
  To: dri-devel; +Cc: Marek Vasut, Eberhard Stoll

From: Eberhard Stoll <eberhard.stoll@kontron.de>

I'm currently working on a board with stm32mp157 SOC which contains
a synposys LTDC to DSI bridge (drm/stm/dw_mipi_dsi-stm.c). In this
configuration i observe a overclocking of the LVDS pixel clock.

The reason for this is, that the synopsys bridge increases the DSI
lane clock by 20% for burst mode. On the other hand the sn65dsi83
chip uses the DSI lane clock to generate LVDS pixel clock. So in
this configuration the LVDS pixel clock is 20% higher as the panel
configuration pretends.

Removing burst mode solves this issue. It also seems sensible to
me, that a fixed divider to generate the pixel clock out of the DSI
lane clock is not compatible with burst mode.

But i'm not sure if i'm missing someting in the big picture and
whether this issue should be solved somewhere else.

Eberhard Stoll (1):
  drm/bridge: ti-sn65dsi83: Remove burst mode

 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.25.1


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

* [RFC PATCH 1/1] drm/bridge: ti-sn65dsi83: Remove burst mode
  2022-10-04 11:57 [RFC PATCH 0/1] drm/bridge: ti-sn65dsi83: Fix LVDS panel overclocking estl
@ 2022-10-04 11:57 ` estl
  2022-10-04 12:15   ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: estl @ 2022-10-04 11:57 UTC (permalink / raw)
  To: dri-devel, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
	Daniel Vetter
  Cc: Marek Vasut, linux-kernel, Eberhard Stoll

From: Eberhard Stoll <eberhard.stoll@kontron.de>

Remove LVDS panel overclocking for some configurations by disabling
burst mode for this chip

With burst mode enabled, some DSI controllers increase their DSI lane
clock beyond the clock which is needed to transfer all pixel data.

But this driver operates with a pixel clock derived from the DSI lane
clock by a fixed prescaler. So, every increase of the DSI clock also
increases the LVDS pixel clock. In this case, the LVDS pixel clock is
overclocked.

This is the case e.g. for synopsys stm DSI bridge
(drm/stm/dw_mipi_dsi-stm.c). With burst mode the DSI clock is
increased by 20% and therefore also for the LVDS panel.

Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
---
 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
index c901c0e1a3b0..ffc39208536e 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@ -272,7 +272,7 @@ static int sn65dsi83_attach(struct drm_bridge *bridge,

 	dsi->lanes = ctx->dsi_lanes;
 	dsi->format = MIPI_DSI_FMT_RGB888;
-	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST;
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO;

 	ret = mipi_dsi_attach(dsi);
 	if (ret < 0) {
--
2.25.1


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

* Re: [RFC PATCH 1/1] drm/bridge: ti-sn65dsi83: Remove burst mode
  2022-10-04 11:57 ` [RFC PATCH 1/1] drm/bridge: ti-sn65dsi83: Remove burst mode estl
@ 2022-10-04 12:15   ` Marek Vasut
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2022-10-04 12:15 UTC (permalink / raw)
  To: estl, dri-devel, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
	Daniel Vetter, Maxime Ripard
  Cc: linux-kernel, Eberhard Stoll

On 10/4/22 13:57, estl@gmx.net wrote:
> From: Eberhard Stoll <eberhard.stoll@kontron.de>
> 
> Remove LVDS panel overclocking for some configurations by disabling
> burst mode for this chip
> 
> With burst mode enabled, some DSI controllers increase their DSI lane
> clock beyond the clock which is needed to transfer all pixel data.
> 
> But this driver operates with a pixel clock derived from the DSI lane
> clock by a fixed prescaler. So, every increase of the DSI clock also
> increases the LVDS pixel clock. In this case, the LVDS pixel clock is
> overclocked.
> 
> This is the case e.g. for synopsys stm DSI bridge
> (drm/stm/dw_mipi_dsi-stm.c). With burst mode the DSI clock is
> increased by 20% and therefore also for the LVDS panel.
> 
> Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
> ---
>   drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> index c901c0e1a3b0..ffc39208536e 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> @@ -272,7 +272,7 @@ static int sn65dsi83_attach(struct drm_bridge *bridge,
> 
>   	dsi->lanes = ctx->dsi_lanes;
>   	dsi->format = MIPI_DSI_FMT_RGB888;
> -	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST;
> +	dsi->mode_flags = MIPI_DSI_MODE_VIDEO;
> 
>   	ret = mipi_dsi_attach(dsi);
>   	if (ret < 0) {

The burst mode is the most efficient mode, so please keep it. This patch 
is the wrong approach.

The problem with DSI HS clock is known and long standing, I tried to 
solve it twice, but neither solution made it in. It is probably a good 
idea to read through the suggestions and try to follow the latest one by 
negotiating the link clock via bridge state:

https://lore.kernel.org/dri-devel/20220801131113.182487-1-marex@denx.de/
https://lore.kernel.org/all/20220219002844.362157-1-marex@denx.de/

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

end of thread, other threads:[~2022-10-05  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 11:57 [RFC PATCH 0/1] drm/bridge: ti-sn65dsi83: Fix LVDS panel overclocking estl
2022-10-04 11:57 ` [RFC PATCH 1/1] drm/bridge: ti-sn65dsi83: Remove burst mode estl
2022-10-04 12:15   ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).