Bug 49981

Summary: [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -12!
Product: Drivers Reporter: Apostolos B. (barz621)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, glisse, hugh, nudelsuppe1982
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.6.4 + Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg
3.7rc5 dmesg

Description Apostolos B. 2012-11-02 23:16:20 UTC
After upgrading to 3.6.4 i get this error in my logs in every boot. The system seems to be working OK though.

lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1c.4 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)
00:1c.7 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Z77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Barts PRO [Radeon HD 6800 Series]
01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Barts HDMI Audio [Radeon HD 6800 Series]
03:00.0 PCI bridge: Integrated Technology Express, Inc. Device 8892 (rev 30)
04:02.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22A IEEE-1394a-2000 Controller (PHY/Link) [iOHCI-Lynx]
05:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
06:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9172 SATA 6Gb/s Controller (rev 11)

dmesh attached.
Comment 1 Apostolos B. 2012-11-02 23:17:07 UTC
Created attachment 85421 [details]
dmesg
Comment 2 nudelsuppe1982 2012-11-12 19:42:26 UTC
I can confirm the error up to 3.7 rc5 on my AMD E-350 Board (Asus E35M1-I DELUXE).  Also the radeon HDMI output and audio is broken. 

$ dmesg | grep drm
[    3.600771] [drm] Initialized drm 1.1.0 20060810
[    3.626262] [drm] radeon defaulting to kernel modesetting.
[    3.626278] [drm] radeon kernel modesetting enabled.
[    3.626340] fb: conflicting fb hw usage radeondrmfb vs VESA VGA - removing generic driver
[    3.629912] [drm] initializing kernel modesetting (PALM 0x1002:0x9802 0x1043:0x84A5).
[    3.630029] [drm] register mmio base: 0xFEB00000
[    3.630032] [drm] register mmio size: 262144
[    3.631497] [drm] Detected VRAM RAM=512M, BAR=256M
[    3.631506] [drm] RAM width 32bits DDR
[    3.632779] [drm] radeon: 512M of VRAM memory ready
[    3.632783] [drm] radeon: 512M of GTT memory ready.
[    3.632815] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    3.632817] [drm] Driver supports precise vblank timestamp query.
[    3.632938] [drm] radeon: irq initialized.
[    3.632948] [drm] GART: num cpu pages 131072, num gpu pages 131072
[    3.636126] [drm] Loading PALM Microcode
[    3.677830] [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
[    3.695673] [drm] ring test on 0 succeeded in 1 usecs
[    3.696601] [drm] Enabling audio support
[    3.696650] [drm] ib test on ring 0 succeeded in 0 usecs
[    3.697914] [drm] Radeon Display Connectors
[    3.697921] [drm] Connector 0:
[    3.697924] [drm]   HDMI-A-1
[    3.697926] [drm]   HPD1
[    3.697930] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
[    3.697933] [drm]   Encoders:
[    3.697935] [drm]     DFP1: INTERNAL_UNIPHY
[    3.697937] [drm] Connector 1:
[    3.697939] [drm]   DVI-D-1
[    3.697941] [drm]   HPD2
[    3.697944] [drm]   DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c 0x644c
[    3.697946] [drm]   Encoders:
[    3.697948] [drm]     DFP2: INTERNAL_UNIPHY
[    3.697950] [drm] Connector 2:
[    3.697994] [drm]   VGA-1
[    3.697998] [drm]   DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c 0x644c
[    3.698000] [drm]   Encoders:
[    3.698002] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
[    3.698114] [drm] Internal thermal controller without fan control
[    3.698186] [drm] radeon: power management initialized
[    3.843505] [drm] fb mappable at 0xC0142000
[    3.843512] [drm] vram apper at 0xC0000000
[    3.843514] [drm] size 8294400
[    3.843516] [drm] fb depth is 24
[    3.843518] [drm]    pitch is 7680
[    3.843875] fbcon: radeondrmfb (fb0) is primary device
[    3.930599] fb0: radeondrmfb frame buffer device
[    3.930604] drm: registered panic notifier
[    3.930645] [drm] Initialized radeon 2.24.0 20080528 for 0000:00:01.0 on minor 0
[   28.434143] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -12!

$ dmesg | grep HDMI
[    3.697924] [drm]   HDMI-A-1
[    7.623087] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[    7.623106] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[    7.623243] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.1/sound/card0/input5
[   43.190709] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   43.190729] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   43.192872] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   43.192892] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   43.491778] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   43.491797] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   43.792731] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   43.792751] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   44.095763] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   44.095782] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   44.396786] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   44.396806] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   44.697950] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   44.697971] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   44.998701] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   44.998722] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   45.299729] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   45.299750] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0
[   45.600669] ALSA sound/pci/hda/hda_eld.c:337 HDMI: ELD buf size is 0, force 128
[   45.600690] ALSA sound/pci/hda/hda_eld.c:356 HDMI: invalid ELD data byte 0

