Commit a5f7f2e6 authored by Tom Denis's avatar Tom Denis Committed by Michel Dänzer
Browse files

Move amdgpu_drm_handler/abort_proc fields to drmmode_flipdata_re



Based on radeon commit de5ddd09db82141b263338dcf0c28e01f58268ee

Their values are the same for all DRM flip ioctl calls within a single
radeon_do_pageflip() call.
Signed-off-by: Tom Denis's avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent e14e3560
......@@ -1816,7 +1816,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);
}
......@@ -1837,9 +1837,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);
......@@ -2314,6 +2314,8 @@ Bool amdgpu_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)
......@@ -2335,8 +2337,6 @@ Bool amdgpu_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 = amdgpu_drm_queue_alloc(scrn, client, id,
flipcarrier,
......
......@@ -63,13 +63,13 @@ typedef struct {
void *event_data;
unsigned int fe_frame;
uint64_t fe_usec;
amdgpu_drm_handler_proc handler;
amdgpu_drm_abort_proc abort;
} drmmode_flipdata_rec, *drmmode_flipdata_ptr;
typedef struct {
drmmode_flipdata_ptr flipdata;
Bool dispatch_me;
amdgpu_drm_handler_proc handler;
amdgpu_drm_abort_proc abort;
} drmmode_flipevtcarrier_rec, *drmmode_flipevtcarrier_ptr;
struct drmmode_scanout {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment