diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-02-08 18:14:30 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-05-11 18:49:55 +0900 |
commit | 944391b0052466b71bf9919b56139dc197a7e072 (patch) | |
tree | 8eba0d64fc228f19d4ce976e7c2ce84033ab3457 /src/radeon_present.c | |
parent | f32c45194ac6f82cbe42d255ed72f857018778e0 (diff) |
Pass pixmap instead of handle to radeon_do_pageflip
This brings us in line with amdgpu and prepares for the following
change, no functional change intended.
(Ported from amdgpu commit e463b849f3e9d7b69e64a65619a22e00e78d297b)
v2:
* Be more consistent with the amdgpu code, which should make porting
the following change to amdgpu easier
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_present.c')
-rw-r--r-- | src/radeon_present.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/radeon_present.c b/src/radeon_present.c index af55e462..90632d0e 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -332,15 +332,11 @@ radeon_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, struct radeon_present_vblank_event *event; xf86CrtcPtr xf86_crtc = crtc->devPrivate; int crtc_id = xf86_crtc ? drmmode_get_crtc_id(xf86_crtc) : -1; - uint32_t handle; Bool ret; if (!radeon_present_check_flip(crtc, screen->root, pixmap, sync_flip)) return FALSE; - if (!radeon_get_pixmap_handle(pixmap, &handle)) - return FALSE; - event = calloc(1, sizeof(struct radeon_present_vblank_event)); if (!event) return FALSE; @@ -349,7 +345,7 @@ radeon_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, radeon_cs_flush_indirect(scrn); - ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, handle, + ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, pixmap, event_id, event, crtc_id, radeon_present_flip_event, radeon_present_flip_abort, @@ -377,7 +373,6 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id) 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; @@ -386,12 +381,6 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id) if (!radeon_present_check_unflip(scrn)) goto modeset; - if (!radeon_get_pixmap_handle(pixmap, &handle)) { - ErrorF("%s: radeon_get_pixmap_handle failed, display might freeze\n", - __func__); - goto modeset; - } - event = calloc(1, sizeof(struct radeon_present_vblank_event)); if (!event) { ErrorF("%s: calloc failed, display might freeze\n", __func__); @@ -401,7 +390,7 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id) event->event_id = event_id; event->unflip = TRUE; - if (radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, handle, + if (radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, pixmap, event_id, event, -1, radeon_present_flip_event, radeon_present_flip_abort, flip_sync, 0)) return; |