From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F09F6606A325 for ; Tue, 1 Dec 2026 09:40:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MDW3G/QG Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6380310F6F0; Tue, 1 Dec 2026 09:40:41 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 847A110F6DD for ; Tue, 1 Dec 2026 09:40:35 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 826BD61425; Tue, 1 Dec 2026 09:40:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 243861F00893; Tue, 1 Dec 2026 09:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796118034; bh=HDuYJeqCghaUvFUJvZKG9zwOF8EkH4whmDBy6LXmOLQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=MDW3G/QGVlPEoAWcqGJYUMXMX+wHwWac1lDEQRNYj/RJuFcLaTNIpfA+cU7yzM36F 9Cx5+EZqtwK6y6P8C2RtULf34Sziyv9TejX2Gr5hwZtBFmdEyHz4nDZEdFyk8VwtT/ kAga/pF/Ya9WXIt8P4zu9gjkhZa3gIYzJHUsS5Y6CxZ6x/fZxVFBXvpJO4JFjXJ8l9 O1PUXRHCryJ9lIUYSRR69eg6qf2J5G+F0622WvgWNJEHk3drB6B17jYn68TBF+DMnN 6ppM2u2uUwdwr9B6gRE+ZcBMrjhziEvqJHMile8MCYRNa9D1feM0Nrp3/AF+S1khkw PnFnmw4IccpCw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [RFC PATCH v3 2/2] drm/panel: simple: Keep the enable GPIO as left by the bootloader To: =?utf-8?b?TcOgeGltIFBlZHJhemEgUGFkaWxsYQ==?= Cc: dri-devel@lists.freedesktop.org In-Reply-To: <20261201092651.240295-3-maximpedraza@gmail.com> References: <20261201092651.240295-1-maximpedraza@gmail.com> <20261201092651.240295-3-maximpedraza@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 09:40:33 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] drm/panel: simple: enable_gpio state desync in panel_simple_probe() -- commit 29ec10355f1c521cad78cbabc080604b3d619f74 Author: M=C3=A0xim Pedraza Padilla drm/panel: simple: Keep the enable GPIO as left by the bootloader This commit requests the panel enable GPIO with GPIOD_ASIS at probe time and configures it as an output in panel_simple_resume(). > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel= /panel-simple.c > index fe93f59c1d8ee..01db221591494 100644 > --- a/drivers/gpu/drm/panel/panel-simple.c > +++ b/drivers/gpu/drm/panel/panel-simple.c [ ... ] > @@ -664,7 +664,7 @@ static struct panel_simple *panel_simple_probe(struct= device *dev) > return ERR_CAST(panel->supply); > =20 > panel->enable_gpio =3D devm_gpiod_get_optional(dev, "enable", > - GPIOD_OUT_LOW); > + GPIOD_ASIS); > if (IS_ERR(panel->enable_gpio)) > return dev_err_cast_probe(dev, panel->enable_gpio, > "failed to request GPIO\n"); [Severity: High] Does requesting panel->enable_gpio with GPIOD_ASIS leave the physical GPIO state out of sync with panel->base.prepared, runtime PM, and panel->supply? When the bootloader leaves the panel enabled and the display state is kept without a full modeset, drm_panel_prepare() does not run, so the device starts in RPM_SUSPENDED with panel->base.prepared =3D=3D false and no regulator reference on panel->supply. If panel->ddc is present, panel_simple_get_modes() calls pm_runtime_get_sync() followed by pm_runtime_put_autosuspend(); because panel_simple_prepare() never took a persistent runtime PM reference, the device autosuspends 1000 ms later and panel_simple_suspend() drives enable_gpio low and disables panel->supply while the display is scanning out. If panel->ddc is absent, panel_simple_resume() never runs at all, so late_initcall_sync can disable an unused boot-on panel->supply, and a subsequent disable or shutdown returns early from drm_panel_unprepare() because panel->base.prepared is false, leaving enable_gpio asserted when the display is turned off. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201092651.2402= 95-1-maximpedraza@gmail.com?part=3D2