From 2f6b566fe60dcc2e824e268435d079c3614d9cc9 Mon Sep 17 00:00:00 2001 From: Krishna Manikandan Date: Mon, 8 Jan 2018 12:40:08 +0530 Subject: [PATCH] fbdev: msm: Set the commit_in_progress flag after sync_fence_wait The commit_in_progress flag is set only after waiting for the fences in the current composition cycle. This will ensure that the release fence of the previous composition is signalled, even though there is a fence timeout in the current composition cycle. Change-Id: I06653c922f195bb5936530ddeaa5a9fcb291fb3f Signed-off-by: Krishna Manikandan --- drivers/video/fbdev/msm/mdss_mdp_ctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index 54fb21a5f35d..632d73e909a3 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -5912,9 +5912,7 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg, } else { sctl_flush_bits = sctl->flush_bits; } - sctl->commit_in_progress = true; } - ctl->commit_in_progress = true; ctl_flush_bits = ctl->flush_bits; ATRACE_END("postproc_programming"); @@ -5928,6 +5926,9 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg, MDP_COMMIT_STAGE_SETUP_DONE, commit_cb->data); ret = mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_READY); + ctl->commit_in_progress = true; + if (sctl) + sctl->commit_in_progress = true; /* * When wait for fence timed out, driver ignores the fences