From 19f93524ce4f5e26d2346811021792e8fa06a928 Mon Sep 17 00:00:00 2001 From: Akash Gajjar Date: Wed, 24 Apr 2024 15:58:25 +0530 Subject: [PATCH] disp: msm: sde: fix polling logic while enabling the timing engine This change fixes the 'commit 92cbd6d65413 ("disp: msm: sde: while timing engine enabling poll for active region")' which introduces one frame time delay during enabling the timing engine. Change-Id: Ibe71eb785822381fd23e74f4d55dbd141024d520 Signed-off-by: Akash Gajjar --- msm/sde/sde_encoder_phys_vid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder_phys_vid.c b/msm/sde/sde_encoder_phys_vid.c index 0f37eaac3e..c38d8c1791 100644 --- a/msm/sde/sde_encoder_phys_vid.c +++ b/msm/sde/sde_encoder_phys_vid.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. */ @@ -1232,7 +1232,7 @@ static int sde_encoder_phys_vid_poll_for_active_region(struct sde_encoder_phys * usleep_range(poll_time_us, poll_time_us + 5); line_cnt = phys_enc->hw_intf->ops.get_line_count(phys_enc->hw_intf); trial++; - } while ((trial < MAX_POLL_CNT) || (line_cnt < v_inactive)); + } while ((trial < MAX_POLL_CNT) && (line_cnt < v_inactive)); return (trial >= MAX_POLL_CNT) ? -ETIMEDOUT : 0; }