return 0;
dev_drv->suspend_flag = 1;
+ smp_wmb();
flush_kthread_worker(&dev_drv->update_regs_worker);
if (dev_drv->trsm_ops && dev_drv->trsm_ops->disable)
vop_msk_reg(vop_dev, SYS_CTRL, V_VOP_STANDBY_EN(1));
vop_cfg_done(vop_dev);
- if (dev_drv->iommu_enabled && dev_drv->mmu_dev)
- rockchip_iovmm_deactivate(dev_drv->dev);
+ if (dev_drv->iommu_enabled && dev_drv->mmu_dev) {
+ mdelay(50);
+ rockchip_iovmm_deactivate(dev_drv->dev);
+ }
spin_unlock(&vop_dev->reg_lock);
}
struct rk_lcdc_driver *dev_drv = &vop_dev->driver;
dev_drv->suspend_flag = 1;
- mdelay(100);
+ smp_wmb();
flush_kthread_worker(&dev_drv->update_regs_worker);
kthread_stop(dev_drv->update_regs_thread);
vop_deint(vop_dev);
int count = 100;
long timeout;
int pagefault = 0;
+
+ if (dev_drv->suspend_flag == 1) {
+#ifdef H_USE_FENCE
+ sw_sync_timeline_inc(dev_drv->timeline, 1);
+#endif
+ for (i = 0; i < regs->win_num; i++) {
+ win_data = ®s->reg_win_data[i];
+ rk_fb_free_dma_buf(dev_drv, win_data);
+ }
+ return;
+ }
/* acq_fence wait */
for (i = 0; i < regs->win_num; i++) {
win_data = ®s->reg_win_data[i];