diff options
Diffstat (limited to 'src/amdgpu_dri2.c')
-rw-r--r-- | src/amdgpu_dri2.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c index a9238e5..96b2d17 100644 --- a/src/amdgpu_dri2.c +++ b/src/amdgpu_dri2.c @@ -873,13 +873,15 @@ CARD32 amdgpu_dri2_deferred_event(OsTimerPtr timer, CARD32 now, pointer data) scrn = crtc->scrn; pAMDGPUEnt = AMDGPUEntPriv(scrn); + drmmode_crtc = event_info->crtc->driver_private; ret = drmmode_get_current_ust(pAMDGPUEnt->fd, &drm_now); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "%s cannot get current time\n", __func__); if (event_info->drm_queue_seq) - amdgpu_drm_queue_handler(pAMDGPUEnt->fd, 0, 0, 0, - (void*)event_info->drm_queue_seq); + drmmode_crtc->drmmode->event_context. + vblank_handler(pAMDGPUEnt->fd, 0, 0, 0, + (void*)event_info->drm_queue_seq); else amdgpu_dri2_frame_event_handler(crtc, 0, 0, data); return 0; @@ -888,15 +890,15 @@ CARD32 amdgpu_dri2_deferred_event(OsTimerPtr timer, CARD32 now, pointer data) * calculate the frame number from current time * that would come from CRTC if it were running */ - drmmode_crtc = event_info->crtc->driver_private; delta_t = drm_now - (CARD64) drmmode_crtc->dpms_last_ust; delta_seq = delta_t * drmmode_crtc->dpms_last_fps; delta_seq /= 1000000; frame = (CARD64) drmmode_crtc->dpms_last_seq + delta_seq; if (event_info->drm_queue_seq) - amdgpu_drm_queue_handler(pAMDGPUEnt->fd, frame, drm_now / 1000000, - drm_now % 1000000, - (void*)event_info->drm_queue_seq); + drmmode_crtc->drmmode->event_context. + vblank_handler(pAMDGPUEnt->fd, frame, drm_now / 1000000, + drm_now % 1000000, + (void*)event_info->drm_queue_seq); else amdgpu_dri2_frame_event_handler(crtc, frame, drm_now, data); return 0; |