Re: [Freedreno] [DPU PATCH 1/2] drm/msm/dsi: check video mode engine status before waiting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-04-09 08:28, Jordan Crouse wrote:
On Sat, Apr 07, 2018 at 12:50:04AM -0700, Abhinav Kumar wrote:
Make sure the video mode engine is on before waiting
for the video done interrupt.

Otherwise it leads to silent timeouts increasing display
turn ON time.

Signed-off-by: Abhinav Kumar <abhinavk@xxxxxxxxxxxxxx>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 7a03a94..24766c3 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -173,6 +173,7 @@ struct msm_dsi_host {

 	bool registered;
 	bool power_on;
+	bool enabled;
 	int irq;
 };

@@ -986,13 +987,18 @@ static void dsi_set_tx_power_mode(int mode, struct msm_dsi_host *msm_host)

 static void dsi_wait4video_done(struct msm_dsi_host *msm_host)
 {
+	u32 ret = 0;
+
 	dsi_intr_ctrl(msm_host, DSI_IRQ_MASK_VIDEO_DONE, 1);

 	reinit_completion(&msm_host->video_comp);

-	wait_for_completion_timeout(&msm_host->video_comp,
+	ret = wait_for_completion_timeout(&msm_host->video_comp,
 			msecs_to_jiffies(70));

+	if (ret <= 0)
+		pr_err("wait for video done failed\n");
+

Does this need to be rate limited? How often will it print? Also, 'wait for video done timed out" would be more descriptive for the situation. I'm not sure from the context if you have a pr_fmt defined for this file but if you don't you might want to add the appropriate prefixes (or use dev_err) so the reader can get a bit more detailed information about where to look and what is going on.

Jordan
[Abhinav] With the rest of this change, this error should not happen.
This will print whenever we need to call this for waiting for each panel command. The number of panel commands can vary with panel from < 10 to 100s at times. But since we do not expect this to happen at all, at this point i dont think we need
to rate limit this.

Yes, will replace the pr_err with dev_err in V2.
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux