From 061744ebb0e985341782146ed1accfbe278df4c7 Mon Sep 17 00:00:00 2001 From: Jayaprakash Madisetty Date: Fri, 23 Apr 2021 12:10:27 +0530 Subject: [PATCH] disp: msm: sde: increase kickoff timeout for doze usecase This change increases the kickoff timeout in doze and doze suspend usecases. This avoids false timeouts seen in doze due to rscc static wakeup configured at a different fps from actual panel TE. Change-Id: I11c94eb40d4dbbc3d95b8268b007580599ee90fd Signed-off-by: Jayaprakash Madisetty --- msm/sde/sde_encoder_phys_cmd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/msm/sde/sde_encoder_phys_cmd.c b/msm/sde/sde_encoder_phys_cmd.c index d8e062c5fc01..a6acf9f31a85 100644 --- a/msm/sde/sde_encoder_phys_cmd.c +++ b/msm/sde/sde_encoder_phys_cmd.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__ @@ -1509,20 +1509,27 @@ static int _sde_encoder_phys_cmd_wait_for_wr_ptr( struct sde_encoder_phys_cmd *cmd_enc = to_sde_encoder_phys_cmd(phys_enc); struct sde_encoder_wait_info wait_info = {0}; - int ret; + struct sde_connector *c_conn; bool frame_pending = true; struct sde_hw_ctl *ctl; unsigned long lock_flags; + int ret, timeout_ms; - if (!phys_enc || !phys_enc->hw_ctl) { + if (!phys_enc || !phys_enc->hw_ctl || !phys_enc->connector) { SDE_ERROR("invalid argument(s)\n"); return -EINVAL; } ctl = phys_enc->hw_ctl; + c_conn = to_sde_connector(phys_enc->connector); + timeout_ms = KICKOFF_TIMEOUT_MS; + + if (c_conn->lp_mode == SDE_MODE_DPMS_LP1 || + c_conn->lp_mode == SDE_MODE_DPMS_LP2) + timeout_ms = (KICKOFF_TIMEOUT_MS) * 2; wait_info.wq = &phys_enc->pending_kickoff_wq; wait_info.atomic_cnt = &phys_enc->pending_retire_fence_cnt; - wait_info.timeout_ms = KICKOFF_TIMEOUT_MS; + wait_info.timeout_ms = timeout_ms; /* slave encoder doesn't enable for ppsplit */ if (_sde_encoder_phys_is_ppsplit_slave(phys_enc))