Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1811980pxb; Fri, 10 Sep 2021 14:49:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPh8mRbqOthCuV06joooVNaQtqYWCqiDSVNFzwOAANVU5HoNCfsvvKImCpj1ztKkYFXms9 X-Received: by 2002:a05:6638:c4d:: with SMTP id g13mr6156259jal.43.1631310583503; Fri, 10 Sep 2021 14:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631310583; cv=none; d=google.com; s=arc-20160816; b=SbBWHola2U0FbK6NBw26H7H5BL9CXXcqnnjT7m4149A8IH0+Rt3fP0UkPVhXzSSYOS Dd4OlEgzV+lBAvvg7VVuyEw4UNW3SPAF4wa3VJQvh9My90hYaQIGN4mTfGcJoRF7eKcp vzEs8okOqWTn6yFSIE012hXUwkL5bwzKqUv56qtHA903D4FQh0g1ssMf1sMVWthEG/GU hrgokeItxNGdV56WNURAfQxRz5H+OolTbXmBmJZaUpybnydFCeaOmzMyzH7miB3VSZ3b J5m5DI37lAMKYD2wj4WWs9M+1Y0P//aYPLq5uD1n4Yv6Q5UoRq//fv8HEAvwfeErW8xQ WMwg== 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=B/jUqwiPhn4e9P6H8xUKqlpr8aMMIV5zGOC+9qREKQo=; b=hqAb8KzWPPfBzQquPAMwFBgc7n8xJlHm4yrt0l97NKKjCuPc/+aeZ9KPsMu9+SZVZe 48qMu+KXdEq/eWoK8YT2+AiYpQFYB5P94dgSabkcbIiclCN6wXMUlvfjbFJPrOB50R+l NyQwigMSgxCHyICl1SnKlV2U63PO4lDTW5nK0ZuO7GMHsQohJ6NAarG+iJKp23d7KPNd 7qH2HVJu7ilKagIZbCakpgN+Dc+AYW2F+Jy9fhivnc+8bAWKScr4h/kf7HgTFFBDoTQv aSdLE0BdfQ14x7tGjU48NaQcB7XaJ8zxhtV4QnVrRY/my9WZBNV2tJ2F8WhlOXxeSo+8 Z3uQ== 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 m12si6569438ioj.96.2021.09.10.14.49.30; Fri, 10 Sep 2021 14:49:43 -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 S234673AbhIJVtk (ORCPT + 99 others); Fri, 10 Sep 2021 17:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234646AbhIJVtj (ORCPT ); Fri, 10 Sep 2021 17:49:39 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [IPv6:2001:4b7a:2000:18::162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25DF1C061756 for ; Fri, 10 Sep 2021 14:48:26 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (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 8C9311F50C; Fri, 10 Sep 2021 23:48:21 +0200 (CEST) Date: Fri, 10 Sep 2021 23:48:20 +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 2/2] drm/msm/dpu: Fix timeout issues on command mode panels Message-ID: <20210910214820.h6in2ffl5pwu7xtv@Marijn-Arch-PC.localdomain> References: <20210901174347.1012129-1-angelogioacchino.delregno@somainline.org> <20210901174347.1012129-2-angelogioacchino.delregno@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210901174347.1012129-2-angelogioacchino.delregno@somainline.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Angelo! On 2021-09-01 19:43:47, 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 > --- > 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..b5b1b555ac4e 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) > + return dpu_encoder_phys_cmd_wait_for_tx_complete(phys_enc); In the previous commit you introduced is_started to the ops struct as function pointer, and you probably intend to call it here instead of just checking whether it might be NULL. As far as I remember this was also the reason for previously mentioning that it was faulty and required a v2 in: https://lore.kernel.org/linux-arm-msm/bdc67afc-3736-5497-c43f-5165c55e0354@somainline.org/ Thanks! - Marijn > + > return _dpu_encoder_phys_cmd_wait_for_ctl_start(phys_enc); > } > > -- > 2.32.0 >