Summary: | [regression] Fullscreen video no longer smooth with GPU in low power mode | ||
---|---|---|---|
Product: | Mesa | Reporter: | Sven Arvidsson <sa> |
Component: | Drivers/Gallium/r600 | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | simon.farnsworth |
Version: | 8.0 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Always spin first
Different route to spinning in preference to in-kernel waits for short fences A program to stop the CPU entering low power states |
Description
Sven Arvidsson
2012-05-07 13:11:36 UTC
Created attachment 61210 [details] [review] Always spin first Does this patch help? Created attachment 61213 [details] [review] Different route to spinning in preference to in-kernel waits for short fences If Michel's patch helps, would you mind trying this patch instead? The difference is that Michel's patch doesn't have the early abort if the kernel says the GPU has completed the command batch we're waiting for, while this patch does. Both patches will cause Mesa to spin 256 times before it goes to sleep waiting for the GPU to have completed a command batch. For background, I'm working with the Fusion E-350 chip; I'm thus CPU-limited. The goal of the original patch is twofold: 1) Don't spin on CPU when you're going to have to wait for a long time for the GPU to finish work - go to sleep waiting for the GPU to complete. 2) Don't keep spinning when the GPU has completed the command batch that includes the fence - it's not going to change state again, absent bugs, so we should cease spinning now. If Michel's patch helps, and this patch does not, it indicates that there are problems with attempting to wait in the kernel. If neither patch helps, we have a deeper issue to diagnose. Neither patch seems to help unfortunately. If anything, I'd say they both make the problem worse. Does forcing the CPU into the highest power state fix the issue? I suspect that the patch reduces CPU usage which in turn means the CPU power state stays lower longer. Created attachment 61271 [details]
A program to stop the CPU entering low power states
Trying a different route. Can you compile the attached program with "gcc -o stopsleep stopsleep.c" and leave it running while playing a video? It tells the kernel to avoid using deep sleep states when idling.
If it helps, we have a clue. If it doesn't, and video decode doesn't saturate all your CPU cores, can you try running "while true ; do true ; done" in a background shell and see if that helps?
The goal of both of these is to see if the problem is that we're now letting the CPU idle more than we used to, and finding that the resulting power save modes hurt.
I have tried both stopsleep and the shell loop now, but sadly neither one gets rid of the problem. I get the feeling that there's less stalls with them, but video playback isn't as smooth as it is with power profile mid (or the change reverted). I could be wrong about this though, it's hard to be sure with this kind of intermittent bug. With Mesa 9.2 and other modern components fullscreen video is smooth in low power mode once again. I guess this is less relevant anyhow what with UVD and dynamic power management also being available. |
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.