Bug 89047

Summary: linux-3.19 nvd9 Invalid rom content
Product: xorg Reporter: Jan Vesely <jv356>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: CLOSED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium CC: odi, renda.krell, vincent-fdt
Version: unspecified   
Hardware: Other   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=91402
https://bugs.freedesktop.org/show_bug.cgi?id=91779
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
accept 0 from nvbois_extend
none
vbois.rom none

Description Jan Vesely 2015-02-09 19:35:06 UTC
booting linux 3.19.0 fails to init nvd9 card with these messges in dmesg:
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.19.0-gentoo root=/dev/sda3 ro quiet splash i915.lvds_downclock=1 init=/usr/lib/systemd/systemd drm.rnodes=1 reboot=a nouveau.pstate=1
[    7.980357] nouveau 0000:01:00.0: enabling device (0004 -> 0007)
[    7.980901] nouveau  [  DEVICE][0000:01:00.0] BOOT0  : 0x0d9160a1
[    7.980904] nouveau  [  DEVICE][0000:01:00.0] Chipset: GF119 (NVD9)
[    7.980906] nouveau  [  DEVICE][0000:01:00.0] Family : NVC0
[    8.034908] nouveau 0000:01:00.0: Invalid ROM contents
[    8.035060] nouveau ![   VBIOS][0000:01:00.0] unable to locate usable image
[    8.035114] nouveau E[  DEVICE][0000:01:00.0] failed to create 0x10000001, -22
[    8.035171] nouveau E[     DRM] failed to create 0x00000080, -22
[    8.037770] nouveau: probe of 0000:01:00.0 failed with error -22

the usual output (on 3.18.6) is:
Feb 09 12:55:18 [kernel] nouveau 0000:01:00.0: enabling device (0004 -> 0007)
Feb 09 12:55:18 [kernel] nouveau  [  DEVICE][0000:01:00.0] BOOT0  : 0x0d9160a1
Feb 09 12:55:18 [kernel] nouveau  [  DEVICE][0000:01:00.0] Chipset: GF119 (NVD9)
Feb 09 12:55:18 [kernel] nouveau  [  DEVICE][0000:01:00.0] Family : NVC0
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] checking PRAMIN for image...
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] ... signature not found
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] checking PROM for image...
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] ... signature not found
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] checking ACPI for image...
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] ... appears to be valid
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] using image from ACPI
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] BIT signature found
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] version 75.19.6a.01.01
Feb 09 12:55:18 [kernel] nouveau  [ DEVINIT][0000:01:00.0] adaptor not initialised
Feb 09 12:55:18 [kernel] nouveau  [   VBIOS][0000:01:00.0] running init tables
Comment 1 René Krell 2015-02-23 14:46:17 UTC
I can confirm this also for kernel 3.19.0 on OpenSUSE Factory for a HP ZBook 5, NVIDIA Corporation GK208GLM [Quadro K610M].
See https://bugzilla.opensuse.org/show_bug.cgi?id=919036
Comment 2 René Krell 2015-03-19 12:14:17 UTC
Some patch available?
Increased the severity to Critical since this prevents systems using nouveau from booting completely.
Comment 3 Jan Vesely 2015-04-09 01:45:16 UTC
Created attachment 114968 [details] [review]
accept 0 from nvbois_extend

