mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
@ 2023-06-27 20:31 Jessica Zhang
  2023-07-11  0:04 ` Dmitry Baryshkov
  2023-07-11 14:21 ` Dmitry Baryshkov
  0 siblings, 2 replies; 3+ messages in thread
From: Jessica Zhang @ 2023-06-27 20:31 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Sean Paul, Marijn Suijten,
	David Airlie, Daniel Vetter
  Cc: quic_abhinavk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	Jessica Zhang

During a frame transfer in command mode, there could be frequent
LP11 <-> HS transitions when multiple DCS commands are sent mid-frame or
if the DSI controller is running on slow clock and is throttled. To
minimize frame latency due to these transitions, it is recommended to
send the frame in a single burst.

This feature is supported for DSI 6G 1.3 and above, thus enable burst
mode if supported.

Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
---
Changes in v2:
- Moved MDP_CTRL2 register setting to dsi_ctrl_config() (Dmitry/Marijn)
- Read previous value of MDP_CTRL2 register before writing to it
  (Dmitry)
- Link to v1: https://lore.kernel.org/r/20230608-b4-add-burst-mode-v1-1-55dfbcfada55@quicinc.com
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 3f6dfb4f9d5a..cdb404885f3c 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -752,6 +752,13 @@ static void dsi_ctrl_enable(struct msm_dsi_host *msm_host,
 		/* Always insert DCS command */
 		data |= DSI_CMD_CFG1_INSERT_DCS_COMMAND;
 		dsi_write(msm_host, REG_DSI_CMD_CFG1, data);
+
+		if (msm_host->cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
+				msm_host->cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V1_3) {
+			data = dsi_read(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2);
+			data |= DSI_CMD_MODE_MDP_CTRL2_BURST_MODE;
+			dsi_write(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2, data);
+		}
 	}
 
 	dsi_write(msm_host, REG_DSI_CMD_DMA_CTRL,

---
base-commit: a0364260213c96f6817f7e85cdce293cb743460f
change-id: 20230608-b4-add-burst-mode-a5bb144069fa

Best regards,
-- 
Jessica Zhang <quic_jesszhan@quicinc.com>


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

* Re: [PATCH v2] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
  2023-06-27 20:31 [PATCH v2] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+ Jessica Zhang
@ 2023-07-11  0:04 ` Dmitry Baryshkov
  2023-07-11 14:21 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-07-11  0:04 UTC (permalink / raw)
  To: Jessica Zhang, Rob Clark, Sean Paul, Marijn Suijten,
	David Airlie, Daniel Vetter
  Cc: quic_abhinavk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 27/06/2023 23:31, Jessica Zhang wrote:
> During a frame transfer in command mode, there could be frequent
> LP11 <-> HS transitions when multiple DCS commands are sent mid-frame or
> if the DSI controller is running on slow clock and is throttled. To
> minimize frame latency due to these transitions, it is recommended to
> send the frame in a single burst.
> 
> This feature is supported for DSI 6G 1.3 and above, thus enable burst
> mode if supported.
> 
> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
> ---
> Changes in v2:
> - Moved MDP_CTRL2 register setting to dsi_ctrl_config() (Dmitry/Marijn)
> - Read previous value of MDP_CTRL2 register before writing to it
>    (Dmitry)
> - Link to v1: https://lore.kernel.org/r/20230608-b4-add-burst-mode-v1-1-55dfbcfada55@quicinc.com
> ---
>   drivers/gpu/drm/msm/dsi/dsi_host.c | 7 +++++++
>   1 file changed, 7 insertions(+)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 3f6dfb4f9d5a..cdb404885f3c 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -752,6 +752,13 @@ static void dsi_ctrl_enable(struct msm_dsi_host *msm_host,
>   		/* Always insert DCS command */
>   		data |= DSI_CMD_CFG1_INSERT_DCS_COMMAND;
>   		dsi_write(msm_host, REG_DSI_CMD_CFG1, data);
> +
> +		if (msm_host->cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
> +				msm_host->cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V1_3) {

Nit: please intent in future to the same level (vim: "set cino=(0").

> +			data = dsi_read(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2);
> +			data |= DSI_CMD_MODE_MDP_CTRL2_BURST_MODE;
> +			dsi_write(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2, data);
> +		}
>   	}
>   
>   	dsi_write(msm_host, REG_DSI_CMD_DMA_CTRL,
> 
> ---
> base-commit: a0364260213c96f6817f7e85cdce293cb743460f
> change-id: 20230608-b4-add-burst-mode-a5bb144069fa
> 
> Best regards,

-- 
With best wishes
Dmitry


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

* Re: [PATCH v2] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
  2023-06-27 20:31 [PATCH v2] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+ Jessica Zhang
  2023-07-11  0:04 ` Dmitry Baryshkov
@ 2023-07-11 14:21 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-07-11 14:21 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, Marijn Suijten, David Airlie,
	Daniel Vetter, Jessica Zhang
  Cc: quic_abhinavk, linux-arm-msm, dri-devel, freedreno, linux-kernel


On Tue, 27 Jun 2023 13:31:45 -0700, Jessica Zhang wrote:
> During a frame transfer in command mode, there could be frequent
> LP11 <-> HS transitions when multiple DCS commands are sent mid-frame or
> if the DSI controller is running on slow clock and is throttled. To
> minimize frame latency due to these transitions, it is recommended to
> send the frame in a single burst.
> 
> This feature is supported for DSI 6G 1.3 and above, thus enable burst
> mode if supported.
> 
> [...]

Applied, thanks!

[1/1] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
      https://gitlab.freedesktop.org/lumag/msm/-/commit/4ac447e89e71

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

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

end of thread, other threads:[~2023-07-11 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 20:31 [PATCH v2] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+ Jessica Zhang
2023-07-11  0:04 ` Dmitry Baryshkov
2023-07-11 14:21 ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®