Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6fc4bfc authored by Jayant Shekhar's avatar Jayant Shekhar
Browse files

msm: mdss: Schedule pp_done_work only for last frame update



Currently notify frame is done in wait4pingpong, and there
may not be a real need for the pp_done_work workqueue. But
we still keep it because to trigger the notification once
the last frame sent to display is actually transferred.
So, cancel the workqueue if singalling is already done
within the wait4pp but keep the work queue for the idle
cases. This can avoid unnecessary CPU scheduling in a lot
of cases.

Change-Id: I2099f18e48502fe7d0eac337f04d8e3f4711c2f2
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent a1208bee
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -627,6 +627,8 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg)
		ctx->pp_timeout_report_cnt = 0;
	}

	cancel_work_sync(&ctx->pp_done_work);

	/* signal any pending ping pong done events */
	while (atomic_add_unless(&ctx->pp_done_cnt, -1, 0))
		mdss_mdp_ctl_notify(ctx->ctl, MDP_NOTIFY_FRAME_DONE);