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 <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2020-07-27 20:41:16 +08:00
committed by Tao Huang
parent e1d81708df
commit 5c9dcafb33

View File

@@ -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;