[PATCH 3/3] Move radeon_drm_handler/abort_proc fields to drmmode_flipdata_rec v2
Michel Dänzer
michel at daenzer.net
Thu Mar 26 01:30:27 PDT 2015
From: Michel Dänzer <michel.daenzer at amd.com>
Their values are the same for all DRM flip ioctl calls.
v2: Adapt to v2 of patch 1
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/drmmode_display.c | 12 ++++++------
src/drmmode_display.h | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 74c5d1d..fd49805 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1846,7 +1846,7 @@ drmmode_flip_abort(ScrnInfoPtr scrn, void *event_data)
drmmode_flipdata_ptr flipdata = flipcarrier->flipdata;
if (flipdata->flip_count == 1)
- flipcarrier->abort(scrn, flipdata->event_data);
+ flipdata->abort(scrn, flipdata->event_data);
drmmode_flip_free(flipcarrier);
}
@@ -1867,9 +1867,9 @@ drmmode_flip_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec, void *even
if (flipdata->flip_count == 1) {
/* Deliver cached msc, ust from reference crtc to flip event handler */
if (flipdata->event_data)
- flipcarrier->handler(scrn, flipdata->fe_frame,
- flipdata->fe_usec,
- flipdata->event_data);
+ flipdata->handler(scrn, flipdata->fe_frame,
+ flipdata->fe_usec,
+ flipdata->event_data);
/* Release framebuffer */
drmModeRmFB(flipdata->drmmode->fd, flipdata->old_fb_id);
@@ -2326,6 +2326,8 @@ Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
flipdata->event_data = data;
flipdata->drmmode = drmmode;
+ flipdata->handler = handler;
+ flipdata->abort = abort;
for (i = 0; i < config->num_crtc; i++) {
if (!config->crtc[i]->enabled)
@@ -2346,8 +2348,6 @@ Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
*/
flipcarrier->dispatch_me = (drmmode_crtc->hw_id == ref_crtc_hw_id);
flipcarrier->flipdata = flipdata;
- flipcarrier->handler = handler;
- flipcarrier->abort = abort;
drm_queue = radeon_drm_queue_alloc(scrn, client, id,
flipcarrier,
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index b3804ba..c6c076c 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -63,13 +63,13 @@ typedef struct {
void *event_data;
unsigned int fe_frame;
uint64_t fe_usec;
+ radeon_drm_handler_proc handler;
+ radeon_drm_abort_proc abort;
} drmmode_flipdata_rec, *drmmode_flipdata_ptr;
typedef struct {
drmmode_flipdata_ptr flipdata;
Bool dispatch_me;
- radeon_drm_handler_proc handler;
- radeon_drm_abort_proc abort;
} drmmode_flipevtcarrier_rec, *drmmode_flipevtcarrier_ptr;
typedef struct {
--
2.1.4
More information about the xorg-driver-ati
mailing list