All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: Abhinav Kumar <abhinavk@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org, manojavm@codeaurora.org,
	dri-devel@lists.freedesktop.org, hoegsberg@google.com,
	freedreno@lists.freedesktop.org, chandanu@codeaurora.org
Subject: Re: [Freedreno] [DPU PATCH 1/2] drm/msm/dsi: check video mode engine status before waiting
Date: Mon, 9 Apr 2018 09:28:02 -0600	[thread overview]
Message-ID: <20180409152802.GC5491@jcrouse-lnx.qualcomm.com> (raw)
In-Reply-To: <1523087405-18877-1-git-send-email-abhinavk@codeaurora.org>

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@codeaurora.org>
> ---
>  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
-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-04-09 15:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-07  7:50 [DPU PATCH 1/2] drm/msm/dsi: check video mode engine status before waiting Abhinav Kumar
2018-04-07  7:50 ` [DPU PATCH 2/2] drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY Abhinav Kumar
2018-04-08  8:01   ` Archit Taneja
2018-04-09 15:28 ` Jordan Crouse [this message]
     [not found]   ` <20180409152802.GC5491-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-04-09 21:09     ` [DPU PATCH 1/2] drm/msm/dsi: check video mode engine status before waiting abhinavk-sgV2jX0FEOL9JmXXK+q4OQ
     [not found] ` <1523087405-18877-1-git-send-email-abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-04-11  1:54   ` [DPU PATCH v2 " Abhinav Kumar
     [not found]   ` <1523411647-16840-1-git-send-email-abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-04-11  1:54     ` [DPU PATCH v2 2/2] drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY Abhinav Kumar
     [not found]       ` <1523411647-16840-2-git-send-email-abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-04-13 20:29         ` Sean Paul
2018-04-13 20:52           ` abhinavk-sgV2jX0FEOL9JmXXK+q4OQ
     [not found]             ` <41fb3b8501b466e40a542066b76004c0-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-04-16 17:01               ` Sean Paul
2018-04-13 20:26     ` [DPU PATCH v2 1/2] drm/msm/dsi: check video mode engine status before waiting Sean Paul
2018-04-13 21:10       ` [Freedreno] " abhinavk
     [not found]         ` <8353aed54639deed0adee6671bbd1895-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-04-13 22:04           ` abhinavk-sgV2jX0FEOL9JmXXK+q4OQ
     [not found]             ` <c5c2cbf36c5fabee154eaa03801e71dc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-04-16 17:07               ` Sean Paul
2018-04-16 17:44                 ` abhinavk-sgV2jX0FEOL9JmXXK+q4OQ
     [not found]                   ` <56ad41e7f95e907943a310d9c657ae4d-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-04-16 18:50                     ` Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180409152802.GC5491@jcrouse-lnx.qualcomm.com \
    --to=jcrouse@codeaurora.org \
    --cc=abhinavk@codeaurora.org \
    --cc=chandanu@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hoegsberg@google.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=manojavm@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.