drm/rockchip: Fix crtc_state->event signalling
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 8 Jun 2016 12:19:11 +0000 (14:19 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Jun 2016 15:11:18 +0000 (17:11 +0200)
commit4f9d39a78e1d3100b990ec30da5a14a059e0a304
treeb4a6b4db5035812f64fe7978879dfe0e9b87ec48
parent05c960e79dbcd751bbcae148a01121dddf997465
drm/rockchip: Fix crtc_state->event signalling

It's not permissible to look at plane->state from interrupt context,
since doing that would need the irq handler to acquire the
plane->mutex lock.

The other problem is that if we pipeline updates using the new
nonblocking atomic helpers new state gets commit before the irq
handler fires, resulting in a lost event.

Fix both issues by caching the necessary values in vop_win, protected
by dev->event_lock.

Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Mark yao <mark.yao@rock-chips.com>
Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-19-git-send-email-daniel.vetter@ffwll.ch
drivers/gpu/drm/rockchip/rockchip_drm_vop.c