|
@@ -85,16 +85,28 @@ static void exynos_crtc_atomic_flush(struct drm_crtc *crtc,
|
|
|
struct drm_crtc_state *old_crtc_state)
|
|
|
{
|
|
|
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
|
|
|
- struct drm_pending_vblank_event *event;
|
|
|
- unsigned long flags;
|
|
|
|
|
|
if (exynos_crtc->ops->atomic_flush)
|
|
|
exynos_crtc->ops->atomic_flush(exynos_crtc);
|
|
|
+}
|
|
|
+
|
|
|
+static const struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
|
|
|
+ .enable = exynos_drm_crtc_enable,
|
|
|
+ .disable = exynos_drm_crtc_disable,
|
|
|
+ .mode_set_nofb = exynos_drm_crtc_mode_set_nofb,
|
|
|
+ .atomic_check = exynos_crtc_atomic_check,
|
|
|
+ .atomic_begin = exynos_crtc_atomic_begin,
|
|
|
+ .atomic_flush = exynos_crtc_atomic_flush,
|
|
|
+};
|
|
|
+
|
|
|
+void exynos_crtc_handle_event(struct exynos_drm_crtc *exynos_crtc)
|
|
|
+{
|
|
|
+ struct drm_crtc *crtc = &exynos_crtc->base;
|
|
|
+ struct drm_pending_vblank_event *event = crtc->state->event;
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
- event = crtc->state->event;
|
|
|
if (event) {
|
|
|
crtc->state->event = NULL;
|
|
|
-
|
|
|
spin_lock_irqsave(&crtc->dev->event_lock, flags);
|
|
|
if (drm_crtc_vblank_get(crtc) == 0)
|
|
|
drm_crtc_arm_vblank_event(crtc, event);
|
|
@@ -105,15 +117,6 @@ static void exynos_crtc_atomic_flush(struct drm_crtc *crtc,
|
|
|
|
|
|
}
|
|
|
|
|
|
-static const struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
|
|
|
- .enable = exynos_drm_crtc_enable,
|
|
|
- .disable = exynos_drm_crtc_disable,
|
|
|
- .mode_set_nofb = exynos_drm_crtc_mode_set_nofb,
|
|
|
- .atomic_check = exynos_crtc_atomic_check,
|
|
|
- .atomic_begin = exynos_crtc_atomic_begin,
|
|
|
- .atomic_flush = exynos_crtc_atomic_flush,
|
|
|
-};
|
|
|
-
|
|
|
static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
|
|
|
{
|
|
|
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
|