disp: msm: sde: compute timeouts based on refresh rate

Current timeout values in sde driver for vblank, kickoff and
frame complete timeouts are fixed and can be much lower than
a vsync incase of low refresh rate display. Compute timeouts
based on refresh rate for low refresh rate displays.

Change-Id: I9dda41feb15446de7451824e185321de421ad575
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
This commit is contained in:
Prabhanjan Kandula
2021-08-02 12:12:06 -07:00
parent 6bf96605eb
commit 642c86fee9
8 changed files with 91 additions and 15 deletions

View File

@@ -1402,6 +1402,9 @@ static void sde_encoder_phys_wb_mode_set(
PTR_ERR(phys_enc->hw_cdm));
phys_enc->hw_cdm = NULL;
}
phys_enc->kickoff_timeout_ms =
sde_encoder_helper_get_kickoff_timeout_ms(phys_enc->parent);
}
static int sde_encoder_phys_wb_frame_timeout(struct sde_encoder_phys *phys_enc)
@@ -1508,7 +1511,7 @@ static int _sde_encoder_phys_wb_wait_for_commit_done(
wait_info.wq = &phys_enc->pending_kickoff_wq;
wait_info.atomic_cnt = &phys_enc->pending_retire_fence_cnt;
wait_info.timeout_ms = max_t(u32, wb_enc->wbdone_timeout,
KICKOFF_TIMEOUT_MS);
phys_enc->kickoff_timeout_ms);
rc = sde_encoder_helper_wait_for_irq(phys_enc, INTR_IDX_WB_DONE,
&wait_info);
if (rc == -ETIMEDOUT && _sde_encoder_phys_wb_is_idle(phys_enc)) {
@@ -2037,9 +2040,9 @@ struct sde_encoder_phys *sde_encoder_phys_wb_init(
ret = -ENOMEM;
goto fail_alloc;
}
wb_enc->wbdone_timeout = KICKOFF_TIMEOUT_MS;
phys_enc = &wb_enc->base;
phys_enc->kickoff_timeout_ms = DEFAULT_KICKOFF_TIMEOUT_MS;
if (p->sde_kms->vbif[VBIF_NRT]) {
wb_enc->aspace[SDE_IOMMU_DOMAIN_UNSECURE] =