Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1875269pxb; Mon, 13 Sep 2021 07:21:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/WRZpEeTaUHGGow6jYzeKbW9ZbUKkSNLa0ZGctWqxNPuE/PIGxm6v/BUki3Q3qYFmBGPX X-Received: by 2002:a05:6638:4122:: with SMTP id ay34mr10180153jab.131.1631542878428; Mon, 13 Sep 2021 07:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631542878; cv=none; d=google.com; s=arc-20160816; b=Z+5RB7Ann/JqQIlWmedgJht3VxzT4Qb901hCEz3Az2WmsH3Gzl0PdxSl83nOpVHTKS 6Vf1jrj/dcqs4TtiTDqCxqn6udHGba4KaKNqgW/SvjeKaPzsKGmh7CYApC5MRM5e+9GR fG3hZJh4TmF4u+3fzh5D2P93J+IYRFP6FGZyIUufyhj5E1IOQvhsZKGucGrB+FEAZc+S h/dIvuR9OlBeCVQshTjy16TpvnPmPxTibIome/V6VVHltOweLwMTSGkzBuw5f2o+cQPT uh2j6QVmf14X1+0WQqfI4DSx/755QP12BbvN3Xa4OTlDdH04MqEUeUP+QuOy5u12TkHn dU3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=xboJcl/zRKDCAtw310FWIjAe/74axjPaHxv8RGuRKtw=; b=H32AKkJvvf4bt0rESjvcrGfVr7uDUYpIxQVOfDALSpq9MyaP19MsjjqvBsT5EH3pwR t2l1pjUWOHLWVd31lHh/VmFeKhzF8WLSq0gB/TICEqz7uohSua27o2ZuX7CuQwmMas1f uYY6a6Ax0Aot3vxH6EYm3brBg3hcDPeos1KQcCdmbTsqSxr6SgngfTFzJFxlT3jYRhkg qUSe2jfSq7GLN/PB8nSvRQIAPsZIjXtxTmJsLbERn9bxOhlASrroJWEIGzYE0KJoxUTD 5/dT6fu8uofoyqdyWi4AgrqnXoHD29iQRHZbs5K19ngo1R+Klqs8Rss2rJ74Gv1BuueW Ko7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k64si7304882iof.103.2021.09.13.07.21.03; Mon, 13 Sep 2021 07:21:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345964AbhIMOUa (ORCPT + 99 others); Mon, 13 Sep 2021 10:20:30 -0400 Received: from relay03.th.seeweb.it ([5.144.164.164]:51853 "EHLO relay03.th.seeweb.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344901AbhIMOPi (ORCPT ); Mon, 13 Sep 2021 10:15:38 -0400 Received: from SoMainline.org (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 6CC6A1F4B9; Mon, 13 Sep 2021 16:14:18 +0200 (CEST) Date: Mon, 13 Sep 2021 16:14:17 +0200 From: Marijn Suijten To: AngeloGioacchino Del Regno Cc: robdclark@gmail.com, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch, dmitry.baryshkov@linaro.org, abhinavk@codeaurora.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, konrad.dybcio@somainline.org, martin.botka@somainline.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, paul.bouchara@somainline.org Subject: Re: [PATCH v2 2/2] drm/msm/dpu: Fix timeout issues on command mode panels Message-ID: <20210913141417.7brqczhagufgqch2@SoMainline.org> References: <20210911163919.47173-1-angelogioacchino.delregno@somainline.org> <20210911163919.47173-2-angelogioacchino.delregno@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210911163919.47173-2-angelogioacchino.delregno@somainline.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-09-11 18:39:19, AngeloGioacchino Del Regno wrote: > In function dpu_encoder_phys_cmd_wait_for_commit_done we are always > checking if the relative CTL is started by waiting for an interrupt > to fire: it is fine to do that, but then sometimes we call this > function while the CTL is up and has never been put down, but that > interrupt gets raised only when the CTL gets a state change from > 0 to 1 (disabled to enabled), so we're going to wait for something > that will never happen on its own. > > Solving this while avoiding to restart the CTL is actually possible > and can be done by just checking if it is already up and running > when the wait_for_commit_done function is called: in this case, so, > if the CTL was already running, we can say that the commit is done > if the command transmission is complete (in other terms, if the > interface has been flushed). > > Signed-off-by: AngeloGioacchino Del Regno This has unfortunately not solved any ctl_start timeout issues for me/us on other platforms yet, but for the code: Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c > index aa01698d6b25..aa5d3b3cef15 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c > @@ -682,6 +682,9 @@ static int dpu_encoder_phys_cmd_wait_for_commit_done( > if (!dpu_encoder_phys_cmd_is_master(phys_enc)) > return 0; > > + if (phys_enc->hw_ctl->ops.is_started(phys_enc->hw_ctl)) > + return dpu_encoder_phys_cmd_wait_for_tx_complete(phys_enc); > + > return _dpu_encoder_phys_cmd_wait_for_ctl_start(phys_enc); > } > > -- > 2.32.0 >