[RFC PATCH 2/6] drm/hdlcd: use helper for arming crtc completion event
Andrzej Hajda
a.hajda at samsung.com
Tue Sep 27 13:36:15 UTC 2016
Replace custom code with core helper.
Signed-off-by: Andrzej Hajda <a.hajda at samsung.com>
---
drivers/gpu/drm/arm/hdlcd_crtc.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
index 48019ae..a17ddb5 100644
--- a/drivers/gpu/drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -182,18 +182,7 @@ static int hdlcd_crtc_atomic_check(struct drm_crtc *crtc,
static void hdlcd_crtc_atomic_begin(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{
- struct drm_pending_vblank_event *event = crtc->state->event;
-
- if (event) {
- crtc->state->event = NULL;
-
- spin_lock_irq(&crtc->dev->event_lock);
- 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);
- }
+ drm_crtc_arm_completion_event(crtc);
}
static const struct drm_crtc_helper_funcs hdlcd_crtc_helper_funcs = {
--
2.7.4
More information about the dri-devel
mailing list