drm/rockchip: vop: fix iommu crash with async atomic
authorMark Yao <mark.yao@rock-chips.com>
Fri, 29 Apr 2016 03:37:20 +0000 (11:37 +0800)
committerMark Yao <mark.yao@rock-chips.com>
Tue, 3 May 2016 06:11:23 +0000 (14:11 +0800)
commit44d0237a26395ac94160cf23f32769013b365590
tree4abc97870f296c586473683f54463a19e4c85a9b
parent2d90d477430d3a20df74f2d11c21378e64e1d508
drm/rockchip: vop: fix iommu crash with async atomic

After async atomic_commit callback, drm_atomic_clean_old_fb will
clean all old fb, but because async, the old fb may be also on
the vop hardware, dma will access the old fb buffer, clean old
fb will cause iommu page fault.

Reference the fb and unreference it when the fb actuall swap out
from vop hardware.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_vop.c