Bug 73577

Summary: Runing 3D app via PRIME causes Xorg freezes when radeon.dmp is on and GPU is set to full clock.
Product: DRI Reporter: Stan Trzmiel <xeno>
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: medium CC: alexandre.f.demers
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg log none

Description Stan Trzmiel 2014-01-13 23:10:36 UTC
Created attachment 92008 [details]
dmesg log

Running 3d application (i've tried on glxgears and FlightGear) on discrete GPU makes Xorg  freze.
Desktop is not responding, keyboard doesn't resond to keypresses (ie no LED change on Caps/NumLock press,
I can't zap X, switch VT), 'tho I can move mouse cursor. SSH login also works.
To recover in most cases restarting X is nessesary, 'tho few times killing app did the trick.


Running the same aps on integrated GPU works ok, running the same apps on discrete GPU, but with clocks
lowet than max works. Also on discrete PGU with radeon.dpm=0 (even with profile set to high).
Switching clocks between low and medium while app is running causes no problem too.

On current kernels there's no useful info in messages log, in Xorg.log, after killing app, generic backtrace may appear:

--------------------------------------------------------------------------------
(EE) [mi] EQ overflowing.  Additional events will be discarded until existing events are processed.
(EE) 
(EE) Backtrace:
(EE) 0: /usr/bin/X (mieqEnqueue+0x22b) [0x583d9b]
(EE) 1: /usr/bin/X (QueuePointerEvents+0x52) [0x451502]
(EE) 2: /usr/lib64/xorg/modules/input/evdev_drv.so (_init+0x2d1d) [0x7f6994faac8d]
(EE) 3: /usr/bin/X (DPMSSupported+0xe8) [0x48b568]
(EE) 4: /usr/bin/X (xf86SerialModemClearBits+0x260) [0x4b4bf0]
(EE) 5: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37aa00f74f]
(EE) 6: /lib64/libc.so.6 (ioctl+0x7) [0x37a98ec117]
(EE) 7: /lib64/libdrm.so.2 (drmIoctl+0x34) [0x36232036e4]
(EE) 8: /lib64/libdrm.so.2 (drmCommandWrite+0x1e) [0x3623205fde]
(EE) 9: /lib64/libdrm_radeon.so.1 (_init+0x549) [0x7f6997810669]
(EE) 10: /usr/lib64/xorg/modules/drivers/radeon_drv.so (_init+0x38ccc) [0x7f6997a9711c]
(EE) 11: /usr/bin/X (DRICloseScreen+0x17ee) [0x5750de]
(EE) 12: /usr/bin/X (DRI2SwapBuffers+0x223) [0x574f73]
(EE) 13: /usr/bin/X (DRI2SendAuthReply+0x74b) [0x57676b]
(EE) 14: /usr/bin/X (SendErrorToClient+0x427) [0x43a3d7]
(EE) 15: /usr/bin/X (_init+0x3b1a) [0x42c02a]
(EE) 16: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37a9821d65]
(EE) 17: /usr/bin/X (_start+0x29) [0x428c45]
(EE) 18: ? (?+0x29) [0x29]
--------------------------------------------------------------------------------


On previous kernel version (3.11 and early 3.12 ) launching openGL app caused GPU lockup errors appear
in /var/log/messages :
--------------------------------------------------------------------------------

