diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-05-21 12:54:31 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-02-27 15:16:37 +0900 |
commit | f5d968cbba3c9b7ec202161f2157d8d64778c817 (patch) | |
tree | aefb4207f9cff1ee6eb6037c4c36e80aa90d5d8c /src/radeon_kms.c | |
parent | e87365117acbd80b7d80fbb5eb30890ef7153291 (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_kms.c')
-rw-r--r-- | src/radeon_kms.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index d93a4cec..37689837 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -401,21 +401,20 @@ radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id) } static void -radeon_scanout_update_abort(ScrnInfoPtr scrn, void *event_data) +radeon_scanout_update_abort(xf86CrtcPtr crtc, void *event_data) { - xf86CrtcPtr xf86_crtc = event_data; - drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private; + drmmode_crtc_private_ptr drmmode_crtc = event_data; drmmode_crtc->scanout_update_pending = FALSE; } void -radeon_scanout_update_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec, +radeon_scanout_update_handler(xf86CrtcPtr crtc, uint32_t frame, uint64_t usec, void *event_data) { - radeon_scanout_do_update(event_data, 0); + radeon_scanout_do_update(crtc, 0); - radeon_scanout_update_abort(scrn, event_data); + radeon_scanout_update_abort(crtc, event_data); } static void @@ -451,9 +450,10 @@ radeon_scanout_update(xf86CrtcPtr xf86_crtc) return; scrn = xf86_crtc->scrn; - drm_queue_entry = radeon_drm_queue_alloc(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, + drm_queue_entry = radeon_drm_queue_alloc(xf86_crtc, + RADEON_DRM_QUEUE_CLIENT_DEFAULT, RADEON_DRM_QUEUE_ID_DEFAULT, - xf86_crtc, + drmmode_crtc, radeon_scanout_update_handler, radeon_scanout_update_abort); if (!drm_queue_entry) { @@ -478,7 +478,7 @@ radeon_scanout_update(xf86CrtcPtr xf86_crtc) } static void -radeon_scanout_flip_abort(ScrnInfoPtr scrn, void *event_data) +radeon_scanout_flip_abort(xf86CrtcPtr crtc, void *event_data) { drmmode_crtc_private_ptr drmmode_crtc = event_data; @@ -502,7 +502,8 @@ radeon_scanout_flip(ScreenPtr pScreen, RADEONInfoPtr info, return; scrn = xf86_crtc->scrn; - drm_queue_entry = radeon_drm_queue_alloc(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, + drm_queue_entry = radeon_drm_queue_alloc(xf86_crtc, + RADEON_DRM_QUEUE_CLIENT_DEFAULT, RADEON_DRM_QUEUE_ID_DEFAULT, drmmode_crtc, NULL, radeon_scanout_flip_abort); |