From ee8669055ef0cb5ecebcf342f67b7abf9f8f8dbb Mon Sep 17 00:00:00 2001 From: Mahadevan Date: Thu, 28 Mar 2024 15:46:13 +0530 Subject: [PATCH] disp: msm: sde: increase EPT timeout threshold During VTS testing, simulated multi-frame delays are set using the EPT (Expected Present Time) property. The test case failed at lower refresh rates. This change extendes the EPT timeout threshold to 10 seconds, ensuring support for multiple frame delays. Change-Id: I75ee2f3b27083014e560c5819ed9929a137ef8da Signed-off-by: Mahadevan --- msm/sde/sde_encoder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder.c b/msm/sde/sde_encoder.c index b51ea7f03b..f312ddeb29 100644 --- a/msm/sde/sde_encoder.c +++ b/msm/sde/sde_encoder.c @@ -82,6 +82,8 @@ /* Worst case time required for trigger the frame after the EPT wait */ #define EPT_BACKOFF_THRESHOLD (3 * NSEC_PER_MSEC) +#define MAX_EPT_TIMEOUT_US (10 * USEC_PER_SEC) + #define IS_ROI_UPDATED(a, b) (a.x1 != b.x1 || a.x2 != b.x2 || \ a.y1 != b.y1 || a.y2 != b.y2) @@ -5261,8 +5263,8 @@ void _sde_encoder_delay_kickoff_processing(struct sde_encoder_virt *sde_enc) } timeout_us = DIV_ROUND_UP((ept_ts - current_ts), 1000); - /* validate timeout is not beyond the min fps */ - if (timeout_us > DIV_ROUND_UP(USEC_PER_SEC, min_fps)) { + /* validate timeout is not beyond 10 seconds */ + if (timeout_us > MAX_EPT_TIMEOUT_US) { pr_err_ratelimited( "enc:%d, invalid timeout_us:%llu; ept:%llu, ept_ts:%llu, cur_ts:%llu min_fps:%d, fps:%d, qsync_mode:%d, avr_step_fps:%d\n", DRMID(&sde_enc->base), timeout_us, ept, ept_ts, current_ts,