Dec 27 22:46:39 xeno kernel: [  185.895130] radeon 0000:01:00.0: GPU lockup CP stall for more than 10000msec
Dec 27 22:46:39 xeno kernel: [  185.895180] radeon 0000:01:00.0: GPU lockup (waiting for 0x0000000000000212)
Dec 27 22:46:39 xeno kernel: [  185.895184] radeon 0000:01:00.0: failed to get a new IB (-35)
Dec 27 22:46:39 xeno kernel: [  185.895218] [drm:radeon_cs_ib_chunk] *ERROR* Failed to get ib !
Dec 27 22:46:39 xeno kernel: [  185.992426] [drm] Disabling audio 0 support
Dec 27 22:46:39 xeno kernel: [  185.999472] radeon 0000:01:00.0: Saved 503 dwords of commands on ring 0.
Dec 27 22:46:39 xeno kernel: [  185.999482] radeon 0000:01:00.0: GPU softreset: 0x00000209
Dec 27 22:46:39 xeno kernel: [  185.999484] radeon 0000:01:00.0:   GRBM_STATUS               = 0xA2733828
Dec 27 22:46:39 xeno kernel: [  185.999485] radeon 0000:01:00.0:   GRBM_STATUS_SE0           = 0x1C000007
Dec 27 22:46:39 xeno kernel: [  185.999487] radeon 0000:01:00.0:   GRBM_STATUS_SE1           = 0x00000007
Dec 27 22:46:39 xeno kernel: [  185.999488] radeon 0000:01:00.0:   SRBM_STATUS               = 0x20000FC0
Dec 27 22:46:39 xeno kernel: [  185.999489] radeon 0000:01:00.0:   SRBM_STATUS2              = 0x00000000
Dec 27 22:46:39 xeno kernel: [  185.999491] radeon 0000:01:00.0:   R_008674_CP_STALLED_STAT1 = 0x00000000
Dec 27 22:46:39 xeno kernel: [  185.999492] radeon 0000:01:00.0:   R_008678_CP_STALLED_STAT2 = 0x00010800
Dec 27 22:46:39 xeno kernel: [  185.999493] radeon 0000:01:00.0:   R_00867C_CP_BUSY_STAT     = 0x00028006
Dec 27 22:46:39 xeno kernel: [  185.999495] radeon 0000:01:00.0:   R_008680_CP_STAT          = 0x80038647
Dec 27 22:46:39 xeno kernel: [  185.999496] radeon 0000:01:00.0:   R_00D034_DMA_STATUS_REG   = 0x44C83D57
Dec 27 22:46:40 xeno kernel: [  186.279581] radeon 0000:01:00.0: Wait for MC idle timedout !
Dec 27 22:46:40 xeno kernel: [  186.279583] radeon 0000:01:00.0: GRBM_SOFT_RESET=0x00007F6B
Dec 27 22:46:40 xeno kernel: [  186.279635] radeon 0000:01:00.0: SRBM_SOFT_RESET=0x00020100
Dec 27 22:46:40 xeno kernel: [  186.280790] radeon 0000:01:00.0:   GRBM_STATUS               = 0x00003828
Dec 27 22:46:40 xeno kernel: [  186.280792] radeon 0000:01:00.0:   GRBM_STATUS_SE0           = 0x00000007
Dec 27 22:46:40 xeno kernel: [  186.280793] radeon 0000:01:00.0:   GRBM_STATUS_SE1           = 0x00000007
Dec 27 22:46:40 xeno kernel: [  186.280795] radeon 0000:01:00.0:   SRBM_STATUS               = 0x20000EC0
Dec 27 22:46:40 xeno kernel: [  186.280796] radeon 0000:01:00.0:   SRBM_STATUS2              = 0x00000000
Dec 27 22:46:40 xeno kernel: [  186.280797] radeon 0000:01:00.0:   R_008674_CP_STALLED_STAT1 = 0x00000000
Dec 27 22:46:40 xeno kernel: [  186.280799] radeon 0000:01:00.0:   R_008678_CP_STALLED_STAT2 = 0x00000000
Dec 27 22:46:40 xeno kernel: [  186.280810] radeon 0000:01:00.0:   R_00867C_CP_BUSY_STAT     = 0x00000000
Dec 27 22:46:40 xeno kernel: [  186.280811] radeon 0000:01:00.0:   R_008680_CP_STAT          = 0x00000000
Dec 27 22:46:40 xeno kernel: [  186.280813] radeon 0000:01:00.0:   R_00D034_DMA_STATUS_REG   = 0x44C83D57
Dec 27 22:46:40 xeno kernel: [  186.280820] radeon 0000:01:00.0: GPU reset succeeded, trying to resume
Dec 27 22:46:40 xeno kernel: [  186.283388] [drm] PCIE gen 2 link speeds already enabled
Dec 27 22:46:40 xeno kernel: [  186.563570] radeon 0000:01:00.0: Wait for MC idle timedout !
Dec 27 22:46:40 xeno kernel: [  186.704032] radeon 0000:01:00.0: Wait for MC idle timedout !

--------------------------------------------------------------------------------

ADDITIONAL INFO:


Hardware:
Dell Vostro 3560 hybrid graphics
[Xeno@xeno ~]$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7500M/7600M Series]

Software:
Fedora 20 x86_64

kernel 3.12.7 (tested also on 13.4-wip branch from agd5fs repo tree)
libdrm-2.4.50-1
xorg-x11-server-Xorg-1.14.4-5
xorg-x11-drv-ati-7.2.0-3.20131101git3b38701
mesa-dri-drivers-9.2.5-1.20131220


modules:
---------------------------------------------------------------------
[Xeno@xeno ~]$ lsmod | grep -i drm
drm_kms_helper         50287  2 i915,radeon
drm                   283349  8 ttm,i915,drm_kms_helper,radeon
i2c_core               38476  7 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,radeon,videodev

glxinfo:
---------------------------------------------------------------------
[Xeno@xeno ~]$ glxinfo | grep -i "OpenGL "
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.5
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 9.2.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
[Xeno@xeno ~]$ DRI_PRIME=1 glxinfo | grep -i "OpenGL"
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD TURKS
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.5
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 9.2.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:


[Xeno@xeno ~]$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 0x7c cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 2 name:Intel
Provider 1: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeon
Provider 2: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeon


Radeon PM info:
---------------------------------------------------------------------
radeon.dpm=0 (there are the same values for both low and high profile)
default engine clock: 600000 kHz
current engine clock: 599970 kHz
default memory clock: 900000 kHz
current memory clock: 899430 kHz
voltage: 900 mV
PCIE lanes: 8

radeon.dpm=1
uvd    vclk: 0 dclk: 0
power level 0    sclk: 30000 mclk: 15000 vddc: 900 vddci: 900
uvd    vclk: 0 dclk: 0
power level 2    sclk: 40000 mclk: 40000 vddc: 900 vddci: 900
uvd    vclk: 0 dclk: 0
power level 2    sclk: 60000 mclk: 90000 vddc: 1000 vddci: 1000
Comment 1 Alex Deucher 2014-01-14 13:52:24 UTC

*** This bug has been marked as a duplicate of bug 73053 ***

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.