Skip to main content
Sign in
Snippets Groups Projects
Commit 8fa8d556 authored by Saurabh Shah's avatar Saurabh Shah
Browse files

msm: mdss: ensure rotator work is done before reconfiguring session


When queuing new parameters to rotator, need to ensure that current work
is done before reconfiguring pipe parameters, otherwise there may be a
mismatch on parameters with the buffers programmed once work is
scheduled.

Change-Id: I258aedca82bb10498d0ef4cbaa697a29c3c34a99
Signed-off-by: default avatarAdrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: default avatarSaurabh Shah <saurshah@codeaurora.org>
parent 25128928
No related branches found
No related tags found
No related merge requests found
......@@ -471,13 +471,18 @@ int mdss_mdp_rotator_setup(struct msm_fb_data_type *mfd,
list_add(&rot->list, &mdp5_data->rot_proc_list);
} else if (req->id & MDSS_MDP_ROT_SESSION_MASK) {
rot = mdss_mdp_rotator_session_get(req->id);
if (!rot) {
pr_err("rotator session=%x not found\n", req->id);
ret = -ENODEV;
goto rot_err;
}
if (work_pending(&rot->commit_work)) {
mutex_unlock(&rotator_lock);
flush_work(&rot->commit_work);
mutex_lock(&rotator_lock);
}
if (rot->format != fmt->format)
format_changed = true;
......@@ -651,6 +656,12 @@ static int mdss_mdp_rotator_finish(struct mdss_mdp_rotator_session *rot)
rot_pipe = rot->pipe;
if (rot_pipe) {
if (work_pending(&rot->commit_work)) {
mutex_unlock(&rotator_lock);
cancel_work_sync(&rot->commit_work);
mutex_lock(&rotator_lock);
}
mdss_mdp_rotator_busy_wait(rot);
list_del(&rot->head);
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment