All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
	bliang@analogixsemi.com, qwen@analogixsemi.com,
	linux-kernel@vger.kernel.org,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	dri-devel@lists.freedesktop.org,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	hsinyi@chromium.org, Xin Ji <xji@analogixsemi.com>
Subject: Re: [PATCH] drm/bridge: Add 200ms delay to wait FW HPD status stable
Date: Thu, 21 Sep 2023 15:13:05 +0300	[thread overview]
Message-ID: <20230921121305.GA19112@pendragon.ideasonboard.com> (raw)
In-Reply-To: <87leczpw2h.fsf@intel.com>

The subject line is missing the driver name.

On Thu, Sep 21, 2023 at 03:09:10PM +0300, Jani Nikula wrote:
> On Thu, 21 Sep 2023, Xin Ji <xji@analogixsemi.com> wrote:
> > For the none-interrupt design(sink device is panel, polling HPD

s/none-interrupt/no-interrupt/ ?

s/design/design /

> > status when chip power on), anx7625 FW has more than 200ms HPD
> > de-bounce time in FW, for the safety to get HPD status, driver
> > better to wait 200ms before HPD detection after OS resume back.
> >
> > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > ---
> >  drivers/gpu/drm/bridge/analogix/anx7625.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index 51abe42c639e..833d6d50a03d 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -1464,6 +1464,9 @@ static int _anx7625_hpd_polling(struct anx7625_data *ctx,
> >  	if (ctx->pdata.intp_irq)
> >  		return 0;
> >  
> > +	/* Delay 200ms for FW HPD de-bounce */
> > +	usleep_range(200000, 201000);
> 
> If you need to sleep for 200 ms, maybe use msleep instead?

fsleep() could be a nice replacement.

> > +
> >  	ret = readx_poll_timeout(anx7625_read_hpd_status_p0,
> >  				 ctx, val,
> >  				 ((val & HPD_STATUS) || (val < 0)),

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Xin Ji <xji@analogixsemi.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	qwen@analogixsemi.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, hsinyi@chromium.org,
	bliang@analogixsemi.com
Subject: Re: [PATCH] drm/bridge: Add 200ms delay to wait FW HPD status stable
Date: Thu, 21 Sep 2023 15:13:05 +0300	[thread overview]
Message-ID: <20230921121305.GA19112@pendragon.ideasonboard.com> (raw)
In-Reply-To: <87leczpw2h.fsf@intel.com>

The subject line is missing the driver name.

On Thu, Sep 21, 2023 at 03:09:10PM +0300, Jani Nikula wrote:
> On Thu, 21 Sep 2023, Xin Ji <xji@analogixsemi.com> wrote:
> > For the none-interrupt design(sink device is panel, polling HPD

s/none-interrupt/no-interrupt/ ?

s/design/design /

> > status when chip power on), anx7625 FW has more than 200ms HPD
> > de-bounce time in FW, for the safety to get HPD status, driver
> > better to wait 200ms before HPD detection after OS resume back.
> >
> > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > ---
> >  drivers/gpu/drm/bridge/analogix/anx7625.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index 51abe42c639e..833d6d50a03d 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -1464,6 +1464,9 @@ static int _anx7625_hpd_polling(struct anx7625_data *ctx,
> >  	if (ctx->pdata.intp_irq)
> >  		return 0;
> >  
> > +	/* Delay 200ms for FW HPD de-bounce */
> > +	usleep_range(200000, 201000);
> 
> If you need to sleep for 200 ms, maybe use msleep instead?

fsleep() could be a nice replacement.

> > +
> >  	ret = readx_poll_timeout(anx7625_read_hpd_status_p0,
> >  				 ctx, val,
> >  				 ((val & HPD_STATUS) || (val < 0)),

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-09-21 12:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21  9:14 [PATCH] drm/bridge: Add 200ms delay to wait FW HPD status stable Xin Ji
2023-09-21  9:14 ` Xin Ji
2023-09-21 12:09 ` Jani Nikula
2023-09-21 12:13   ` Laurent Pinchart [this message]
2023-09-21 12:13     ` Laurent Pinchart
2023-09-22  6:57     ` Xin Ji
2023-09-22  6:57       ` Xin Ji
2023-09-22  7:00   ` Xin Ji
2023-09-22  7:00     ` Xin Ji

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=20230921121305.GA19112@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=andrzej.hajda@intel.com \
    --cc=bliang@analogixsemi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hsinyi@chromium.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=qwen@analogixsemi.com \
    --cc=rfoss@kernel.org \
    --cc=xji@analogixsemi.com \
    /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.