mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
drm/rockchip: vop: ignore crtc close when crtc is disabled
when in suspend state, the crtc clock is disabled, if we do reboot at this time, the following call will lead to system panic: ->rockchip_drm_platform_shutdown() ->vop_crtc_close() Change-Id: I1989d0da4d033d608d59587385da288789d9c2c1 Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
@@ -1392,6 +1392,7 @@ static void vop_crtc_disable(struct drm_crtc *crtc)
|
||||
disable_irq(vop->irq);
|
||||
|
||||
vop->is_enabled = false;
|
||||
smp_wmb();
|
||||
if (vop->is_iommu_enabled) {
|
||||
/*
|
||||
* vop standby complete, so iommu detach is safe.
|
||||
@@ -2328,7 +2329,14 @@ static void vop_crtc_close(struct drm_crtc *crtc)
|
||||
if (!crtc)
|
||||
return;
|
||||
vop = to_vop(crtc);
|
||||
mutex_lock(&vop->vop_lock);
|
||||
if (!vop->is_enabled) {
|
||||
mutex_unlock(&vop->vop_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
vop_disable_all_planes(vop);
|
||||
mutex_unlock(&vop->vop_lock);
|
||||
}
|
||||
|
||||
static const struct rockchip_crtc_funcs private_crtc_funcs = {
|
||||
|
||||
Reference in New Issue
Block a user