All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/devinit/gf100-: fix double vbios init checks
@ 2026-11-23  0:25 ` Dave Airlie via B4 Relay
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Airlie @ 2026-11-23  0:25 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich; +Cc: dri-devel, nouveau, Dave Airlie

The initial fix from 2017 wasn't updated for modern nouveau devinit
disable paths.

Fix that and just check if display exists instead.

Fixes: 2139cb633d48 ("drm/nouveau/devinit/gf100-: try to avoid double-running vbios scripts")
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 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;

---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-nouveau-fix-disp-62f59fd96fee

Best regards,
-- 
Dave Airlie <airlied@redhat.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] drm/nouveau/devinit/gf100-: fix double vbios init checks
@ 2026-11-23  0:25 ` Dave Airlie via B4 Relay
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Airlie via B4 Relay @ 2026-11-23  0:25 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich; +Cc: dri-devel, nouveau, Dave Airlie

From: Dave Airlie <airlied@redhat.com>

The initial fix from 2017 wasn't updated for modern nouveau devinit
disable paths.

Fix that and just check if display exists instead.

Fixes: 2139cb633d48 ("drm/nouveau/devinit/gf100-: try to avoid double-running vbios scripts")
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 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;

---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-nouveau-fix-disp-62f59fd96fee

Best regards,
-- 
Dave Airlie <airlied@redhat.com>



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/nouveau/devinit/gf100-: fix double vbios init checks
  2026-11-23  0:25 ` Dave Airlie via B4 Relay
  (?)
@ 2026-11-26 14:13 ` Francis Laniel
  -1 siblings, 0 replies; 3+ messages in thread
From: Francis Laniel @ 2026-11-26 14:13 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich, Dave Airlie; +Cc: dri-devel, nouveau, Dave Airlie

Hi,

Le lundi 23 novembre 2026, 02:25:26 heure normale d’Europe de l’Ouest Dave Airlie a écrit :
> The initial fix from 2017 wasn't updated for modern nouveau devinit
> disable paths.
> 
> Fix that and just check if display exists instead.
> 
> Fixes: 2139cb633d48 ("drm/nouveau/devinit/gf100-: try to avoid double-running vbios scripts")
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
>  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;
> 
> ---
> base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
> change-id: 20261123-nouveau-fix-disp-62f59fd96fee
> 
> Best regards,
> 

Thank you for the patch! I tested it, and I can now boot my laptop with it:
[    1.404564] nouveau: loading out-of-tree module taints kernel.
[    1.404624] nouveau: module verification failed: signature and/or required key missing - tainting kernel
[    1.739550] nouveau: detected PR support, will not use DSM
[    1.739571] nouveau 0000:2d:00.0: enabling device (0006 -> 0007)
[    1.739648] nouveau 0000:2d:00.0: NVIDIA GP108 (138000a1)
[    1.776320] nouveau 0000:2d:00.0: bios: version 86.08.3e.00.26
[    1.776582] nouveau 0000:2d:00.0: pmu: firmware unavailable
[    1.860292] nouveau 0000:2d:00.0: fb: 2048 MiB GDDR5
[    1.897865] nouveau 0000:2d:00.0: drm: VRAM: 2048 MiB
[    1.897868] nouveau 0000:2d:00.0: drm: GART: 536870912 MiB
[    1.897869] nouveau 0000:2d:00.0: drm: BIT table 'A' not found
[    1.897871] nouveau 0000:2d:00.0: drm: BIT table 'L' not found
[    1.897871] nouveau 0000:2d:00.0: drm: Pointer to TMDS table not found
[    1.902700] nouveau 0000:2d:00.0: drm: MM: using COPY for buffer copies
[    1.902820] [drm] Initialized nouveau 1.4.0 for 0000:2d:00.0 on minor 0
[    1.902908] nouveau 0000:2d:00.0: [drm] No compatible format found
[    1.902910] nouveau 0000:2d:00.0: [drm] Cannot find any crtc or sizes

Tested-by: Francis Laniel <laniel_francis@npnm.eu>

As 2139cb633d48 ("drm/nouveau/devinit/gf100-: try to avoid double-running vbios scripts")
is part of stable kernel, at least 6.12.118, I am wondering if this should be also posted to stable?
Particularly as some other debian users are hit by this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=+1155040
What do you think?

Best regards,






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-26 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  0:25 [PATCH] drm/nouveau/devinit/gf100-: fix double vbios init checks Dave Airlie
2026-11-23  0:25 ` Dave Airlie via B4 Relay
2026-11-26 14:13 ` Francis Laniel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.