drm/rockchip: set unused layer with top zpos

Hardware limited, we should keep all unused layer same
with the same zpos, otherwise, would get display abnormal.

Change-Id: I417a6a14731148a89f0372cc028e43a94b56e4d3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
Mark Yao
2016-06-21 14:30:19 +08:00
committed by Huang, Tao
parent 15780585a7
commit 7589135587

View File

@@ -1096,6 +1096,7 @@ static int vop_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_device *dev = crtc->dev;
struct rockchip_crtc_state *s = to_rockchip_crtc_state(state);
struct vop *vop = to_vop(crtc);
const struct vop_data *vop_data = vop->data;
struct drm_plane *plane;
struct vop_zpos *pzpos;
int dsp_layer_sel = 0;
@@ -1134,6 +1135,15 @@ static int vop_crtc_atomic_check(struct drm_crtc *crtc,
sort(pzpos, cnt, sizeof(pzpos[0]), vop_zpos_cmp, NULL);
WARN_ON(vop_data->win_size < cnt);
for (i = 0; i < (vop_data->win_size - cnt); i++) {
dsp_layer_sel <<= 2;
/*
* after sort, pzpos[0] is the top zpos layer.
*/
dsp_layer_sel |= pzpos[0].win_id;
}
for (i = 0; i < cnt; i++) {
struct vop_zpos *zpos = &pzpos[i];