diff options
| author | Abhinav Kumar <abhinavk@codeaurora.org> | 2017-02-09 20:27:24 -0800 |
|---|---|---|
| committer | Abhinav Kumar <abhinavk@codeaurora.org> | 2017-02-11 13:06:47 -0800 |
| commit | 1e7116212955d57cd93d39c40c25546e645438a7 (patch) | |
| tree | 29abf0f6a0c5dc2f9911ad2d14c206618e415e57 | |
| parent | 88fee0f3817730e279872a381b760833a146aa5b (diff) | |
drm/msm/sde: signal pending PAGE_FLIP events
Currently any pending PAGE_FLIP events are not signalled
by the drm driver. Userspace blocks on these events
to trigger a redraw. Add support to signal the PAGE_FLIP
complete events after commit is complete.
Change-Id: I887efc48f8890e5e1ed055f7016393a90fc26fa6
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_crtc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_crtc.c b/drivers/gpu/drm/msm/sde/sde_crtc.c index 05e6da14cec0..82da4c1bc86c 100644 --- a/drivers/gpu/drm/msm/sde/sde_crtc.c +++ b/drivers/gpu/drm/msm/sde/sde_crtc.c @@ -358,7 +358,17 @@ bool sde_crtc_is_rt(struct drm_crtc *crtc) return to_sde_crtc_state(crtc->state)->is_rt; } -/* if file!=NULL, this is preclose potential cancel-flip path */ +/** + * _sde_crtc_complete_flip - signal pending page_flip events + * Any pending vblank events are added to the vblank_event_list + * so that the next vblank interrupt shall signal them. + * However PAGE_FLIP events are not handled through the vblank_event_list. + * This API signals any pending PAGE_FLIP events requested through + * DRM_IOCTL_MODE_PAGE_FLIP and are cached in the sde_crtc->event. + * if file!=NULL, this is preclose potential cancel-flip path + * @crtc: Pointer to drm crtc structure + * @file: Pointer to drm file + */ static void _sde_crtc_complete_flip(struct drm_crtc *crtc, struct drm_file *file) { @@ -395,7 +405,7 @@ static void sde_crtc_vblank_cb(void *data) sde_crtc->vblank_cb_time = ktime_get(); else sde_crtc->vblank_cb_count++; - + _sde_crtc_complete_flip(crtc, NULL); drm_crtc_handle_vblank(crtc); DRM_DEBUG_VBL("crtc%d\n", crtc->base.id); SDE_EVT32_IRQ(DRMID(crtc)); |
