From b34356fc635d9de195f49df54efcb607024fe1b9 Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Tue, 8 Aug 2017 16:46:20 +0800 Subject: [PATCH] drm/rockchip: vop: zpos set to INT_MAX if not enabled Change-Id: Ia78c26f400d0cc4192cae183f83b7f06575c9332 Signed-off-by: Mark Yao --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 8d7cba2e7b79..813cdee9b428 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -2037,7 +2037,11 @@ static int vop_crtc_atomic_check(struct drm_crtc *crtc, if (!pstate) pstate = plane->state; plane_state = to_vop_plane_state(pstate); - pzpos[cnt].zpos = plane_state->zpos; + + if (!plane_state->enable) + pzpos[cnt].zpos = INT_MAX; + else + pzpos[cnt].zpos = plane_state->zpos; pzpos[cnt++].win_id = win->win_id; } -- 2.34.1