Bug 62239

Summary: radeon drm oops with benchmark=1 on Radeon 7950
Product: DRI Reporter: Michal Babej <frraaaanz+bugs.fdo>
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium CC: florian
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
possible fix none

Description Michal Babej 2013-03-12 15:30:54 UTC
(This is possibly a dup of 25747)

Bug: when i append "radeon.benchmark=1" the kernel oopses

System is Arch linux, kernel version 3.8.2-1-ARCH, hardware is Radeon HD 7950


Log:

Mar 12 15:51:01 yennork kernel: [    1.992473] [drm] initializing kernel modesetting (TAHITI 0x1002:0x679A 0x1458:0x254C).


Mar 12 15:51:01 yennork kernel: [    2.694236] [drm] radeon: dma 1024 bo moves of 1024 kB from 2 to 4 in 253 ms, throughput: 33152 Mb/s or 4144 MB/s
Mar 12 15:51:01 yennork kernel: [    2.694260] BUG: unable to handle kernel NULL pointer dereference at           (null)
Mar 12 15:51:01 yennork kernel: [    2.694375] IP: [<          (null)>]           (null)
Mar 12 15:51:01 yennork kernel: [    2.694450] PGD 41bf9a067 PUD 41bf9b067 PMD 0 
Mar 12 15:51:01 yennork kernel: [    2.694586] Oops: 0010 [#1] PREEMPT SMP 
Mar 12 15:51:01 yennork kernel: [    2.694721] Modules linked in: hid_generic usbhid hid mxm_wmi evdev radeon(+) snd_hda_codec_realtek fam15h_power snd_hda_intel(+) ttm snd_hda_codec drm_kms_helper snd_hwdep drm snd_pcm snd_page_alloc r8169 snd_timer snd i2c_algo_bit soundcore i2c_core mii nfs lockd sunrpc fscache wmi button microcode kvm_amd kvm fuse acpi_cpufreq mperf processor ext4 crc16 jbd2 mbcache dm_crypt dm_mod sr_mod cdrom sd_mod crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 xts lrw gf128mul ablk_helper cryptd ahci libahci ehci_pci ohci_hcd xhci_hcd ehci_hcd libata usbcore scsi_mod usb_common pci_stub
Mar 12 15:51:01 yennork kernel: [    2.696915] CPU 4 
Mar 12 15:51:01 yennork kernel: [    2.696953] Pid: 244, comm: systemd-udevd Not tainted 3.8.2-1-ARCH #1 Gigabyte Technology Co., Ltd. GA-990XA-UD3/GA-990XA-UD3
Mar 12 15:51:01 yennork kernel: [    2.697041] RIP: 0010:[<0000000000000000>]  [<          (null)>]           (null)
Mar 12 15:51:01 yennork kernel: [    2.697121] RSP: 0018:ffff88041bff3940  EFLAGS: 00010246
Mar 12 15:51:01 yennork kernel: [    2.697164] RAX: ffffffffa04d3380 RBX: 0000000000000400 RCX: 0000000000000100
Mar 12 15:51:01 yennork kernel: [    2.697210] RDX: 000000000114b000 RSI: 00000000c0431000 RDI: ffff88041c1ac000
Mar 12 15:51:01 yennork kernel: [    2.697255] RBP: ffff88041bff39a8 R08: ffff88041bff3970 R09: 000000000000034d
Mar 12 15:51:01 yennork kernel: [    2.697300] R10: 0000000000000000 R11: 000000000000034c R12: 0000000000000001
Mar 12 15:51:01 yennork kernel: [    2.697345] R13: ffff88041c1ac000 R14: 0000000000000100 R15: 00000000c0431000
Mar 12 15:51:01 yennork kernel: [    2.697391] FS:  00007fec84a54780(0000) GS:ffff88042ed00000(0000) knlGS:0000000000000000
Mar 12 15:51:01 yennork kernel: [    2.697440] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 12 15:51:01 yennork kernel: [    2.697484] CR2: 0000000000000000 CR3: 000000041bf99000 CR4: 00000000000407e0
Mar 12 15:51:01 yennork kernel: [    2.697529] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 12 15:51:01 yennork kernel: [    2.697574] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 12 15:51:01 yennork kernel: [    2.697621] Process systemd-udevd (pid: 244, threadinfo ffff88041bff2000, task ffff88041a1110c0)
Mar 12 15:51:01 yennork kernel: [    2.697670] Stack:
Mar 12 15:51:01 yennork kernel: [    2.697707]  ffffffffa0454a26 ffff88041bff39a8 ffffffff814ca2cb 00000000fffea35a
Mar 12 15:51:01 yennork kernel: [    2.697881]  000000000114b000 ffff88041bff39d0 0000000000000000 ffff88041bff39f0
Mar 12 15:51:01 yennork kernel: [    2.698054]  ffff88041bff39f0 0000000000000002 ffff88041c1ac000 0000000000100000
Mar 12 15:51:01 yennork kernel: [    2.698227] Call Trace:
Mar 12 15:51:01 yennork kernel: [    2.698319]  [<ffffffffa0454a26>] ? radeon_benchmark_do_move.constprop.1+0xf6/0x120 [radeon]
Mar 12 15:51:01 yennork kernel: [    2.698375]  [<ffffffff814ca2cb>] ? printk+0x4d/0x4f
Mar 12 15:51:01 yennork kernel: [    2.698464]  [<ffffffffa0454c9e>] radeon_benchmark_move+0x24e/0x2b0 [radeon]
Mar 12 15:51:01 yennork kernel: [    2.698555]  [<ffffffffa0454e14>] radeon_benchmark+0x114/0x2a0 [radeon]
Mar 12 15:51:01 yennork kernel: [    2.698637]  [<ffffffffa0424bc1>] radeon_device_init+0x601/0x670 [radeon]
Mar 12 15:51:01 yennork kernel: [    2.698720]  [<ffffffffa042665d>] radeon_driver_load_kms+0x9d/0x1a0 [radeon]
Mar 12 15:51:01 yennork kernel: [    2.698776]  [<ffffffffa039b976>] drm_get_pci_dev+0x186/0x2c0 [drm]
Mar 12 15:51:01 yennork kernel: [    2.698855]  [<ffffffffa040c1d4>] radeon_pci_probe+0xb4/0xf0 [radeon]
Mar 12 15:51:01 yennork kernel: [    2.698904]  [<ffffffff8129f7eb>] local_pci_probe+0x4b/0x80
Mar 12 15:51:01 yennork kernel: [    2.698950]  [<ffffffff812a00b1>] pci_device_probe+0x111/0x120
Mar 12 15:51:01 yennork kernel: [    2.698999]  [<ffffffff8135a41b>] driver_probe_device+0x8b/0x3a0
Mar 12 15:51:01 yennork kernel: [    2.699046]  [<ffffffff8135a7db>] __driver_attach+0xab/0xb0
Mar 12 15:51:01 yennork kernel: [    2.699092]  [<ffffffff8135a730>] ? driver_probe_device+0x3a0/0x3a0
Mar 12 15:51:01 yennork kernel: [    2.699138]  [<ffffffff8135844d>] bus_for_each_dev+0x5d/0xa0
Mar 12 15:51:01 yennork kernel: [    2.699185]  [<ffffffff81359e8e>] driver_attach+0x1e/0x20
Mar 12 15:51:01 yennork kernel: [    2.699230]  [<ffffffff813599b0>] bus_add_driver+0x1a0/0x290
Comment 1 Alex Deucher 2013-03-12 16:58:55 UTC
Created attachment 76410 [details] [review]
possible fix

This patch should fix the issue.
Comment 2 Michal Babej 2013-03-12 17:55:52 UTC
Built 3.8.2 with the patch, verified its working. Thanks!
Comment 3 Florian Mickler 2013-03-24 10:20:59 UTC
A patch referencing this bug report has been merged in Linux v3.9-rc4:

commit fa8d387dc3f62062a6b4afbbb2a3438094fd8584
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Tue Mar 12 12:53:13 2013 -0400

    drm/radeon/benchmark: make sure bo blit copy exists before using it
Comment 4 Michel Dänzer 2013-03-25 11:35:21 UTC
Resolving per comment #3.

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.