summaryrefslogtreecommitdiff
path: root/src/radeon_present.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-02-10 12:52:02 +0900
committerMichel Dänzer <michel@daenzer.net>2017-03-01 16:57:34 +0900
commit0a4eb0e12f0c9c653cf4cea6fd62e1a507eb261c (patch)
tree8f99a0098c98635b7521ea42358131c0af4172ca /src/radeon_present.c
parent9a951a3e551db58ba50e7a594521ceac54d90615 (diff)
present: Use async flip for unflip if possible
In that case, unflip operations should finish faster in general. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_present.c')
-rw-r--r--src/radeon_present.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/radeon_present.c b/src/radeon_present.c
index 6409fe36..01409ffa 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: