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 Tested-by: Francis Laniel --- 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