Skip to content

Commit cd54066

Browse files
sandy-huangrkhuangtao
authored andcommitted
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>
1 parent 6e3ddca commit cd54066

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@ static void vop_crtc_disable(struct drm_crtc *crtc)
13921392
disable_irq(vop->irq);
13931393

13941394
vop->is_enabled = false;
1395+
smp_wmb();
13951396
if (vop->is_iommu_enabled) {
13961397
/*
13971398
* vop standby complete, so iommu detach is safe.
@@ -2328,7 +2329,14 @@ static void vop_crtc_close(struct drm_crtc *crtc)
23282329
if (!crtc)
23292330
return;
23302331
vop = to_vop(crtc);
2332+
mutex_lock(&vop->vop_lock);
2333+
if (!vop->is_enabled) {
2334+
mutex_unlock(&vop->vop_lock);
2335+
return;
2336+
}
2337+
23312338
vop_disable_all_planes(vop);
2339+
mutex_unlock(&vop->vop_lock);
23322340
}
23332341

23342342
static const struct rockchip_crtc_funcs private_crtc_funcs = {

0 commit comments

Comments
 (0)