msm: mdss: wait for rotator work to be done before reconfiguring
If rotator work is scheduled, and a new rotator configuration comes before it starts running, it may pick the new configuration which may no longer match. In order to avoid mismatch between configuration and buffer programmed, flush the pending work before reconfiguring it. CRs-Fixed: 756253 Change-Id: I0e5683522810cf39cc4c4f4cd0224ee6f79c06ce Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
This commit is contained in:
parent
f11c56b3ed
commit
d554932e06
2 changed files with 10 additions and 1 deletions
|
@ -798,6 +798,7 @@ static int mdss_mdp_rotator_config(struct msm_fb_data_type *mfd,
|
|||
req->src.format = mdss_mdp_get_rotator_dst_format(req->src.format,
|
||||
req->flags & MDP_ROT_90, req->flags & MDP_BWC_EN);
|
||||
|
||||
rot->req_data = *req;
|
||||
rot->params_changed++;
|
||||
|
||||
return 0;
|
||||
|
@ -878,6 +879,12 @@ static int mdss_mdp_rotator_config_ex(struct msm_fb_data_type *mfd,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* if session hasn't changed, skip reconfiguration */
|
||||
if (!memcmp(req, &rot->req_data, sizeof(*req)))
|
||||
return 0;
|
||||
|
||||
flush_work(&rot->commit_work);
|
||||
|
||||
mutex_lock(&rot->lock);
|
||||
ret = mdss_mdp_rotator_config(mfd, rot, req, fmt);
|
||||
mutex_unlock(&rot->lock);
|
||||
|
@ -918,7 +925,7 @@ static int mdss_mdp_rotator_finish(struct mdss_mdp_rotator_session *rot)
|
|||
{
|
||||
pr_debug("finish rot id=%x\n", rot->session_id);
|
||||
|
||||
cancel_work_sync(&rot->commit_work);
|
||||
flush_work(&rot->commit_work);
|
||||
mdss_mdp_rot_mgr_del_session(rot);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -48,6 +48,8 @@ struct mdss_mdp_rotator_session {
|
|||
struct list_head list;
|
||||
struct msm_sync_pt_data *rot_sync_pt_data;
|
||||
struct work_struct commit_work;
|
||||
|
||||
struct mdp_overlay req_data;
|
||||
};
|
||||
|
||||
static inline u32 mdss_mdp_get_rotator_dst_format(u32 in_format, u32 in_rot90,
|
||||
|
|
Loading…
Add table
Reference in a new issue