msm: mdss: Don't schedule pp done work during on going commit

Function mdss_mdp_ctl_perf_get_transaction_status tracks mdp
status whether a commit is currently in progress. If it is
then we don't schedule the work queue, otherwise schedule it.
Cases where work queue is not scheduled, waitforpp takes care
of notify frame done. In case of last frame update, work
queue takes care of notify frame done.

Change-Id: I98c9af4ec412f06d48e0ae57e5973bf34be9110d
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
This commit is contained in:
Jayant Shekhar 2014-12-10 09:11:21 +05:30 committed by David Keitel
parent 072a96af7d
commit 6f7a4eefeb
2 changed files with 5 additions and 1 deletions

View file

@ -874,6 +874,7 @@ void mdss_mdp_ctl_notifier_register(struct mdss_mdp_ctl *ctl,
struct notifier_block *notifier);
void mdss_mdp_ctl_notifier_unregister(struct mdss_mdp_ctl *ctl,
struct notifier_block *notifier);
u32 mdss_mdp_ctl_perf_get_transaction_status(struct mdss_mdp_ctl *ctl);
int mdss_mdp_scan_pipes(void);

View file

@ -363,6 +363,7 @@ static void mdss_mdp_cmd_pingpong_done(void *arg)
struct mdss_mdp_cmd_ctx *ctx = ctl->priv_data;
struct mdss_mdp_vsync_handler *tmp;
ktime_t vsync_time;
u32 status;
if (!ctx) {
pr_err("%s: invalid ctx\n", __func__);
@ -390,7 +391,9 @@ static void mdss_mdp_cmd_pingpong_done(void *arg)
atomic_read(&ctx->koff_cnt));
if (mdss_mdp_cmd_do_notifier(ctx)) {
atomic_inc(&ctx->pp_done_cnt);
schedule_work(&ctx->pp_done_work);
status = mdss_mdp_ctl_perf_get_transaction_status(ctl);
if (status == 0)
schedule_work(&ctx->pp_done_work);
}
wake_up_all(&ctx->pp_waitq);
} else {