Skip to content

Instantly share code, notes, and snippets.

@Themaister
Created September 20, 2012 19:00
Show Gist options
  • Save Themaister/3757696 to your computer and use it in GitHub Desktop.
Save Themaister/3757696 to your computer and use it in GitHub Desktop.
From a4cf36d4f918195c7d39e58a893aac6f528514a4 Mon Sep 17 00:00:00 2001
From: Themaister <[email protected]>
Date: Thu, 20 Sep 2012 16:09:33 +0200
Subject: [PATCH] Always assume that page flip works in radeon.
This is a hack that avoids prolonged stalling in userspace when a page
flip doesn't go through on first try. This patch assumes that it is more
important that userspace is allowed to continue rendering new frames
rather than stalling for a whole frame waiting for old data to render.
---
drivers/gpu/drm/radeon/radeon_display.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 7ddef8f..aed70cb 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -297,6 +297,13 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id)
radeon_crtc->deferred_flip_completion = 0;
}
+ /* HACK: Assume that page flip has completed to avoid stalling,
+ * waiting for a page-flip that isn't *that* important anyways. */
+ if (update_pending) {
+ DRM_DEBUG_KMS("Page flip was deferred, but ignored it.\n");
+ update_pending = 0;
+ }
+
/* Has the pageflip already completed in crtc, or is it certain
* to complete in this vblank?
*/
--
1.7.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment