Skip to content
Snippets Groups Projects
Commit 1ae539a6 authored by Liu Ying's avatar Liu Ying Committed by Leonard Crestez
Browse files

MLK-21397 drm/imx: dpu: kms: Put possible pipe states properly


We should put possible pipe states after we've finished assigning
resources for all pipes.  This makes sure the pipe states which
should be put are all eventually put.  Without this patch, disabled
crtc(s) or enabled crtc(s) without any plane upon will be accidentally
left in the atomic state when commit operations only happen for other
pipe(s), because we skip the put operations when we see the relevant
active plane number is zero.  It's good to put pipe states for those
crtcs, otherwise, we'll depend on atomic helper core behavior to
handle the crtcs.

Signed-off-by: default avatarLiu Ying <victor.liu@nxp.com>
parent ea1f1437
No related branches found
No related tags found
No related merge requests found
......@@ -761,9 +761,16 @@ static int dpu_drm_atomic_check(struct drm_device *dev,
}
kfree(states);
};
drm_for_each_crtc(crtc, dev) {
if (pipe_states_prone_to_put[drm_crtc_index(crtc)]) {
crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (WARN_ON(IS_ERR(crtc_state)))
return PTR_ERR(crtc_state);
if (pipe_states_prone_to_put[drm_crtc_index(crtc)])
dpu_atomic_put_possible_states_per_crtc(crtc_state);
}
}
ret = drm_atomic_helper_check_planes(dev, state);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment