From: Francis Laniel <laniel_francis@npnm.eu>
To: Karol Herbst <kherbst@redhat.com>, Lyude Paul <lyude@redhat.com>,
Danilo Krummrich <dakr@redhat.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
linux-kernel@vger.kernel.org, 1155040@bugs.debian.org,
Francis Laniel <laniel_francis@npnm.eu>,
stable@vger.kernel.org
Subject: [PATCH v1 1/1] drm/nouveau/devinit/gf100-: fix display engine check in preinit
Date: Wed, 25 Nov 2026 13:19:25 +0200 [thread overview]
Message-ID: <20261125111925.8651-2-laniel_francis@npnm.eu> (raw)
In-Reply-To: <20261125111925.8651-1-laniel_francis@npnm.eu>
Commit 2139cb633d48 ("drm/nouveau/devinit/gf100-: try to avoid double-running vbios scripts")
checks the return value of nvkm_devinit_disable() for the DISP engine bit.
Since commit da2b1a0a40d8 ("drm/nouveau/devinit: Convert function disable() to be void"),
that function always returns 0 and disabled engines are
removed via nvkm_subdev_disable(), which clears device->disp.
As a result the VGA CRTC heuristic is also used on display-less GPUs
(Optimus "3D controllers"), where it wrongly concludes the board was
already POSTed. Devinit is skipped and the GPU stays uninitialised,
leading to "fb: 0 MiB", PRIVRING faults and an oops in
gp102_acr_wpr_patch(), or a hang during boot.
Check device->disp instead, as nv50_devinit_preinit() does.
Fixes: 2139cb633d48 ("drm/nouveau/devinit/gf100-: try to avoid double-running vbios scripts")
Link: https://bugs.debian.org/1155040
Cc: stable@vger.kernel.org
Signed-off-by: Francis Laniel <laniel_francis@npnm.eu>
Tested-by: Francis Laniel <laniel_francis@npnm.eu>
---
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c
index 186e09ea0cb1..b256404c2454 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c
@@ -107,12 +107,12 @@ gf100_devinit_preinit(struct nvkm_devinit *base)
* VBIOS multiple times may have detrimental effects.
*/
if (base->post) {
- u64 disable = nvkm_devinit_disable(base);
+ nvkm_devinit_disable(base);
/* magic to detect whether or not x86 vbios code has
* executed the devinit scripts to initialise the
* board. only works if there's a display engine.
*/
- if (!(disable & (1ULL << NVKM_ENGINE_DISP))) {
+ if (device->disp) {
if (nvkm_rdvgac(device, 0, 0x00) ||
nvkm_rdvgac(device, 0, 0x1a)) {
base->post = false;
--
2.47.3
prev parent reply other threads:[~2026-11-25 11:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 11:19 [PATCH v1 0/1] " Francis Laniel
2026-11-25 11:19 ` Francis Laniel [this message]
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=20261125111925.8651-2-laniel_francis@npnm.eu \
--to=laniel_francis@npnm.eu \
--cc=1155040@bugs.debian.org \
--cc=airlied@gmail.com \
--cc=dakr@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.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 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®