[PATCH xf86-video-ati 2/3] present: Use async flip for unflip if possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michel Dänzer <michel.daenzer@xxxxxxx>

In that case, unflip operations should finish faster in general.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_present.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/radeon_present.c b/src/radeon_present.c
index 6409fe36d..01409ffac 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -48,6 +48,8 @@
 
 #include "present.h"
 
+static present_screen_info_rec radeon_present_screen_info;
+
 struct radeon_present_vblank_event {
     uint64_t event_id;
     Bool unflip;
@@ -370,6 +372,9 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
     struct radeon_present_vblank_event *event;
     PixmapPtr pixmap = screen->GetScreenPixmap(screen);
+    enum drmmode_flip_sync flip_sync =
+	(radeon_present_screen_info.capabilities & PresentCapabilityAsync) ?
+	FLIP_ASYNC : FLIP_VSYNC;
     uint32_t handle;
     int old_fb_id;
     int i;
@@ -396,7 +401,7 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
 
     if (radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, handle,
 			   event_id, event, -1, radeon_present_flip_event,
-			   radeon_present_flip_abort, FLIP_VSYNC, 0))
+			   radeon_present_flip_abort, flip_sync, 0))
 	return;
 
 modeset:
-- 
2.11.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux