drm/rockchip: px30 vop: fix iommu pagefault when disable win2

In the bandwidth tension environment when close win2, vop will access
the freed memory lead to iommu pagefault. so we add this reset to workaround.

Change-Id: I22b0c0f145d042e3aaf98fb45ffff6304c93963c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
Sandy Huang
2018-03-07 15:09:13 +08:00
parent 50b9027229
commit d3cc85847c

View File

@@ -1561,6 +1561,15 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
if (win->area_id == 0)
VOP_WIN_SET(vop, win, gate, 0);
/*
* IC design bug: in the bandwidth tension environment when close win2,
* vop will access the freed memory lead to iommu pagefault.
* so we add this reset to workaround.
*/
if (VOP_MAJOR(vop->version) == 2 && VOP_MINOR(vop->version) == 5 &&
win->win_id == 2)
VOP_WIN_SET(vop, win, yrgb_mst, 0);
spin_unlock(&vop->reg_lock);
vop_plane_state->enable = false;