msm: mdss: avoid removing wrong multirect on validate failures
During atomic commit - validate failures, the newly allocated pipes and pipes taken from the destroy list are cleaned up. Currently pipe ndx is checked which can lead to cleaning up the already in use multirect instead of the rect allocated in the current validate. Add checks to include checking based on multirect to avoid such cases. Change-Id: I7f8fb6630314cdc523490e28d90dd3776bdfeada Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
parent
e95375540c
commit
5d30a3d0dc
1 changed files with 8 additions and 4 deletions
|
@ -2470,16 +2470,20 @@ validate_exit:
|
||||||
mutex_lock(&mdp5_data->list_lock);
|
mutex_lock(&mdp5_data->list_lock);
|
||||||
list_for_each_entry_safe(pipe, tmp, &mdp5_data->pipes_used, list) {
|
list_for_each_entry_safe(pipe, tmp, &mdp5_data->pipes_used, list) {
|
||||||
if (IS_ERR_VALUE(ret)) {
|
if (IS_ERR_VALUE(ret)) {
|
||||||
if ((pipe->ndx & rec_release_ndx[0]) ||
|
if (((pipe->ndx & rec_release_ndx[0]) &&
|
||||||
(pipe->ndx & rec_release_ndx[1])) {
|
(pipe->multirect.num == 0)) ||
|
||||||
|
((pipe->ndx & rec_release_ndx[1]) &&
|
||||||
|
(pipe->multirect.num == 1))) {
|
||||||
mdss_mdp_smp_unreserve(pipe);
|
mdss_mdp_smp_unreserve(pipe);
|
||||||
pipe->params_changed = 0;
|
pipe->params_changed = 0;
|
||||||
pipe->dirty = true;
|
pipe->dirty = true;
|
||||||
if (!list_empty(&pipe->list))
|
if (!list_empty(&pipe->list))
|
||||||
list_del_init(&pipe->list);
|
list_del_init(&pipe->list);
|
||||||
mdss_mdp_pipe_destroy(pipe);
|
mdss_mdp_pipe_destroy(pipe);
|
||||||
} else if ((pipe->ndx & rec_destroy_ndx[0]) ||
|
} else if (((pipe->ndx & rec_destroy_ndx[0]) &&
|
||||||
(pipe->ndx & rec_destroy_ndx[1])) {
|
(pipe->multirect.num == 0)) ||
|
||||||
|
((pipe->ndx & rec_destroy_ndx[1]) &&
|
||||||
|
(pipe->multirect.num == 1))) {
|
||||||
/*
|
/*
|
||||||
* cleanup/destroy list pipes should move back
|
* cleanup/destroy list pipes should move back
|
||||||
* to destroy list. Next/current kickoff cycle
|
* to destroy list. Next/current kickoff cycle
|
||||||
|
|
Loading…
Add table
Reference in a new issue