msm: mdss: send frame done event for each pp_done isr

The frame done event updates the release timeline
for command mode interface. Avoiding this timeline
update will cause the fence timeout issue for two
buffer clients.
   -> buffer 0 submitted with acq fence for N update
   -> buffer 0 acq fence triggered because client
      holds the buffer 1.
   -> MDSS updates the release fence for buffer 0.
   -> buffer 1 submitted with acq fence for N+1 update.
   -> client wait for buffer 0 release fence before
      triggering acq fence for buffer 1.

It ends up in fence timeout situation if MDSS software
misses the last update. Ideally, MDSS software should
update the timeline as soon as buffer 0 is unused by
hardware to allow client for reusing it in next update.

Change-Id: I99bd968d11adc3a52ae6bc761857a6edcedcd785
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel 2015-10-21 14:37:39 -07:00 committed by David Keitel
parent a09a990f18
commit d83e262679

View file

@ -928,7 +928,6 @@ static void mdss_mdp_cmd_pingpong_done(void *arg)
struct mdss_mdp_cmd_ctx *ctx = ctl->intf_ctx[MASTER_CTX];
struct mdss_mdp_vsync_handler *tmp;
ktime_t vsync_time;
u32 status;
if (!ctx) {
pr_err("%s: invalid ctx\n", __func__);
@ -955,9 +954,7 @@ 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);
status = mdss_mdp_ctl_perf_get_transaction_status(ctl);
if (status == 0)
schedule_work(&ctx->pp_done_work);
schedule_work(&ctx->pp_done_work);
mdss_mdp_resource_control(ctl,
MDP_RSRC_CTL_EVENT_PP_DONE);
@ -978,6 +975,7 @@ static void mdss_mdp_cmd_pingpong_done(void *arg)
static void pingpong_done_work(struct work_struct *work)
{
u32 status;
struct mdss_mdp_cmd_ctx *ctx =
container_of(work, typeof(*ctx), pp_done_work);
@ -985,7 +983,9 @@ static void pingpong_done_work(struct work_struct *work)
while (atomic_add_unless(&ctx->pp_done_cnt, -1, 0))
mdss_mdp_ctl_notify(ctx->ctl, MDP_NOTIFY_FRAME_DONE);
mdss_mdp_ctl_perf_release_bw(ctx->ctl);
status = mdss_mdp_ctl_perf_get_transaction_status(ctx->ctl);
if (status == 0)
mdss_mdp_ctl_perf_release_bw(ctx->ctl);
}
}