summaryrefslogtreecommitdiff
path: root/src/radeon_drm_queue.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2015-05-21 12:54:31 +0900
committerMichel Dänzer <michel@daenzer.net>2016-02-27 15:16:37 +0900
commitf5d968cbba3c9b7ec202161f2157d8d64778c817 (patch)
treeaefb4207f9cff1ee6eb6037c4c36e80aa90d5d8c /src/radeon_drm_queue.c
parente87365117acbd80b7d80fbb5eb30890ef7153291 (diff)
Make DRM event queue xf86CrtcPtr based instead of ScrnInfoPtr based
This allows for a minor simplification of the code. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_drm_queue.c')
-rw-r--r--src/radeon_drm_queue.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c
index a50a1fde..25fb1835 100644
--- a/src/radeon_drm_queue.c
+++ b/src/radeon_drm_queue.c
@@ -42,7 +42,7 @@ struct radeon_drm_queue_entry {
uint64_t id;
void *data;
ClientPtr client;
- ScrnInfoPtr scrn;
+ xf86CrtcPtr crtc;
radeon_drm_handler_proc handler;
radeon_drm_abort_proc abort;
};
@@ -65,11 +65,11 @@ radeon_drm_queue_handler(int fd, unsigned int frame, unsigned int sec,
if (e == user_data) {
xorg_list_del(&e->list);
if (e->handler)
- e->handler(e->scrn, frame,
+ e->handler(e->crtc, frame,
(uint64_t)sec * 1000000 + usec,
e->data);
else
- e->abort(e->scrn, e->data);
+ e->abort(e->crtc, e->data);
free(e);
break;
}
@@ -81,7 +81,7 @@ radeon_drm_queue_handler(int fd, unsigned int frame, unsigned int sec,
* appears, we've got data to pass to the handler from here
*/
struct radeon_drm_queue_entry *
-radeon_drm_queue_alloc(ScrnInfoPtr scrn, ClientPtr client,
+radeon_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client,
uint64_t id, void *data,
radeon_drm_handler_proc handler,
radeon_drm_abort_proc abort)
@@ -93,7 +93,7 @@ radeon_drm_queue_alloc(ScrnInfoPtr scrn, ClientPtr client,
return NULL;
e->client = client;
- e->scrn = scrn;
+ e->crtc = crtc;
e->id = id;
e->data = data;
e->handler = handler;
@@ -113,7 +113,7 @@ static void
radeon_drm_abort_one(struct radeon_drm_queue_entry *e)
{
xorg_list_del(&e->list);
- e->abort(e->scrn, e->data);
+ e->abort(e->crtc, e->data);
free(e);
}
@@ -181,7 +181,7 @@ radeon_drm_queue_close(ScrnInfoPtr scrn)
struct radeon_drm_queue_entry *e, *tmp;
xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) {
- if (e->scrn == scrn)
+ if (e->crtc->scrn == scrn)
radeon_drm_abort_one(e);
}