diff mbox

[Bug,38800] glXSwapBuffersMscOML is slow on AMD Fusion but not on Intel 945 w/Atom

Message ID 20110706142411.CAE0213004F@annarchy.freedesktop.org (mailing list archive)
State New, archived
Headers show

Commit Message

bugzilla-daemon@freedesktop.org July 6, 2011, 2:24 p.m. UTC
https://bugs.freedesktop.org/show_bug.cgi?id=38800

--- Comment #20 from Simon Farnsworth <simon.farnsworth@onelan.co.uk> 2011-07-06 07:24:10 PDT ---
So, this is a gross hack to demonstrate that it's the delaying of the pageflip
that's hurting me:

[sfarnsworth@f12simon airlied-drm-fixes]$ git diff
 pflip_cleanup2:

With this bit of evil in place, I get 60fps at 1920x1200.
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_display.c
b/drivers/gpu/drm/radeon/radeon_display.c
index 292f73f..b3c5630 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -475,6 +475,13 @@  static int radeon_crtc_page_flip(struct drm_crtc *crtc,
        /* fire the ring */
        radeon_ring_unlock_commit(rdev);

+       spin_lock_irqsave(&dev->event_lock, flags);
+       if (!radeon_crtc->deferred_flip_completion) {
+               radeon_page_flip(rdev, radeon_crtc->crtc_id,
work->new_crtc_base);
+               radeon_crtc->deferred_flip_completion = 1;
+       }
+       spin_unlock_irqrestore(&dev->event_lock, flags);
+
        return 0;