Bug 33512 - radeon: lots of time spent in atombios_crtc_disable
Summary: radeon: lots of time spent in atombios_crtc_disable
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-17 20:41 UTC by Török Edwin
Modified: 2012-08-20 15:50 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.39-rc3
Tree: Mainline
Regression: No


Attachments
dmesg (122.54 KB, application/octet-stream)
2011-04-17 20:41 UTC, Török Edwin
Details
Xorg.0.log (485.40 KB, text/x-log)
2011-04-17 20:45 UTC, Török Edwin
Details

Description Török Edwin 2011-04-17 20:41:17 UTC
Created attachment 54532 [details]
dmesg

On a mostly idle system this is what I see with perf top (after exiting a game):
---------------------------------------------------------------------------
   PerfTop:     386 irqs/sec  kernel:72.8%  exact:  0.0% [1000Hz cycles],  (all, 6 CPUs)
---------------------------------------------------------------------------

             samples  pcnt function                       DSO
             _______ _____ ______________________________ 
              171.00 18.0% atombios_crtc_disable          /lib/modules/2.6.39-rc3-phenom-00117-ge38f5b7/kernel/drivers/gpu/drm/radeon/radeon.ko
               47.00  4.9% find_next_bit                  [kernel.kallsyms]                                                                 
               31.00  3.3% format_decode                  [kernel.kallsyms]                                     


When playing a game that function is still on top, albeit with a lower percentage (7.5%).
If the function does what its name says then it should be called at most once, when switching modes, entering standby, etc. I don't see why it is being called during normal operation, and why is it called so many times that it makes it the top function using the CPU...

The graphics in games is quite laggy too, maybe because of this...

My dmesg is attached.
Comment 1 Török Edwin 2011-04-17 20:45:53 UTC
Created attachment 54542 [details]
Xorg.0.log

Xorg log attached too
Comment 2 Michel Dänzer 2011-08-05 07:25:50 UTC
My best guess is that it's page flipping related, but it would be good to confirm that, e.g. by somehow triggering a backtrace from atombios_crtc_disable.

It might also be interesting to add some debugging output to atombios_crtc_disable to narrow down where it's spending so much time. But if my assumption turns out to be true that it keeps getting called on page flips, we might just need to somehow no-op repeated calls.
Comment 3 Alex Deucher 2011-08-05 13:52:21 UTC
The only places atombios_crtc_disable() called are from drm_crtc_helper_set_config() and drm_helper_resume_force_mode().  I suspect what is happening is that certain games cause GPU resets which call radeon_gpu_reset() which in turn calls drm_helper_resume_force_mode().  I don't think this is a kernel bug at all.  I'd suggest trying a newer mesa if you are using an older version.  Try 7.11.  Do you see GPU reset messages in your dmesg output after running a problematic game?
Comment 4 Török Edwin 2011-08-05 13:58:50 UTC
(In reply to comment #3)
> The only places atombios_crtc_disable() called are from
> drm_crtc_helper_set_config() and drm_helper_resume_force_mode().  I suspect
> what is happening is that certain games cause GPU resets which call
> radeon_gpu_reset() which in turn calls drm_helper_resume_force_mode().  I
> don't
> think this is a kernel bug at all.  I'd suggest trying a newer mesa if you
> are
> using an older version.  Try 7.11.

I'm using git master now, and it works far better than 7.10 or 7.11.

>  Do you see GPU reset messages in your dmesg
> output after running a problematic game?

I didn't look much at perf output lately, will have to try and see if this is still an issue with latest mesa, and report back.

Note You need to log in before you can comment on or make changes to this bug.