summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhaval Patel <pdhaval@codeaurora.org>2015-10-21 14:37:39 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:46:59 -0700
commitd83e26267944d2009b68ebfd1f7502ee937b93d5 (patch)
treedbd4a5448a2465265564e8215555adb280b8818d
parenta09a990f187bf4eb040242ab618b605d61615269 (diff)
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>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
index 47ef5be3ecdb..1e90a2bd852d 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
@@ -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);
}
}