Commit 9433bd67 authored by Daniel Vetter's avatar Daniel Vetter

drm/fsl-du: Implement some semblance of vblank event handling

No idea how exactly fsl-du commits hw state changes, but here in flush
is probably the safest place.

While at it nuke the dummy functions.

v2: Be more robust and either arm, when the CRTC is on, or just send
the event out right away.

Cc: Stefan Agner <stefan@agner.ch>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-4-git-send-email-daniel.vetter@ffwll.ch
parent ed4f8856
...@@ -22,20 +22,21 @@ ...@@ -22,20 +22,21 @@
#include "fsl_dcu_drm_drv.h" #include "fsl_dcu_drm_drv.h"
#include "fsl_dcu_drm_plane.h" #include "fsl_dcu_drm_plane.h"
static void fsl_dcu_drm_crtc_atomic_begin(struct drm_crtc *crtc, static void fsl_dcu_drm_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_crtc_state *old_crtc_state) struct drm_crtc_state *old_crtc_state)
{ {
} struct drm_pending_vblank_event *event = crtc->state->event;
static int fsl_dcu_drm_crtc_atomic_check(struct drm_crtc *crtc, if (event) {
struct drm_crtc_state *state) crtc->state->event = NULL;
{
return 0;
}
static void fsl_dcu_drm_crtc_atomic_flush(struct drm_crtc *crtc, spin_lock_irq(&crtc->dev->event_lock);
struct drm_crtc_state *old_crtc_state) if (drm_crtc_vblank_get(crtc) == 0)
{ drm_crtc_arm_vblank_event(crtc, event);
else
drm_crtc_send_vblank_event(crtc, event);
spin_unlock_irq(&crtc->dev->event_lock);
}
} }
static void fsl_dcu_drm_disable_crtc(struct drm_crtc *crtc) static void fsl_dcu_drm_disable_crtc(struct drm_crtc *crtc)
...@@ -117,8 +118,6 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) ...@@ -117,8 +118,6 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
} }
static const struct drm_crtc_helper_funcs fsl_dcu_drm_crtc_helper_funcs = { static const struct drm_crtc_helper_funcs fsl_dcu_drm_crtc_helper_funcs = {
.atomic_begin = fsl_dcu_drm_crtc_atomic_begin,
.atomic_check = fsl_dcu_drm_crtc_atomic_check,
.atomic_flush = fsl_dcu_drm_crtc_atomic_flush, .atomic_flush = fsl_dcu_drm_crtc_atomic_flush,
.disable = fsl_dcu_drm_disable_crtc, .disable = fsl_dcu_drm_disable_crtc,
.enable = fsl_dcu_drm_crtc_enable, .enable = fsl_dcu_drm_crtc_enable,
......
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