From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F4354EA378 for ; Thu, 15 Oct 2026 09:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792054810; cv=none; b=tm3EYs0/yCuzr9EegI6aRy1ZDVDnUD2FlAWj9JuYdQctx3Fc20IxanPlRfb9f/E4KiZvwi28zb8GznPUEeyHQfrR+vkbVb3FPtSwyna93NkayVkuKxuphYarzCu74abxK7kaIu2GKWx5kCymTV4dvuMrEZxw0FE6cMcVrC2sfbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792054810; c=relaxed/simple; bh=9UTqpDTW5ReUcetLLz4Ymo2mNIr3sUQ8fp9IGf329Ng=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=a8ikAU+W7lJFVBFCWJ5qEIoFDgRCmBi8iMb6oSBUC5xP8aUtX4qN320iY3DQ4EdhG5uWruUcqMVY4YyABJgQ/Zje0X8/9TdR4OoaS2RZlLjutzmQtDs0p4pGCFtvAbQr8JjHN2vTuXNTeHigWRaPY5ZXxm0C+yNoUuJLTQvG/a4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=uWMhpcGT; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="uWMhpcGT" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 30A2FC63455; Thu, 15 Oct 2026 09:00:54 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D0A1360360; Thu, 15 Oct 2026 08:59:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id ACEA710328B02; Thu, 15 Oct 2026 10:59:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1792054796; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=R3D3zrodfnAja/dl0ygdUFT7h9waEojVMa7L3/zFbmM=; b=uWMhpcGTN5JowFQjWpLSbGpJDvx4A8udLV/wKsPvs2PsSiI6B1LbXD04lX9ILI5jAm9aIt pLZPFoHl89d9EYiavK9vd2TSaABhsW8mNjCT9S5w0zii85fzj0qgUTF79h+ReV4Bw4onaf Z2//KxBhS+KcZCnWogpg81yzJjIlV+mLQ2vQS6hL8POJZ23liasp8hnwC4n5ormYfS6Zm+ F0OOtNBq4A9xs4rBv2wcpUbgZMg04usYwAbA1Mqhgf3jI7sWDNZTcO2KZnFH7Kp8XTQtK6 pVGQNi6uNLs/8+fG6NOmD2XbpRBu+QDVpOJVtUWTXhVzzxCBtsP/U7gQMKF+Zw== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 15 Oct 2026 10:59:47 +0200 Message-Id: Subject: Re: [PATCH] drm/bridge: ite-it66121: fix silent probe regression due to reset timing Cc: "Paul Cercueil" , "Nishanth Menon" , "Thomas Petazzoni" , , , To: "Javier Martinez Canillas" , "Luca Ceresoli" , "Phong LE" , "Neil Armstrong" , "Andrzej Hajda" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Julien Chauveau" From: "Luca Ceresoli" X-Mailer: aerc 0.22.0 References: <20261015-drm-ite-it66121-fix-reset-v1-1-473038e06abc@bootlin.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 Hello Javier, On Thu Oct 15, 2026 at 10:28 AM CEST, Javier Martinez Canillas wrote: > Luca Ceresoli 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 t= he >> 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 dela= y >> 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 >> --- >> 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-nex= t, >> 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/brid= ge/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 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