$ lspci 
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 14h Processor Root Complex
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Wrestler [Radeon HD 6310]
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Wrestler HDMI Audio [Radeon HD 6250/6310]
00:11.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 42)
00:14.1 IDE interface: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA) (rev 40)
00:14.3 ISA bridge: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
00:14.4 PCI bridge: Advanced Micro Devices [AMD] nee ATI SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:15.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0)
00:15.1 PCI bridge: Advanced Micro Devices [AMD] nee ATI SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1)
00:15.2 PCI bridge: Advanced Micro Devices [AMD] nee ATI SB900 PCI to PCI bridge (PCIE port 2)
00:15.3 PCI bridge: Advanced Micro Devices [AMD] nee ATI SB900 PCI to PCI bridge (PCIE port 3)
00:16.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:16.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 0 (rev 43)
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 6
00:18.6 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 5
00:18.7 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 7
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
04:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
05:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
Comment 3 nudelsuppe1982 2012-11-12 19:43:50 UTC
Created attachment 86191 [details]
3.7rc5 dmesg
Comment 4 Apostolos B. 2012-12-27 18:16:42 UTC
I chasnged my DE from gnome 3 to E17 and i don't get that error anymore? Could it be related?
Comment 5 D. Hugh Redelmeier 2013-01-30 03:15:26 UTC
For what it is worth (probably not much), I'm getting this message on Fedora 17 x86-64 with all updates.  Fedora kernel 3.7.3-101.fc17.x86_64.  Standard Gnome desktop.  The video card is an ATI Radeon HD 3600 XT

Symptoms:

- with a lot of windows on desktop, sometimes creating a new window yields an illegible window with horizontal striations.  It doesn't exactly stay within boundaries but doesn't take over whole screen.

- When I look at the dock (if that's what it is called in Gnome 3, the image of the application has striations too

- dmesg shows:  [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -12!

- /var/log/Xorg.0.log shows a bunch of messages like these:
[ 97766.969] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x6e5f750]
[ 97767.076] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x6e5f750] width 2560 pitch 10240 (/4 2560)
[ 97773.012] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x97ce6d0]
[ 97773.112] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x97ce6d0] width 2560 pitch 10240 (/4 2560)
[ 97773.117] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0xb91b610]
[ 97773.213] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0xb91b610] width 2560 pitch 10240 (/4 2560)
[ 97773.217] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x6a33d50]
[ 97773.313] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x6a33d50] width 2560 pitch 10240 (/4 2560)
[ 97773.319] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0xb91b610]
[ 97773.414] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0xb91b610] width 2560 pitch 10240 (/4 2560)
[ 97773.420] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x97ce5b0]
[ 97773.514] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x97ce5b0] width 2560 pitch 10240 (/4 2560)
[ 97777.063] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x928f370]
[ 97777.142] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x928f370] width 2560 pitch 10240 (/4 2560)
[ 97777.925] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x8be3b80]
[ 97777.945] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x8be3b80] width 2560 pitch 10240 (/4 2560)
[ 97778.781] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x97d9520]
[ 97778.798] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x97d9520] width 2560 pitch 10240 (/4 2560)
[ 97780.516] (II) RADEON(0): radeon_dri2_schedule_flip:665 fevent[0x8bf1aa0]
[ 97780.520] (II) RADEON(0): radeon_dri2_flip_event_handler:1069 fevent[0x8bf1aa0] width 2560 pitch 10240 (/4 2560)

- I can close the window and get back to using the desktop.  But once this has happened, it will happen again quite a lot.
Comment 6 Jérôme Glisse 2013-01-30 17:22:36 UTC
It's not completely a kernel bug. It's userspace asking insane things to kernel.

This mesa patch should avoid the issue most of the time :
http://people.freedesktop.org/~glisse/0001-r600g-add-cs-memory-usage-accounting-and-limit-it.patch

If you are using a recent mesa with gnome you will probably want this cogl patch too :
http://people.freedesktop.org/~glisse/0001-glx-do-not-use-multisample-visual-config-for-front-o.patch

And for kernel i am working on better handling of memory fragmentation.
Comment 7 Jérôme Glisse 2013-02-12 18:58:44 UTC
Reopen if you have issue with mesa 9.1 or mesa from git. A fix was pushed there.