Bug 97137

Summary: R7 M370 hangs with radeon.dpm=1 when running demanding graphical programs with DRI PRIME
Product: DRI Reporter: Mauro Santos <registo.mailling>
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: DRI git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg with gpu hang
none
lspci -vvnn
none
dmesg with radeon.runpm=0 none

Description Mauro Santos 2016-07-29 21:50:24 UTC
I own a laptop (Thinkpad E560) with an Intel+Radeon gpu combo. When trying to run demanding graphical programs with the radeon gpu via dri prime it hangs. In this context, demanding programs are anything more demanding than glxgears (which runs fine).

If I boot with radeon.dpm=0 everything runs fine but at the low default clock speeds. I have been unable to set faster clock speeds via the sysfs interface.

I have tried drm-next from https://cgit.freedesktop.org/~airlied/linux/?h=drm-next together with the latest git linux-firmware but the problem is the same.

The problem can be replicated by running 'glmark2 -b texture'. However 'glmark2 -b build' seems to work without any problems.
Comment 1 Mauro Santos 2016-07-29 21:50:52 UTC
Created attachment 125426 [details]
dmesg with gpu hang
Comment 2 Mauro Santos 2016-07-29 21:51:20 UTC
Created attachment 125427 [details]
lspci -vvnn
Comment 3 Alex Deucher 2016-07-29 22:19:42 UTC
Does setting radeon.runpm=0 on the kernel command line in grub help?
Comment 4 Mauro Santos 2016-07-29 23:26:31 UTC
(In reply to Alex Deucher from comment #3)
> Does setting radeon.runpm=0 on the kernel command line in grub help?

No change. When running glmark2 I still get a hang when it gets to the texture test. I see the cube spin for maybe less than one second and then the test/gpu hangs.
Comment 5 Mauro Santos 2016-07-29 23:26:52 UTC
Created attachment 125429 [details]
dmesg with radeon.runpm=0
Comment 6 Mauro Santos 2016-08-10 11:16:21 UTC
Is there any further information or tests I can do to help determining the cause of the problem and finding a fix/workaround?
Comment 7 Mauro Santos 2016-09-17 17:51:46 UTC
I have just noticed that the hang does not happen if I run 'glmark2 -b texture' while on battery, however the fps result is a lot lower than with the Intel gpu. 

Might this provide any further clues to the problem?
Comment 8 Mauro Santos 2016-11-29 22:01:40 UTC
This is now working for me.

The fix was introduced sometime between stable kernel 4.8.6 and 4.8.7 and is still working fine with 4.8.11.

I haven't tried to find exactly which commit fixed things but given that it's working now I'll let it rest. If later there is a regression I now have a good starting point for a bisect and new bug report.

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.