mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Javier Martinez Canillas" <javierm@redhat.com>,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
	"Phong LE" <ple@baylibre.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Julien Chauveau" <chauveau.julien@gmail.com>
Cc: "Paul Cercueil" <paul.cercueil@bootlin.com>,
	"Nishanth Menon" <nm@ti.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH] drm/bridge: ite-it66121: fix silent probe regression due to reset timing
Date: Thu, 15 Oct 2026 10:59:47 +0200	[thread overview]
Message-ID: <DM5AEKBARGER.2N6UFBKLU5AIH@bootlin.com> (raw)
In-Reply-To: <xlv14iengyes.fsf@fmartine-thinkpadx1carbongen12.rmtes.csb>

Hello Javier,

On Thu Oct 15, 2026 at 10:28 AM CEST, Javier Martinez Canillas wrote:
> Luca Ceresoli <luca.ceresoli@bootlin.com> writes:
>
> Hello Luca,
>
>> Commit e02b5262fd28 ("drm/bridge: it66121: acquire reset GPIO in probe")
>> rightfully added code to make the reset pin really work instead of being a
>> no-op, but that change introduced a regression making probe fail most of
>> the times, at least on some hardware.
>>
>> On a BeagleBone Black rev.D the IT66122 silently fails probing >90% of the
>> times. This is because:
>>
>>  1. the regmap_read() calls just after it66121_hw_reset() to read the ID
>>     registers fail
>>  2. there is no error checking for these regmap_read(), execution
>>     continues silently
>>  3. this results in not matching any of the IDs from it66xx_chip_info
>>  4. and this results in silently returning -ENODEV
>>
>> Empirical tests showed a small delay after de-asserting reset fixes
>> probing. Likely the device needs some ramp-up time after reset. No such
>> requirement is mentioned in the docs I could find, so the amount of delay
>> was chosen by testing: 10 ms worked in 100% of 25 test runs, so setting a
>> 20 ms delay should provide a safe margin.
>>
>> Fixes: e02b5262fd28 ("drm/bridge: it66121: acquire reset GPIO in probe")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
>> ---
>> FYI For items 2 and 4 above, I'm sending separate patches to make those
>> errors not silent. Those aren't fixes, so they would be for drm-misc-next,
>> while this patch is for drm-misc-fixes.
>> ---
>>  drivers/gpu/drm/bridge/ite-it66121.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
>> index 51fc68ffdf8f..692a85e1e2e8 100644
>> --- a/drivers/gpu/drm/bridge/ite-it66121.c
>> +++ b/drivers/gpu/drm/bridge/ite-it66121.c
>> @@ -356,6 +356,7 @@ static void it66121_hw_reset(struct it66121_ctx *ctx)
>>  	gpiod_set_value(ctx->gpio_reset, 1);
>>  	msleep(20);
>>  	gpiod_set_value(ctx->gpio_reset, 0);
>> +	msleep(20);
>
> Maybe adding a comment here mentioning that this value was found by
> testing and is not mentioned in the IT66122 documentation ?

Sure, I'll add in v2:

  /* Post-reset delay not specified, value found by testing */

> In any case, the patch makes sense to me:
>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

Thanks for reviewing!

I assume I can keep your R-by with the above comment, let me know if that's
not the case.

Kind regards,
Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2026-10-15  9:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  7:43 Luca Ceresoli
2026-10-15  8:28 ` Javier Martinez Canillas
2026-10-15  8:59   ` Luca Ceresoli [this message]
2026-10-15  9:57     ` Javier Martinez Canillas

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=DM5AEKBARGER.2N6UFBKLU5AIH@bootlin.com \
    --to=luca.ceresoli@bootlin.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=chauveau.julien@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nm@ti.com \
    --cc=paul.cercueil@bootlin.com \
    --cc=ple@baylibre.com \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=stable@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tzimmermann@suse.de \
    /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 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®