This patch fixes the issue for me.
Comment 4 Ben Skeggs 2015-04-13 06:21:57 UTC
I think I see what might be going on here.(In reply to Jan Vesely from comment #3)
> Created attachment 114968 [details] [review] [review]
> accept 0 from nvbois_extend
> 
> This patch fixes the issue for me.

I think I know what might be going on here, but I want to confirm before trying a different fix.  Can you grab /sys/kernel/debug/dri/0/vbios.rom (replace the "0" for whichever is nouveau) and attach it here please?  You'll need to use your current patch to do this, obviously.
Comment 5 Jan Vesely 2015-04-13 06:49:25 UTC
Created attachment 115044 [details]
vbois.rom
Comment 6 Ben Skeggs 2015-04-13 23:29:03 UTC
(In reply to Jan Vesely from comment #5)
> Created attachment 115044 [details]
> vbois.rom

Thanks.

Does your patch still work for you with the change to subdev/bios/shadow.c reverted (so, just keep the > to >= changes in shadowacpi.c) too?
Comment 7 Jan Vesely 2015-04-14 00:45:27 UTC
(In reply to Ben Skeggs from comment #6)
> (In reply to Jan Vesely from comment #5)
> > Created attachment 115044 [details]
> > vbois.rom
> 
> Thanks.
> 
> Does your patch still work for you with the change to subdev/bios/shadow.c
> reverted (so, just keep the > to >= changes in shadowacpi.c) too?

It does, in fact I only need the change in acpi_read_slow (read_fast fails on my machine anyway #55948).
Comment 8 Ben Skeggs 2015-04-14 01:09:09 UTC
(In reply to Jan Vesely from comment #7)
> (In reply to Ben Skeggs from comment #6)
> > (In reply to Jan Vesely from comment #5)
> > > Created attachment 115044 [details]
> > > vbois.rom
> > 
> > Thanks.
> > 
> > Does your patch still work for you with the change to subdev/bios/shadow.c
> > reverted (so, just keep the > to >= changes in shadowacpi.c) too?
> 
> It does, in fact I only need the change in acpi_read_slow (read_fast fails
> on my machine anyway #55948).

Ok, good, thanks.  I'll submit a modified version of your patch with a more full explanation and to only do the ACPI changes.  The fast path will possibly have the same bug too under certain circumstances, so I'll keep that.

Thank you again.
Comment 9 René Krell 2015-04-23 21:17:12 UTC
I tried the > to >= changes just in shadowacpi.c like advised on the OpenSUSE build system, kernel 4.0.0. Before that, in 3.19 I had the same error like originally reported, with the recommended fix I still get in trouble on a HP ZBook 15:
--
2015-04-23T22:57:04.778565+02:00 rkrell kernel: [    4.402505] nouveau  [  DEVICE][0000:01:00.0] BOOT0  : 0x108390a1
2015-04-23T22:57:04.778565+02:00 rkrell kernel: [    4.402509] nouveau  [  DEVICE][0000:01:00.0] Chipset: GK208 (NV108)
2015-04-23T22:57:04.778565+02:00 rkrell kernel: [    4.402510] nouveau  [  DEVICE][0000:01:00.0] Family : NVE0
2015-04-23T22:57:04.778566+02:00 rkrell kernel: [    4.405997] nouveau  [   VBIOS][0000:01:00.0] using image from ACPI
2015-04-23T22:57:04.778566+02:00 rkrell kernel: [    4.406261] nouveau  [   VBIOS][0000:01:00.0] BIT signature found
2015-04-23T22:57:04.778567+02:00 rkrell kernel: [    4.406265] nouveau  [   VBIOS][0000:01:00.0] version 80.28.52.00.09
2015-04-23T22:57:04.778568+02:00 rkrell kernel: [    4.406271] nouveau W[   VBIOS][0000:01:00.0] DCB header validation failed
2015-04-23T22:57:04.778569+02:00 rkrell kernel: [    4.406272] nouveau W[   VBIOS][0000:01:00.0] DCB header validation failed
2015-04-23T22:57:04.778570+02:00 rkrell kernel: [    4.406278] nouveau E[   VBIOS][0000:01:00.0] 0xfffe[ ]: unknown opcode 0x00
2015-04-23T22:57:04.778570+02:00 rkrell kernel: [    4.406282] nouveau E[ DEVINIT][0000:01:00.0] init failed, -22
2015-04-23T22:57:04.778571+02:00 rkrell kernel: [    4.406284] nouveau E[     DRM] failed to create 0x00000080, -22
2015-04-23T22:57:04.778571+02:00 rkrell kernel: [    4.406509] nouveau: probe of 0000:01:00.0 failed with error -22
--
Comment 10 Jan Vesely 2015-05-08 02:28:48 UTC
(In reply to Ben Skeggs from comment #8)
> (In reply to Jan Vesely from comment #7)
> > (In reply to Ben Skeggs from comment #6)
> > > (In reply to Jan Vesely from comment #5)
> > > > Created attachment 115044 [details]
> > > > vbois.rom
> > > 
> > > Thanks.
> > > 
> > > Does your patch still work for you with the change to subdev/bios/shadow.c
> > > reverted (so, just keep the > to >= changes in shadowacpi.c) too?
> > 
> > It does, in fact I only need the change in acpi_read_slow (read_fast fails
> > on my machine anyway #55948).
> 
> Ok, good, thanks.  I'll submit a modified version of your patch with a more
> full explanation and to only do the ACPI changes.  The fast path will
> possibly have the same bug too under certain circumstances, so I'll keep
> that.
> 
> Thank you again.

Thanks. I see it went to 4.1. Should I send email to linux-stable to add it to 3.19 and 4.0?
Comment 11 Ilia Mirkin 2015-10-22 03:20:30 UTC
OP's issue is fixed. René, I believe your issue is bug 91402 -- a bunch of HP Zbook users there having trouble.
Comment 12 René Krell 2015-10-22 07:19:48 UTC
(In reply to Ilia Mirkin from comment #11)
> OP's issue is fixed. René, I believe your issue is bug 91402 -- a bunch of
> HP Zbook users there having trouble.

Hello Ilia, I cannot see any reference for a fix there. Bug 91402 is still marked NEW. Will this fix land in kernel 4.3 final?
Comment 13 René Krell 2015-10-22 07:21:36 UTC
Update: The nouveau driver still doesn't work on my ZBook 15 using kernel 4.2.3.
Comment 14 Ilia Mirkin 2015-10-22 07:22:50 UTC
(In reply to René from comment #12)
> (In reply to Ilia Mirkin from comment #11)
> > OP's issue is fixed. René, I believe your issue is bug 91402 -- a bunch of
> > HP Zbook users there having trouble.
> 
> Hello Ilia, I cannot see any reference for a fix there. Bug 91402 is still
> marked NEW. Will this fix land in kernel 4.3 final?

Not aware of a fix for it. That's why it's still open and new. But it's your issue, rather than this one :) Add yourself to CC on it to receive any updates. This issue (i.e. Jan's problem) is resolved.
Comment 15 René Krell 2015-10-22 07:27:35 UTC
(In reply to Ilia Mirkin from comment #14)
> Not aware of a fix for it. That's why it's still open and new. But it's your
> issue, rather than this one :) Add yourself to CC on it to receive any
> updates. This issue (i.e. Jan's problem) is resolved.

Sorry, you're right.
There's another one open, see bug 90626.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.