From 5c9dcafb33bb76414f783cf1d3cbff2202280431 Mon Sep 17 00:00:00 2001 From: Andy Yan Date: Mon, 27 Jul 2020 20:41:16 +0800 Subject: [PATCH] drm/rockchip: vop: check state->crtc for plane status We found a situation where state->visible is true but the plane is disabled, and state->fb is null. According to the documentation of struct drm_plane_state, the member crtc can truly describe the plane enable/active state. So we check state->crtc instead of plane->visible here. Change-Id: I9f9e8912c7279c1c68c8370014b08c7ba6bae72c Signed-off-by: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 185e833e9269..c1824c334673 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -2295,7 +2295,7 @@ static int vop_plane_info_dump(struct seq_file *s, struct drm_plane *plane) DRM_FORMAT_MOD_ARM_AFBC(AFBC_FORMAT_MOD_BLOCK_SIZE_16x16); DEBUG_PRINT(" win%d-%d: %s\n", win->win_id, win->area_id, - state->visible ? "ACTIVE" : "DISABLED"); + state->crtc ? "ACTIVE" : "DISABLED"); if (!fb) return 0;