disp: msm: sde: wait for specific pp_done instead of zero

2 Frames transfer pending is possible with posted start.
One ongoing frame and another triggered frame. Current SW
waits for pp_done interrupt if pending frame count is greater
than 1. It is possible that interrupt may be missed for ongoing
frame. In that case, SW should run pp_done wait for one by one
frame instead of two frames together. It allows encoder to
check the ctl scheduler status and trigger the frame done
event on time.

Change-Id: I4817842292d96747890ee70da8a5bdf9b56816ed
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Цей коміт міститься в:
Dhaval Patel
2019-08-20 15:44:32 -07:00
джерело dc6f198f99
коміт 6f06e5cd6f
5 змінених файлів з 24 додано та 10 видалено

Переглянути файл

@@ -408,13 +408,16 @@ static int _sde_encoder_wait_timeout(int32_t drm_id, int32_t hw_id,
do {
rc = wait_event_timeout(*(info->wq),
atomic_read(info->atomic_cnt) == 0, wait_time_jiffies);
atomic_read(info->atomic_cnt) == info->count_check,
wait_time_jiffies);
cur_ktime = ktime_get();
SDE_EVT32(drm_id, hw_id, rc, ktime_to_ms(cur_ktime),
timeout_ms, atomic_read(info->atomic_cnt));
timeout_ms, atomic_read(info->atomic_cnt),
info->count_check);
/* If we timed out, counter is valid and time is less, wait again */
} while (atomic_read(info->atomic_cnt) && (rc == 0) &&
} while ((atomic_read(info->atomic_cnt) != info->count_check) &&
(rc == 0) &&
(ktime_compare_safe(exp_ktime, cur_ktime) > 0));
return rc;