Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4249224rdb; Thu, 14 Sep 2023 17:14:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdeVcuHGHb4cFGc59iVoWfGmq5Lv1u0EptxO8XU/D/yNswtcPMIij6IgqwcSzV8lnymS5O X-Received: by 2002:a17:90a:7562:b0:26d:4312:17ec with SMTP id q89-20020a17090a756200b0026d431217ecmr73601pjk.1.1694736843766; Thu, 14 Sep 2023 17:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694736843; cv=none; d=google.com; s=arc-20160816; b=qVCE7EFRKjQHSmcEBPqiy5cHiiZvIHCDnkl3eyVCj7mk9JCu6Chj9TV4XRnsz/aoMK /it8egxbOhJ198raCq/cR/QAhGSU1Nor7NZhARLpdma1rp4xG7mQjW/FvZggnZypu4Uu Lndn8pcffzDMEYsO5pB+7kNfxrzk+mNA0ki9rvI73+5E8iV6V9mFcBD/X2LfkqZR60Hb U1MFLJu9yDsElHSYEEdBoiEDtFe2L7gN/FthQVWFWfb+FlNNEFDNw4MHWNN6l7QARe+N +J7wZBJDAKYbSXHX//sd2EaZTh4nNTXYl0VG5K5gL775ECX+kj4Faw7f5suVvhT0UCrd HkRQ== 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:dkim-signature; bh=DRRaGNAx2fDwcG6xxtV2nYkFGoLp7pCw7BN2rrclRrc=; fh=bNNtWHpizvJercGxl7wX+q7egSK9H7RxyUKn6cWuK1E=; b=XtjhLlVsjYwm05H/hqCYc1E8Q9abDtl6vWzGFDqY/1eorJM/BtDogx3kloC9yF2AZU ab0Kff574tKNFzWruvkmM0wsExQBWl8bqDkpv0+JqcKaa/HN3YEC5fJJvqrOL88kg/71 hiXpPcYCN+09vLW9Vua1ynOdAeN/XNaMMXz+ZpYgYeoTBZKsQABj7XiPUJ38brdVdZPR bAuX5ztXFCg/PUlX8LiXq9TiVe+vv+rOZdBulzWL8TnpQ/4bZRs0wySQgQ7Kmvmsf/23 DsFsGMmvUsV6GMFyk6pV6LeaB+vAvhb+UnMT51E6MDpHK3rFqeFZNc+dj3PEg/jZDJw/ vwNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CJ7gxIhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id r18-20020a17090aa09200b0026383536294si2312071pjp.175.2023.09.14.17.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 17:14:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CJ7gxIhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9CE29829BD56; Thu, 14 Sep 2023 15:48:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbjINWr7 (ORCPT + 99 others); Thu, 14 Sep 2023 18:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbjINWr6 (ORCPT ); Thu, 14 Sep 2023 18:47:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05C6326B7; Thu, 14 Sep 2023 15:47:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DF79C433C9; Thu, 14 Sep 2023 22:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694731673; bh=8oQq0VYcvVbisN6FW9kbAh9+TeVEDESzGIQyb2pXlFM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CJ7gxIhHti/Me6L5sAEzKxN7FrFJDkV8vaOQnFAMFeXZXZM3GO3tRozkwk24k9EJC 6/aW17lXE9Gg6aR8ePVzzP8yfp9uVjDmQMJYsZKYV3ZDuVxrMJU/FwQPUU1vkZ6mhr zFMl78uyS5AI7NuZX2mJWdfzNRcjmojIp9VuiHrh/dzYNWU5IKoHKkpIUkFzdOpurv 3RGuQ2HWkrAI4Iwp819RX2HZVwbvRePYlOcGuKGbu04+VUQV6gjw8ayEOm7FG8dUoh +QMX9E1hN+xnL0TkvyKcQlxN6I05any05XQzNaFhAtPq/yZ9gGQIGvVAtLIx9xRdzI QpEUM331gNJUw== Received: by mercury (Postfix, from userid 1000) id E67F710609D6; Fri, 15 Sep 2023 00:47:49 +0200 (CEST) Date: Fri, 15 Sep 2023 00:47:49 +0200 From: Sebastian Reichel To: Stefan Moring Cc: broonie@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: Increase imx51 ecspi burst length based on transfer length Message-ID: <20230914224749.kmg4xqsg3wmfwwhj@mercury.elektranox.org> References: <20230628125406.237949-1-stefan.moring@technolution.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lxinejkm3oweqd2g" Content-Disposition: inline In-Reply-To: <20230628125406.237949-1-stefan.moring@technolution.nl> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Sep 2023 15:48:00 -0700 (PDT) --lxinejkm3oweqd2g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Jun 28, 2023 at 02:54:06PM +0200, Stefan Moring wrote: > IMX51 supports 4096 bit burst lengths. Using the spi transfer length > instead of bits_per_word increases performance significantly. >=20 > Signed-off-by: Stefan Moring > --- I have an i.MX6ULL system with "inanbo,t28cp45tn89-v17" panel, which breaks due to this change. Reverting this patch results in working panel. Note, that the panel driver [0] does 'spi->bits_per_word =3D 9;'. [0] drivers/gpu/drm/panel/panel-sitronix-st7789v.c -- Sebastian > drivers/spi/spi-imx.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c > index 34e5f81ec431..cbd306c25d28 100644 > --- a/drivers/spi/spi-imx.c > +++ b/drivers/spi/spi-imx.c > @@ -644,9 +644,13 @@ static int mx51_ecspi_prepare_transfer(struct spi_im= x_data *spi_imx, > if (spi_imx->slave_mode && is_imx53_ecspi(spi_imx)) > ctrl |=3D (spi_imx->slave_burst * 8 - 1) > << MX51_ECSPI_CTRL_BL_OFFSET; > - else > - ctrl |=3D (spi_imx->bits_per_word - 1) > - << MX51_ECSPI_CTRL_BL_OFFSET; > + else { > + if (spi_imx->count >=3D 512) > + ctrl |=3D 0xFFF << MX51_ECSPI_CTRL_BL_OFFSET; > + else > + ctrl |=3D (spi_imx->count*8 - 1) > + << MX51_ECSPI_CTRL_BL_OFFSET; > + } > =20 > /* set clock speed */ > ctrl &=3D ~(0xf << MX51_ECSPI_CTRL_POSTDIV_OFFSET | > @@ -1243,6 +1247,7 @@ static int spi_imx_setupxfer(struct spi_device *spi, > spi_imx->spi_bus_clk =3D t->speed_hz; > =20 > spi_imx->bits_per_word =3D t->bits_per_word; > + spi_imx->count =3D t->len; > =20 > /* > * Initialize the functions for transfer. To transfer non byte-aligned > --=20 > 2.34.1 >=20 --lxinejkm3oweqd2g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmUDjYYACgkQ2O7X88g7 +prukBAAnl9cT+kmXltGA07ukiiFUS+xePDTzU3O6pJ+3SO9zIhRHU+vPijobqCA U9oBWiJA5TbSTVZiwBz77Ty+PyTufqRl2isJLfSTrQDVjDluGtMxlwKafqkVohqG Js32INNEOsCX1hWhsn8Szv61XfkYjR3uik4Mu2g6/UXrGMOSNQBWxwlijMMM2QRF /tTJUdBIKIAzJcw73Bsr+eoO2v+4sa3EkcC39CerAYNzCSt0RBrNpdCa3HhjSt6X 9RfxKL5KH8ZS6U+XJ5M0u6iy0xL60QmGLip1Ypyp7nLhjrUuw7VLyGBKomCPNboP 2bju8OJosb4V5vF1jlPU9icA1FPCvWnBhyw/THcXG2m1DnnnMUjp77lhoLHx5pDS 8qYVemRqSw8wqwxivSH3KYXjUP2PctGByDjL5W09C7Xwk5g7NlJejX9o/o4pxCoD NPWQphAlxhPTxkADGrxMw8zdrD2urPaiQyXPQmZqY3LIu6l2MAIQ5ASJ+jaDrgzQ tRVkBHPWXLqpaaR0oLuraJ75WcM51g0t2Q5/jpM2AAzb0BnxDiyA/Js6uybx08or bRuCkbUbMo9NGNBNO8iFlYrE/9vhJwyHzlhuPAltOPvqKTRqSsJ4Luwk2mWm2PtO 0SGxQaidlCGOa+f9i61sf8agNsoNF4u1dcwlBbWlt7A7kad4PQo= =kCXx -----END PGP SIGNATURE----- --lxinejkm3oweqd2g--