Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1251387rwr; Fri, 5 May 2023 11:10:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6zelvw8TXEAAENzXoltVaKGqlIQiRrZ1j4raxuUVEe5v3xpDjXo85ePOJ0O2c9IRrFmvQu X-Received: by 2002:a17:90b:4c49:b0:24e:1b19:867f with SMTP id np9-20020a17090b4c4900b0024e1b19867fmr2372046pjb.37.1683310242817; Fri, 05 May 2023 11:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683310242; cv=none; d=google.com; s=arc-20160816; b=FeUw+d3qbPWTPWFOa3yXSH0LpSCKS4LMjA1DdSklTkTEIw847zVMapUXbz2FA9/cP3 1sCGrVLutzaHQn6jLF4j3WgtlAwNil43/fq7BmXPbuQ4qnEmk/9tIhi6Q/pCVYplywAG +tIO56tQISrBaR3eJ5cYNr2fd2gKhARD33EyHTQy3s2ZMzIks3XTio6CAzif5TtrvDsR n+vA9RI5/plvKxswuND+i4wqVLc26YN2/K+fL9T6Fi6desucSFPm1yFaEwAJTQR+Weqt py2mLgfsGFLXC9SmXmp1Mu3mLS++ott8gSuV7ZyMPc0TAIu0sVGCvWgjJ6f+MDoGyxFk 9Btw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6rbfN74trKQjmOAHHOAHCgdxNQjqCKu0b0tHa6uFN3g=; b=TrOIElWnNOn3KusQHLuKqbOd+CcSjlwzno2SIRE4xjESuW9IphW8BkG9lkgTqhCPDq 23kxPyKdSX+5M+/HagK+9ICjDG8B3KFtXfnQOWjPGKbHT/5fnyj4inVmJGdG3291+dwV 9CbXIG9yfTpEys25INjZv+orNw2QAeY3aUYeVIglt2NuenV3VGKpxfHY2hgu6hAno7JW 7UlCHlmX9OywK52wc50/L2k8ZqEJTO1QGPp7udxEwDTnYGD6/n0mByhx8mxOUC/sPnb7 fH36n+v+XtZcokSUJxF3dFc4d9bUm2Q0AcUA+HXQR8bB2ud4g6oLaAXYiwvkW+n539R0 Evaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bGPkNtKV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc12-20020a17090b3b8c00b00246596483a3si13834401pjb.37.2023.05.05.11.10.30; Fri, 05 May 2023 11:10:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bGPkNtKV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233217AbjEESED (ORCPT + 99 others); Fri, 5 May 2023 14:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232149AbjEESEC (ORCPT ); Fri, 5 May 2023 14:04:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79E0C1C0DC for ; Fri, 5 May 2023 11:03:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 12B6C614CB for ; Fri, 5 May 2023 18:03:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F3DCC4339E for ; Fri, 5 May 2023 18:03:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683309835; bh=6CQmJHAWv2zDJ+V7xR9gAKn2jhIg2rUcA8a989LpS1c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bGPkNtKVKiU+1j6F2yY+dwXD54ldT1TDiGkj60HMKi2Xr893dwH+9aR3dQKrQ/Ky2 EGFOUnudWAU31098IkprQQ+jflV1seZ6anJl7ZS5NXtO5EJ9xvhkDO8cGGjvsMMl02 p9ngwx3PzUp8UkfsPGU/EkABrp+CQ+KuDb/tjMXzgy2KCkNmkKjfhzX8od0CA2/1S5 QgOIu9iqp/dSOTE5FfYByitMahjYhRizQRI4lCNbVd8CtgUkghZQZSluOOnoVoAzh5 t75LwFzgZn3+EFUPoHc/tEisfR23JLb2YZZpZkpqrr+HNW13oSRgeihtqW+MV5iK/R A6nYiy63cBFnQ== Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-517c01edaaaso1355245a12.3 for ; Fri, 05 May 2023 11:03:55 -0700 (PDT) X-Gm-Message-State: AC+VfDywMXPa0bJrIOgDmoBndz/XqTSicPyI0bztNcilgt1+kntuMUQr EtF5Md0S/B2XQ3ctWYKDAbEhXVJ390z/hGKln7EKoQ== X-Received: by 2002:a17:90a:9112:b0:24e:2d3:a404 with SMTP id k18-20020a17090a911200b0024e02d3a404mr2416525pjo.4.1683309834972; Fri, 05 May 2023 11:03:54 -0700 (PDT) MIME-Version: 1.0 References: <20230427142934.55435-1-francesco@dolcini.it> <20230427142934.55435-8-francesco@dolcini.it> In-Reply-To: <20230427142934.55435-8-francesco@dolcini.it> From: Robert Foss Date: Fri, 5 May 2023 20:03:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 7/9] drm/bridge: tc358768: fix TXTAGOCNT computation To: Francesco Dolcini Cc: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , tomi.valkeinen@ideasonboard.com, dri-devel@lists.freedesktop.org, Francesco Dolcini , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 27, 2023 at 4:35=E2=80=AFPM Francesco Dolcini wrote: > > From: Francesco Dolcini > > Correct computation of TXTAGOCNT register. > > This register must be set to a value that ensure that the > TTA-GO period =3D (4 x TLPX) > > with the actual value of TTA-GO being > > 4 x (TXTAGOCNT + 1) x (HSByteClk cycle) > > Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") > Signed-off-by: Francesco Dolcini > --- > drivers/gpu/drm/bridge/tc358768.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/t= c358768.c > index 36e33cba59a2..854fc04f08d0 100644 > --- a/drivers/gpu/drm/bridge/tc358768.c > +++ b/drivers/gpu/drm/bridge/tc358768.c > @@ -795,7 +795,7 @@ static void tc358768_bridge_pre_enable(struct drm_bri= dge *bridge) > > /* TXTAGOCNT[26:16] RXTASURECNT[10:0] */ > val =3D tc358768_to_ns((lptxcnt + 1) * dsibclk_nsk * 4); > - val =3D tc358768_ns_to_cnt(val, dsibclk_nsk) - 1; > + val =3D tc358768_ns_to_cnt(val, dsibclk_nsk) / 4 - 1; > val2 =3D tc358768_ns_to_cnt(tc358768_to_ns((lptxcnt + 1) * dsibcl= k_nsk), > dsibclk_nsk) - 2; > val =3D val << 16 | val2; > -- > 2.25.1 > Reviewed-by: Robert Foss