Summary: | Kernel module fails to load on HP Pavilion V3A33AV laptop. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Sergey Okhapkin <sos> | ||||||
Component: | Driver/nouveau | Assignee: | Nouveau Project <nouveau> | ||||||
Status: | RESOLVED MOVED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
Severity: | normal | ||||||||
Priority: | medium | CC: | domi.dumont, sos | ||||||
Version: | unspecified | ||||||||
Hardware: | x86-64 (AMD64) | ||||||||
OS: | Linux (All) | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
Sergey Okhapkin
2016-10-13 23:02:35 UTC
Looks like we process your vbios incorrectly. Please attach an acpidump. Created attachment 127287 [details]
acpidump output
acpidump attached
Created attachment 127289 [details]
_ROM method
Interesting, so it looks like
(a) the _ROM method only returns 0x1000 chunks at a time
(b) stores the VBIOS in 8 32K chunks (the chunks themselves do not appear to be in the ACPI data dump)
I wonder if this is running up against our "fast" ACPI method reading logic again.
Can you try to edit drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c and comment out (or remove) the line
"{ 0, &nvbios_acpi_fast },"
And see if that helps?
The patch works: [ 1175.989212] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 1175.989299] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 1175.989407] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 1175.990458] pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, [ 1175.990465] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle [ 1175.990466] nouveau: detected PR support, will not use DSM [ 1175.990559] nouveau 0000:01:00.0: NVIDIA GM107 (1171b0a2) [ 1176.003295] nouveau 0000:01:00.0: bios: version 82.07.9b.00.69 [ 1176.004237] nouveau 0000:01:00.0: fb: 2048 MiB GDDR5 [ 1176.666189] vga_switcheroo: enabled [ 1176.666415] [TTM] Zone kernel: Available graphics memory: 4032186 kiB [ 1176.666435] [TTM] Zone dma32: Available graphics memory: 2097152 kiB [ 1176.666435] [TTM] Initializing pool allocator [ 1176.666438] [TTM] Initializing DMA pool allocator [ 1176.666444] nouveau 0000:01:00.0: DRM: VRAM: 2048 MiB [ 1176.666445] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB [ 1176.666447] nouveau 0000:01:00.0: DRM: TMDS table version 2.0 [ 1176.666448] nouveau 0000:01:00.0: DRM: DCB version 4.0 [ 1176.666449] nouveau 0000:01:00.0: DRM: DCB outp 00: 08000f82 00020030 [ 1176.666450] nouveau 0000:01:00.0: DRM: DCB conn 00: 01000061 [ 1176.666474] nouveau 0000:01:00.0: DRM: BIOS FP mode: 1024x768 (65000kHz pixel clock) [ 1176.683565] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 1176.683566] [drm] Driver supports precise vblank timestamp query. [ 1176.817465] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies [ 1176.817469] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1 [ 1182.560206] nouveau 0000:01:00.0: DRM: suspending console... [ 1182.560207] nouveau 0000:01:00.0: DRM: suspending display... [ 1182.560213] nouveau 0000:01:00.0: DRM: evicting buffers... [ 1182.560214] nouveau 0000:01:00.0: DRM: waiting for kernel channels to go idle... [ 1182.560228] nouveau 0000:01:00.0: DRM: suspending client object trees... [ 1182.563009] nouveau 0000:01:00.0: DRM: suspending kernel object tree... Xorg driver (xf86-video-nouveau-1.0.12) fails: [ 1596.906] (II) NOUVEAU driver [ 1596.906] (II) NOUVEAU driver for NVIDIA chipset families : [ 1596.906] RIVA TNT (NV04) [ 1596.906] RIVA TNT2 (NV05) [ 1596.906] GeForce 256 (NV10) [ 1596.906] GeForce 2 (NV11, NV15) [ 1596.906] GeForce 4MX (NV17, NV18) [ 1596.906] GeForce 3 (NV20) [ 1596.906] GeForce 4Ti (NV25, NV28) [ 1596.906] GeForce FX (NV3x) [ 1596.906] GeForce 6 (NV4x) [ 1596.906] GeForce 7 (G7x) [ 1596.906] GeForce 8 (G8x) [ 1596.906] GeForce GTX 200 (NVA0) [ 1596.906] GeForce GTX 400 (NVC0) [ 1596.906] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 1596.906] (++) using VT number 7 [ 1596.907] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20160711 [ 1596.907] (II) [drm] nouveau interface version: 1.3.1 [ 1596.907] (EE) Unknown chipset: NV117 I'm looking over the fast logic and it seems like it should have worked. This debug patch should provide more info on what's going wrong. Mind reinstating the line in shadowacpi.c and applying the below? diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -423,7 +423,9 @@ bool nouveau_acpi_rom_supported(struct device *dev) int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len) { - return nouveau_rom_call(nouveau_dsm_priv.rom_handle, bios, offset, len); + int ret = nouveau_rom_call(nouveau_dsm_priv.rom_handle, bios, offset, len); + printk(KERN_INFO "retrieving _ROM off: 0x%x, len: 0x%x, ret: 0x%x", offset, len, ret); + return ret; } void * (In reply to Sergey Okhapkin from comment #5) > Xorg driver (xf86-video-nouveau-1.0.12) fails: > [ 1596.907] (EE) Unknown chipset: NV117 That's expected. You can use the modesetting DDX if you have screens hanging off the NVIDIA gpu. Otherwise I recommend enabling DRI3 and using that for offloading. Should I uncomment in shadow.c first? "{ 0, &nvbios_acpi_fast }," (In reply to Sergey Okhapkin from comment #8) > Should I uncomment in shadow.c first? > > "{ 0, &nvbios_acpi_fast }," Please do, yes. (In reply to Ilia Mirkin from comment #6) > I'm looking over the fast logic and it seems like it should have worked. > This debug patch should provide more info on what's going wrong. Mind > reinstating the line in shadowacpi.c and applying the below? > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c > b/drivers/gpu/drm/nouveau/nouveau_acpi.c > --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c > +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c > @@ -423,7 +423,9 @@ bool nouveau_acpi_rom_supported(struct device *dev) > > int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len) > { > - return nouveau_rom_call(nouveau_dsm_priv.rom_handle, bios, offset, > len); > + int ret = nouveau_rom_call(nouveau_dsm_priv.rom_handle, bios, > offset, len); > + printk(KERN_INFO "retrieving _ROM off: 0x%x, len: 0x%x, ret: 0x%x", > offset, len, ret); Er, that should probably have a \n at the end of the string. My bad. > + return ret; > } > > void * [ 3234.532656] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 3234.532743] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 3234.532849] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 3234.533890] pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, [ 3234.533897] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle [ 3234.533898] nouveau: detected PR support, will not use DSM [ 3234.534005] nouveau 0000:01:00.0: NVIDIA GM107 (1171b0a2) [ 3234.538042] retrieving _ROM off: 0x0, len: 0x1000, ret: 0x1000 [ 3234.539278] retrieving _ROM off: 0x1000, len: 0xf000, ret: 0xf000 [ 3234.539616] retrieving _ROM off: 0x10000, len: 0x1000, ret: 0x1000 [ 3234.539953] retrieving _ROM off: 0x11000, len: 0xa000, ret: 0xa000 [ 3234.540028] nouveau 0000:01:00.0: bios: version 82.07.9b.00.69 [ 3234.540294] nouveau 0000:01:00.0: devinit: 0xf152[ ]: unknown opcode 0x00 [ 3234.540315] nouveau 0000:01:00.0: preinit failed with -22 [ 3234.540316] nouveau: DRM:00000000:00000080: init failed with -22 [ 3234.540472] nouveau: probe of 0000:01:00.0 failed with error -22 (In reply to Sergey Okhapkin from comment #11) > [ 3234.532656] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch > - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) > [ 3234.532743] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type > mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) > [ 3234.532849] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type > mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) > [ 3234.533890] pci 0000:01:00.0: optimus capabilities: enabled, status > dynamic power, > [ 3234.533897] VGA switcheroo: detected Optimus DSM method > \_SB_.PCI0.PEG0.PEGP handle > [ 3234.533898] nouveau: detected PR support, will not use DSM > [ 3234.534005] nouveau 0000:01:00.0: NVIDIA GM107 (1171b0a2) > [ 3234.538042] retrieving _ROM off: 0x0, len: 0x1000, ret: 0x1000 > [ 3234.539278] retrieving _ROM off: 0x1000, len: 0xf000, ret: 0xf000 Grrr. Well, that's the issue. It only returns 0x1000 worth of data, but claims to return a buffer sized to 0xf000. And I think I see why: Name (VROM, Buffer (Local1) { 0x00 /* . */ }) Which allocates the VROM buffer to be 0xf000 sized. At the end, that buffer is filled with Mid (Local5, Local0, Local1, VROM) /* \_SB_.PCI0.PEG0.PEGP._ROM.VROM */ Return (VROM) /* \_SB_.PCI0.PEG0.PEGP._ROM.VROM */ However I suspect that Mid() doesn't actually *replace* the object. And this is what acpi_ex_store_buffer_to_buffer() does on Linux - as long as less data is stored, the length of the object appears untouched. So ... given this implementation, I'm not sure how we can reliably skip the "fast" ACPI read. Ben, thoughts? Give this (completely untested) patch a try: https://github.com/skeggsb/nouveau/commit/0e7660d0dd8e4758f1da402fc24dd8d77c39d716 Seems working. [ 637.158783] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 637.158870] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 637.158978] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95) [ 637.160088] pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, [ 637.160095] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle [ 637.160096] nouveau: detected PR support, will not use DSM [ 637.160955] nouveau 0000:01:00.0: NVIDIA GM107 (1171b0a2) [ 637.167300] retrieving _ROM off: 0x0, len: 0x1000, ret: 0x1000 [ 637.167614] retrieving _ROM off: 0x1000, len: 0xf000, ret: 0xf000 [ 637.167941] retrieving _ROM off: 0x0, len: 0x1000, ret: 0x1000 [ 637.168326] retrieving _ROM off: 0x1000, len: 0x1000, ret: 0x1000 [ 637.168643] retrieving _ROM off: 0x2000, len: 0x1000, ret: 0x1000 [ 637.168948] retrieving _ROM off: 0x3000, len: 0x1000, ret: 0x1000 [ 637.169330] retrieving _ROM off: 0x4000, len: 0x1000, ret: 0x1000 [ 637.169647] retrieving _ROM off: 0x5000, len: 0x1000, ret: 0x1000 [ 637.169949] retrieving _ROM off: 0x6000, len: 0x1000, ret: 0x1000 [ 637.170388] retrieving _ROM off: 0x7000, len: 0x1000, ret: 0x1000 [ 637.170691] retrieving _ROM off: 0x8000, len: 0x1000, ret: 0x1000 [ 637.170993] retrieving _ROM off: 0x9000, len: 0x1000, ret: 0x1000 [ 637.171398] retrieving _ROM off: 0xa000, len: 0x1000, ret: 0x1000 [ 637.171734] retrieving _ROM off: 0xb000, len: 0x1000, ret: 0x1000 [ 637.172065] retrieving _ROM off: 0xc000, len: 0x1000, ret: 0x1000 [ 637.172461] retrieving _ROM off: 0xd000, len: 0x1000, ret: 0x1000 [ 637.172789] retrieving _ROM off: 0xe000, len: 0x1000, ret: 0x1000 [ 637.173106] retrieving _ROM off: 0xf000, len: 0x1000, ret: 0x1000 [ 637.173559] retrieving _ROM off: 0x10000, len: 0x1000, ret: 0x1000 [ 637.173900] retrieving _ROM off: 0x11000, len: 0x1000, ret: 0x1000 [ 637.174403] retrieving _ROM off: 0x12000, len: 0x1000, ret: 0x1000 [ 637.174739] retrieving _ROM off: 0x13000, len: 0x1000, ret: 0x1000 [ 637.175070] retrieving _ROM off: 0x14000, len: 0x1000, ret: 0x1000 [ 637.175514] retrieving _ROM off: 0x15000, len: 0x1000, ret: 0x1000 [ 637.175841] retrieving _ROM off: 0x16000, len: 0x1000, ret: 0x1000 [ 637.176169] retrieving _ROM off: 0x17000, len: 0x1000, ret: 0x1000 [ 637.176580] retrieving _ROM off: 0x18000, len: 0x1000, ret: 0x1000 [ 637.176908] retrieving _ROM off: 0x19000, len: 0x1000, ret: 0x1000 [ 637.176921] retrieving _ROM off: 0x1a000, len: 0x1000, ret: 0x1000 [ 637.177021] nouveau 0000:01:00.0: bios: version 82.07.9b.00.69 [ 637.323115] nouveau 0000:01:00.0: fb: 2048 MiB GDDR5 [ 637.323120] nouveau 0000:01:00.0: priv: HUB0: 614900 00800000 (1c408200) [ 637.987352] vga_switcheroo: enabled [ 637.987641] [TTM] Zone kernel: Available graphics memory: 4032186 kiB [ 637.987642] [TTM] Zone dma32: Available graphics memory: 2097152 kiB [ 637.987643] [TTM] Initializing pool allocator [ 637.987647] [TTM] Initializing DMA pool allocator [ 637.987659] nouveau 0000:01:00.0: DRM: VRAM: 2048 MiB [ 637.987661] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB [ 637.987664] nouveau 0000:01:00.0: DRM: TMDS table version 2.0 [ 637.987666] nouveau 0000:01:00.0: DRM: DCB version 4.0 [ 637.987668] nouveau 0000:01:00.0: DRM: DCB outp 00: 08000f82 00020030 [ 637.987669] nouveau 0000:01:00.0: DRM: DCB conn 00: 01000061 [ 637.987674] nouveau 0000:01:00.0: DRM: BIOS FP mode: 1024x768 (65000kHz pixel clock) [ 638.016774] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 638.016775] [drm] Driver supports precise vblank timestamp query. [ 638.196517] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies [ 638.196525] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1 -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/290. |
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.