[PATCH 1/3] Make radeon_do_pageflip take a BO handle directly

Michel Dänzer michel at daenzer.net
Wed Mar 18 21:10:36 PDT 2015


From: Michel Dänzer <michel.daenzer at amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/drmmode_display.c | 4 ++--
 src/drmmode_display.h | 2 +-
 src/radeon_dri2.c     | 5 +++--
 src/radeon_present.c  | 4 ++--
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 86bc446..f719f0c 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2265,7 +2265,7 @@ void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode)
 }
 
 Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
-			struct radeon_bo *new_front, uint64_t id, void *data,
+			uint32_t new_front_handle, uint64_t id, void *data,
 			int ref_crtc_hw_id, radeon_drm_handler_proc handler,
 			radeon_drm_abort_proc abort)
 {
@@ -2301,7 +2301,7 @@ Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
 	old_fb_id = drmmode->fb_id;
 	if (drmModeAddFB(drmmode->fd, scrn->virtualX, height,
 			 scrn->depth, scrn->bitsPerPixel, pitch,
-			 new_front->handle, &drmmode->fb_id))
+			 new_front_handle, &drmmode->fb_id))
 		goto error_out;
 
         flipdata = calloc(1, sizeof(drmmode_flipdata_rec));
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 6f883c0..b3804ba 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -129,7 +129,7 @@ extern int drmmode_get_pitch_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
 extern int drmmode_get_base_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
 
 Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
-			struct radeon_bo *new_front, uint64_t id, void *data,
+			uint32_t new_front_handle, uint64_t id, void *data,
 			int ref_crtc_hw_id, radeon_drm_handler_proc handler,
 			radeon_drm_abort_proc abort);
 int drmmode_crtc_get_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc);
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 02e8e8f..2636456 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -647,8 +647,9 @@ radeon_dri2_schedule_flip(ScrnInfoPtr scrn, ClientPtr client,
     back_priv = back->driverPrivate;
     bo = radeon_get_pixmap_bo(back_priv->pixmap);
 
-    return radeon_do_pageflip(scrn, client, bo, RADEON_DRM_QUEUE_ID_DEFAULT,
-			      flip_info, ref_crtc_hw_id,
+    return radeon_do_pageflip(scrn, client, bo->handle,
+			      RADEON_DRM_QUEUE_ID_DEFAULT, flip_info,
+			      ref_crtc_hw_id,
 			      radeon_dri2_flip_event_handler,
 			      radeon_dri2_flip_event_abort);
 }
diff --git a/src/radeon_present.c b/src/radeon_present.c
index 0aa96cf..9d774ab 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -301,7 +301,7 @@ radeon_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc,
 
     event->event_id = event_id;
 
-    ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, bo,
+    ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, bo->handle,
 			     event_id, event, crtc_id,
 			     radeon_present_flip_event,
 			     radeon_present_flip_abort);
@@ -336,7 +336,7 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
 
     event->event_id = event_id;
 
-    ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, bo,
+    ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, bo->handle,
 			     event_id, event, -1, radeon_present_flip_event,
 			     radeon_present_flip_abort);
     if (!ret)
-- 
2.1.4



More information about the xorg-driver-ati mailing list