diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-03-26 16:33:02 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-03-30 10:57:30 +0900 |
commit | de5ddd09db82141b263338dcf0c28e01f58268ee (patch) | |
tree | 6b720b674545eaa210a3b5349adfbdef17c08d39 /src/drmmode_display.c | |
parent | e8c0f6319fbf4c3ea11e22ab1a68837031bdec8c (diff) |
Move radeon_drm_handler/abort_proc fields to drmmode_flipdata_rec
Their values are the same for all DRM flip ioctl calls within a single
radeon_do_pageflip() call.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 285e7b47..e81c6d48 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, |