there is a Bug that:
vop_enable()->drm_vblank_on, drm_vblank_on may call vop
enable vblank. if it happen, vblank enable would failed,
then cause irq status error. because is_enabled value is set
after drm_vblank_on.
after enable vop clocks and iommu regs, we can sure that
R/W vop regs and do vop plane flip is safe, so place
is_enabled = true after enable iommu is suitable.
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
goto err_disable_aclk;
}
+ /*
+ * At here, vop clock & iommu is enable, R/W vop regs would be safe.
+ */
+ vop->is_enabled = true;
+
spin_lock(&vop->reg_lock);
VOP_CTRL_SET(vop, standby, 0);
drm_vblank_on(vop->drm_dev, vop->pipe);
- vop->is_enabled = true;
-
return;
err_disable_aclk:
VOP_CTRL_SET(vop, standby, 1);
spin_unlock(&vop->reg_lock);
+
+ vop->is_enabled = false;
/*
* disable dclk to stop frame scan, so we can safely detach iommu,
*/
clk_disable(vop->aclk);
clk_disable(vop->hclk);
-
- vop->is_enabled = false;
}
/*