* [PATCH] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
@ 2023-06-12 23:37 Jessica Zhang
2023-06-14 9:43 ` Marijn Suijten
2023-06-14 22:45 ` Dmitry Baryshkov
0 siblings, 2 replies; 4+ messages in thread
From: Jessica Zhang @ 2023-06-12 23:37 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>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 744f2398a6d6..8254b06dca85 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -994,6 +994,11 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_TOTAL,
DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL(hdisplay) |
DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL(mode->vdisplay));
+
+ if (msm_host->cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
+ msm_host->cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V1_3)
+ dsi_write(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2,
+ DSI_CMD_MODE_MDP_CTRL2_BURST_MODE);
}
}
---
base-commit: dd969f852ba4c66938c71889e826aa8e5300d2f2
change-id: 20230608-b4-add-burst-mode-a5bb144069fa
Best regards,
--
Jessica Zhang <quic_jesszhan@quicinc.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
2023-06-12 23:37 [PATCH] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+ Jessica Zhang
@ 2023-06-14 9:43 ` Marijn Suijten
2023-06-16 17:40 ` Jessica Zhang
2023-06-14 22:45 ` Dmitry Baryshkov
1 sibling, 1 reply; 4+ messages in thread
From: Marijn Suijten @ 2023-06-14 9:43 UTC (permalink / raw)
To: Jessica Zhang
Cc: Rob Clark, Dmitry Baryshkov, Sean Paul, David Airlie,
Daniel Vetter, quic_abhinavk, linux-arm-msm, dri-devel,
freedreno, linux-kernel
On 2023-06-12 16:37:36, 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>
> ---
> drivers/gpu/drm/msm/dsi/dsi_host.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 744f2398a6d6..8254b06dca85 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -994,6 +994,11 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
> dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_TOTAL,
> DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL(hdisplay) |
> DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL(mode->vdisplay));
> +
> + if (msm_host->cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
> + msm_host->cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V1_3)
> + dsi_write(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2,
> + DSI_CMD_MODE_MDP_CTRL2_BURST_MODE);
This is not part of the timing setup, and a similar BURST_MODE flag is
enabled for video-mode in dsi_ctrl_config() - should it be moved there?
(There is a dsi_sw_reset() in between the calls to dsi_timing_setup()
and dsi_ctrl_cfg())
Note that that function sets up the CMD_CFG0 and CMD_CFG1 register, with
the former having a very similar layout to MDP_CTRL2... is there
documentation outlining the difference?
- Marijn
> }
> }
>
>
> ---
> base-commit: dd969f852ba4c66938c71889e826aa8e5300d2f2
> change-id: 20230608-b4-add-burst-mode-a5bb144069fa
>
> Best regards,
> --
> Jessica Zhang <quic_jesszhan@quicinc.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
2023-06-12 23:37 [PATCH] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+ Jessica Zhang
2023-06-14 9:43 ` Marijn Suijten
@ 2023-06-14 22:45 ` Dmitry Baryshkov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2023-06-14 22:45 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 13/06/2023 02:37, 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>
> ---
> drivers/gpu/drm/msm/dsi/dsi_host.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 744f2398a6d6..8254b06dca85 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -994,6 +994,11 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
> dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_TOTAL,
> DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL(hdisplay) |
> DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL(mode->vdisplay));
> +
> + if (msm_host->cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
> + msm_host->cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V1_3)
> + dsi_write(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2,
> + DSI_CMD_MODE_MDP_CTRL2_BURST_MODE);
Please move this to dsi_ctrl_config(), the place where we set all the
configs. Also please change this to RMW cycle.
> }
> }
>
>
> ---
> base-commit: dd969f852ba4c66938c71889e826aa8e5300d2f2
> change-id: 20230608-b4-add-burst-mode-a5bb144069fa
>
> Best regards,
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+
2023-06-14 9:43 ` Marijn Suijten
@ 2023-06-16 17:40 ` Jessica Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Jessica Zhang @ 2023-06-16 17:40 UTC (permalink / raw)
To: Marijn Suijten
Cc: Rob Clark, Dmitry Baryshkov, Sean Paul, David Airlie,
Daniel Vetter, quic_abhinavk, linux-arm-msm, dri-devel,
freedreno, linux-kernel
On 6/14/2023 2:43 AM, Marijn Suijten wrote:
> On 2023-06-12 16:37:36, 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>
>> ---
>> drivers/gpu/drm/msm/dsi/dsi_host.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
>> index 744f2398a6d6..8254b06dca85 100644
>> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
>> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
>> @@ -994,6 +994,11 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>> dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_TOTAL,
>> DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL(hdisplay) |
>> DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL(mode->vdisplay));
>> +
>> + if (msm_host->cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
>> + msm_host->cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V1_3)
>> + dsi_write(msm_host, REG_DSI_CMD_MODE_MDP_CTRL2,
>> + DSI_CMD_MODE_MDP_CTRL2_BURST_MODE);
>
> This is not part of the timing setup, and a similar BURST_MODE flag is
> enabled for video-mode in dsi_ctrl_config() - should it be moved there?
Hi Marijn,
Sure, I can move the change to dsi_ctrl_enable() instead.
>
> (There is a dsi_sw_reset() in between the calls to dsi_timing_setup()
> and dsi_ctrl_cfg())
>
> Note that that function sets up the CMD_CFG0 and CMD_CFG1 register, with
> the former having a very similar layout to MDP_CTRL2... is there
> documentation outlining the difference?
I see what you mean, but unfortunately I'm not able to give you any
documentation about the differences between them.
FWIW, I think the macros in dsi.xml.h should give you a sense of what's
within the registers and the slight differences between them.
Thanks,
Jessica Zhang
>
> - Marijn
>
>> }
>> }
>>
>>
>> ---
>> base-commit: dd969f852ba4c66938c71889e826aa8e5300d2f2
>> change-id: 20230608-b4-add-burst-mode-a5bb144069fa
>>
>> Best regards,
>> --
>> Jessica Zhang <quic_jesszhan@quicinc.com>
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-16 17:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 23:37 [PATCH] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+ Jessica Zhang
2023-06-14 9:43 ` Marijn Suijten
2023-06-16 17:40 ` Jessica Zhang
2023-06-14 22:45 ` Dmitry Baryshkov
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).