rockchip: rk312x: vop: fix iommu crash when resume

Maybe win is enabled and H/W address is not a vaild
iommu mapped addr, So we need delay to ensure H/W
switch done before enable iommu.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
Mark Yao
2015-04-01 14:11:43 +08:00
parent ce69d89d2f
commit ac98211da0

View File

@@ -1884,8 +1884,15 @@ static int rk312x_lcdc_early_resume(struct rk_lcdc_driver *dev_drv)
lcdc_cfg_done(lcdc_dev);
if (dev_drv->iommu_enabled) {
if (dev_drv->mmu_dev)
if (dev_drv->mmu_dev) {
/*
* At here, maybe win is enabled and buffer address
* is not a vaild iommu mapped addr, incase crash,
* delay 30ms to ensure H/W switch done.
*/
mdelay(30);
rockchip_iovmm_activate(dev_drv->dev);
}
}
spin_unlock(&lcdc_dev->reg_lock);