struct device *dev;
struct drm_device *drm_dev;
bool is_enabled;
- bool vblank_active;
/* mutex vsync_ work */
struct mutex vsync_mutex;
rockchip_drm_psr_flush(crtc);
spin_lock_irq(&crtc->dev->event_lock);
- vop->vblank_active = true;
- WARN_ON(drm_crtc_vblank_get(crtc) != 0);
- WARN_ON(vop->event);
-
if (crtc->state->event) {
+ WARN_ON(drm_crtc_vblank_get(crtc) != 0);
+ WARN_ON(vop->event);
+
vop->event = crtc->state->event;
crtc->state->event = NULL;
}
spin_lock_irqsave(&drm->event_lock, flags);
if (vop->event) {
drm_crtc_send_vblank_event(crtc, vop->event);
- vop->event = NULL;
-
- }
- if (vop->vblank_active) {
- vop->vblank_active = false;
drm_crtc_vblank_put(crtc);
+ vop->event = NULL;
}
spin_unlock_irqrestore(&drm->event_lock, flags);
clk_disable(vop->aclk);
vop->is_enabled = false;
- vop->vblank_active = false;
return 0;