[PATCH 3/3] Move radeon_drm_handler/abort_proc fields to drmmode_flipdata_rec
Michel Dänzer
michel at daenzer.net
Thu Mar 26 01:01:27 PDT 2015
From: Michel Dänzer <michel.daenzer at amd.com>
Their values are the same for all DRM flip ioctl calls.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/drmmode_display.c | 10 +++++-----
src/drmmode_display.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index bd1ab76..be02a8b 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);
}
@@ -1866,8 +1866,8 @@ drmmode_flip_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec, void *even
/* Deliver cached msc, ust from reference crtc to flip event handler */
if (flipdata->event_data && flipdata->flip_count == 1)
- 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);
@@ -2323,6 +2323,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)
@@ -2343,8 +2345,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