return !!line_flag_irq;
 }
 
-static void vop_line_flag_irq_enable(struct vop *vop, int line_num)
+static void vop_line_flag_irq_enable(struct vop *vop)
 {
        unsigned long flags;
 
 
        spin_lock_irqsave(&vop->irq_lock, flags);
 
-       VOP_CTRL_SET(vop, line_flag_num[0], line_num);
        VOP_INTR_SET_TYPE(vop, clear, LINE_FLAG_INTR, 1);
        VOP_INTR_SET_TYPE(vop, enable, LINE_FLAG_INTR, 1);
 
        VOP_CTRL_SET(vop, vact_st_end, val);
        VOP_CTRL_SET(vop, vpost_st_end, val);
 
+       VOP_CTRL_SET(vop, line_flag_num[0], vact_end);
+
        clk_set_rate(vop->dclk, adjusted_mode->clock * 1000);
 
        VOP_CTRL_SET(vop, standby, 0);
 }
 
 /**
- * rockchip_drm_wait_line_flag - acqiure the give line flag event
+ * rockchip_drm_wait_vact_end
  * @crtc: CRTC to enable line flag
- * @line_num: interested line number
  * @mstimeout: millisecond for timeout
  *
- * Driver would hold here until the interested line flag interrupt have
- * happened or timeout to wait.
+ * Wait for vact_end line flag irq or timeout.
  *
  * Returns:
  * Zero on success, negative errno on failure.
  */
-int rockchip_drm_wait_line_flag(struct drm_crtc *crtc, unsigned int line_num,
-                               unsigned int mstimeout)
+int rockchip_drm_wait_vact_end(struct drm_crtc *crtc, unsigned int mstimeout)
 {
        struct vop *vop = to_vop(crtc);
        unsigned long jiffies_left;
        if (!crtc || !vop->is_enabled)
                return -ENODEV;
 
-       if (line_num > crtc->mode.vtotal || mstimeout <= 0)
+       if (mstimeout <= 0)
                return -EINVAL;
 
        if (vop_line_flag_irq_is_enabled(vop))
                return -EBUSY;
 
        reinit_completion(&vop->line_flag_completion);
-       vop_line_flag_irq_enable(vop, line_num);
+       vop_line_flag_irq_enable(vop);
 
        jiffies_left = wait_for_completion_timeout(&vop->line_flag_completion,
                                                   msecs_to_jiffies(mstimeout));
 
        return 0;
 }
-EXPORT_SYMBOL(rockchip_drm_wait_line_flag);
+EXPORT_SYMBOL(rockchip_drm_wait_vact_end);
 
 static int vop_bind(struct device *dev, struct device *master, void *data)
 {