https://bugs.freedesktop.org/show_bug.cgi?id=63865
Priority: medium Bug ID: 63865 Assignee: dri-devel@lists.freedesktop.org Summary: radeon_atombios_get_power_modes oops with E-350 Severity: normal Classification: Unclassified OS: Linux (All) Reporter: fdo@zahe.me Hardware: x86-64 (AMD64) Status: NEW Version: XOrg CVS Component: DRM/Radeon Product: DRI
With linux 3.8.8 on an AMD E-350 cpu, the screen corrupts and freezes during modesetting switching. The system is otherwise responsive.
kernel: [drm] Encoders: kernel: [drm] CRT1: INTERNAL_KLDSCP_DAC1 kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 kernel: IP: [<ffffffffa034ceb8>] radeon_atombios_get_power_modes+0x748/0x7f0 [radeon] kernel: PGD 1b5061067 PUD 1b502d067 PMD 0 kernel: Oops: 0002 [#1] PREEMPT SMP kernel: Modules linked in: eeepc_wmi snd_hwdep asus_wmi radeon(+) sparse_keymap rfkill video pci_hotplug snd_pcm snd_page_alloc ttm snd_timer microcode snd drm_kms_helper evdev pcspkr drm k10temp i2c_algo_bit sp5100_tco i2c_piix4 i2c_core soundcore r8169 mii wmi button processor w83627ehf hwmon_vid cpufreq_stats nls_cp437 vfat fat fuse ext4 crc16 jbd2 mbcache hid_generic usbhid hid usb_storage sd_mod ahci libahci ehci_pci ohci_hcd ehci_hcd libata usbcore usb_common scsi_mod kernel: CPU 1 kernel: Pid: 151, comm: systemd-udevd Not tainted 3.8.8-1-ARCH #1 System manufacturer System Product Name/E35M1-M kernel: RIP: 0010:[<ffffffffa034ceb8>] [<ffffffffa034ceb8>] radeon_atombios_get_power_modes+0x748/0x7f0 [radeon] kernel: RSP: 0018:ffff8801b5d13a98 EFLAGS: 00010246 kernel: RAX: 0000000000000010 RBX: ffff8801b4afaffa RCX: 0000000000000000 kernel: RDX: 000000000000affa RSI: ffff8801b4afaffa RDI: 0000000000000000 kernel: RBP: ffff8801b5d13b00 R08: ffff8801b5d13ad3 R09: 0000000000000010 kernel: R10: ffff8801b4af0000 R11: 000000000000ab30 R12: 0000000000000000 kernel: R13: ffff8801b55e0000 R14: 0000000000000000 R15: ffff8801b4afaffa kernel: FS: 00007f4618cf9780(0000) GS:ffff8801bed00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000010 CR3: 00000001b50bd000 CR4: 00000000000007e0 kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 kernel: Process systemd-udevd (pid: 151, threadinfo ffff8801b5d12000, task ffff8801b48fcb60) kernel: Stack: kernel: 0400080000000000 0000000004000800 ffff8801b4afaffa ffff8801b55e0000 kernel: ffff8801b4afaffa 0000000000000202 0000000080000000 affaaffa01060106 systemd-udevd[130]: worker [151] terminated by signal 9 (Killed) systemd-udevd[130]: worker [151] failed while handling '/devices/pci0000:00/0000:00:01.0' kernel: ffff8801b5abec58 ffff8801b55e0000 ffff8801b5abe800 0000000000000000 kernel: Call Trace: kernel: [<ffffffffa039f507>] radeon_pm_init+0x3a7/0x580 [radeon] kernel: [<ffffffffa036bdc7>] ? radeon_modeset_init+0x3e7/0xba0 [radeon] kernel: [<ffffffffa036bf08>] radeon_modeset_init+0x528/0xba0 [radeon] kernel: [<ffffffffa03484d0>] radeon_driver_load_kms+0xf0/0x1a0 [radeon] kernel: [<ffffffffa02605d6>] drm_get_pci_dev+0x176/0x2b0 [drm] kernel: [<ffffffffa032e1c1>] ? radeon_pci_probe+0xa1/0xe0 [radeon] kernel: [<ffffffffa032e1d3>] radeon_pci_probe+0xb3/0xe0 [radeon] kernel: [<ffffffff8129556e>] local_pci_probe+0x3e/0x70 kernel: [<ffffffff81295761>] pci_device_probe+0x111/0x120 kernel: [<ffffffff8134c707>] driver_probe_device+0x87/0x3a0 kernel: [<ffffffff8134caf3>] __driver_attach+0x93/0xa0 kernel: [<ffffffff8134ca60>] ? __device_attach+0x40/0x40 kernel: [<ffffffff8134a703>] bus_for_each_dev+0x63/0xa0 kernel: [<ffffffff8134c18e>] driver_attach+0x1e/0x20 kernel: [<ffffffff8134bc0a>] bus_add_driver+0xda/0x2b0 kernel: [<ffffffffa040a000>] ? 0xffffffffa0409fff kernel: [<ffffffff8134d181>] driver_register+0x71/0x150 kernel: [<ffffffffa040a000>] ? 0xffffffffa0409fff kernel: [<ffffffff812953fd>] __pci_register_driver+0x4d/0x50 kernel: [<ffffffffa026082a>] drm_pci_init+0x11a/0x130 [drm] kernel: [<ffffffffa040a000>] ? 0xffffffffa0409fff kernel: [<ffffffffa040a0ec>] radeon_init+0xec/0xee [radeon] kernel: [<ffffffff8100210a>] do_one_initcall+0x10a/0x160 kernel: [<ffffffff810bd85b>] load_module+0x1a0b/0x20d0 kernel: [<ffffffff81286490>] ? ddebug_proc_write+0xf0/0xf0 kernel: [<ffffffff810bdfc2>] sys_init_module+0xa2/0xf0 kernel: [<ffffffff814c731d>] system_call_fastpath+0x1a/0x1f kernel: Code: 01 7e 08 48 8b 52 08 83 4a 24 01 48 83 c0 30 48 39 c8 75 df 49 63 85 d4 12 00 00 83 f8 ff 0f 85 18 fa ff ff 49 8b 85 b8 12 00 00 <c7> 00 00 00 00 00 49 8b 85 b8 12 00 00 41 c7 85 d4 12 00 00 00 kernel: RIP [<ffffffffa034ceb8>] radeon_atombios_get_power_modes+0x748/0x7f0 [radeon] kernel: RSP <ffff8801b5d13a98> kernel: CR2: 0000000000000010 kernel: ---[ end trace b7966bb12ee1e96d ]---
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #1 from Alex Deucher agd5f@yahoo.com --- Please attach a copy of your vbios.
(as root) (use lspci to get the bus id) cd /sys/bus/pci/devices/<pci bus id> echo 1 > rom cat rom > /tmp/vbios.rom echo 0 > rom
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #2 from Hieu Hoang fdo@zahe.me --- Created attachment 78440 --> https://bugs.freedesktop.org/attachment.cgi?id=78440&action=edit vbios from e-350 GPU
linux 3.7.9 works fine, I'll try to obtain earlier 3.8.x packages to test.
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #3 from Alex Deucher agd5f@yahoo.com --- (In reply to comment #2)
linux 3.7.9 works fine, I'll try to obtain earlier 3.8.x packages to test.
Any chance you could bisect?
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #4 from Alex Deucher agd5f@yahoo.com --- Created attachment 78471 --> https://bugs.freedesktop.org/attachment.cgi?id=78471&action=edit Possible fix
The attached patch should fix it, but I don't see how any kernel ever would have worked with your card. Did you change any bios settings or flash your bios recently?
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #5 from Hieu Hoang fdo@zahe.me --- I have only changed SATA mode, and have not updated the BIOS since I bought this motherboard.
3.7.10 works, 3.8.0 doesn't. I'll try to set up bisecting, but this CPU is really weak.
As another data point, the main OSes boot in UEFI mode. ArchLinux installation media with 3.8.4 kernel can only boot in BIOS mode, and it works fine.
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #6 from Alex Deucher agd5f@yahoo.com --- Does the patch help?
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #7 from Hieu Hoang fdo@zahe.me --- Created attachment 78569 --> https://bugs.freedesktop.org/attachment.cgi?id=78569&action=edit dmesg of patched kernel
With the patch, my monitor goes in to stand by right after modesetting (the power LED is ember instead of blue). dmesg attached.
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #8 from Alex Deucher agd5f@yahoo.com --- It looks like you are using a bogus unposted vbios image. I think you'll need to bisect. If I had to guess, I'd say it's related to some change in how the pci rom images are fetched.
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #9 from Christian Heinz crhp@nainokami.net --- (In reply to comment #8)
It looks like you are using a bogus unposted vbios image. I think you'll need to bisect. If I had to guess, I'd say it's related to some change in how the pci rom images are fetched.
The issue can be reliably reproduced on my E-450. I bisected it to:
---------- commit f9a37be0f02a943d63e3346b19f9c9d8d91826cb
x86: Use PCI setup data
EFI can provide PCI ROMs out of band via boot services, which may not be available after boot. Add support for using the data handed off to us by the boot stub or bootloader. ----------
Looks like your guess is correct.
Additional notes: - this machine boots in EFI mode as well (via CONFIG_EFI_STUB) - attached my video BIOS for reference
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #10 from Christian Heinz crhp@nainokami.net --- Created attachment 78765 --> https://bugs.freedesktop.org/attachment.cgi?id=78765&action=edit AMD E-450 APU video BIOS
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #11 from Alex Deucher agd5f@yahoo.com --- (In reply to comment #9)
The issue can be reliably reproduced on my E-450. I bisected it to:
commit f9a37be0f02a943d63e3346b19f9c9d8d91826cb
x86: Use PCI setup data EFI can provide PCI ROMs out of band via boot services, which may not be available after boot. Add support for using the data handed off to us by the boot stub or bootloader.
The version grabbed from boot services hasn't been patches by the sbios yet so it's not usable by the driver. Macs need the boot services copy since they don't provide a way to access it after the OS loads. On non-Macs we have a method to fetch the proper vbios via acpi so we don't need this.
https://bugs.freedesktop.org/show_bug.cgi?id=63865
--- Comment #12 from Alex Deucher agd5f@yahoo.com --- It should be fixed by this patch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06... make sure your kernel has it.
https://bugs.freedesktop.org/show_bug.cgi?id=63865
Alex Deucher agd5f@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #13 from Alex Deucher agd5f@yahoo.com --- you'll also need this patch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ff...
dri-devel@lists.freedesktop.org