msm: mdss: fix fence timeout not releasing sync point
When sync fence wait times out, it means commit did not happen or was
not successful. In such cases the fail buffer still needs to be released
in order to be replaced with new one.
Change-Id: Ib913892cc117154c480da50820a5e5a7f9430a86
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index 3836cfd..00a8aa5 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -1051,15 +1051,20 @@
mfd->acq_fen_cnt = 0;
}
-void mdss_fb_signal_timeline(struct msm_fb_data_type *mfd)
+static void mdss_fb_signal_timeline_locked(struct msm_fb_data_type *mfd)
{
- mutex_lock(&mfd->sync_mutex);
if (mfd->timeline) {
sw_sync_timeline_inc(mfd->timeline, 1);
mfd->timeline_value++;
}
mfd->last_rel_fence = mfd->cur_rel_fence;
mfd->cur_rel_fence = 0;
+}
+
+void mdss_fb_signal_timeline(struct msm_fb_data_type *mfd)
+{
+ mutex_lock(&mfd->sync_mutex);
+ mdss_fb_signal_timeline_locked(mfd);
mutex_unlock(&mfd->sync_mutex);
}
@@ -1090,6 +1095,7 @@
__func__, ret, mfd->is_committing);
if (ret <= 0) {
mutex_lock(&mfd->sync_mutex);
+ mdss_fb_signal_timeline_locked(mfd);
mfd->is_committing = 0;
complete_all(&mfd->commit_comp);
mutex_unlock(&mfd->sync_mutex);