linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: stm32: fix accidential revert to byte-sized transfer splitting
@ 2023-08-16 14:52 Leonard Göhrs
  2023-08-21 21:09 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Leonard Göhrs @ 2023-08-16 14:52 UTC (permalink / raw)
  To: valentin.caron, Alain Volmat, Mark Brown, Maxime Coquelin,
	Alexandre Torgue
  Cc: conor+dt, devicetree, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-spi, linux-stm32, robh+dt,
	Leonard Göhrs

Commit 6f486556abe35 ("spi: stm32: renaming of spi_master into
spi_controller") included an accidential reverted of a change added in
commit 1e4929112507f ("spi: stm32: split large transfers based on word
size instead of bytes").

This breaks large SPI transfers with word sizes > 8 bits, which are
e.g. common when driving MIPI DBI displays.

Fix this by using `spi_split_transfers_maxwords()` instead of
`spi_split_transfers_maxsize()`.

Fixes: 6f486556abe35 ("spi: stm32: renaming of spi_master into spi_controller")
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
---
 drivers/spi/spi-stm32.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 6d10fa4ab7839..7ddf9db776b06 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1001,9 +1001,9 @@ static int stm32_spi_prepare_msg(struct spi_controller *ctrl,
 	if (spi->cfg->set_number_of_data) {
 		int ret;
 
-		ret = spi_split_transfers_maxsize(ctrl, msg,
-						  STM32H7_SPI_TSIZE_MAX,
-						  GFP_KERNEL | GFP_DMA);
+		ret = spi_split_transfers_maxwords(ctrl, msg,
+						   STM32H7_SPI_TSIZE_MAX,
+						   GFP_KERNEL | GFP_DMA);
 		if (ret)
 			return ret;
 	}

base-commit: 2ccdd1b13c591d306f0401d98dedc4bdcd02b421
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: stm32: fix accidential revert to byte-sized transfer splitting
  2023-08-16 14:52 [PATCH] spi: stm32: fix accidential revert to byte-sized transfer splitting Leonard Göhrs
@ 2023-08-21 21:09 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-08-21 21:09 UTC (permalink / raw)
  To: valentin.caron, Alain Volmat, Maxime Coquelin, Alexandre Torgue,
	Leonard Göhrs
  Cc: conor+dt, devicetree, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-spi, linux-stm32, robh+dt

On Wed, 16 Aug 2023 16:52:37 +0200, Leonard Göhrs wrote:
> Commit 6f486556abe35 ("spi: stm32: renaming of spi_master into
> spi_controller") included an accidential reverted of a change added in
> commit 1e4929112507f ("spi: stm32: split large transfers based on word
> size instead of bytes").
> 
> This breaks large SPI transfers with word sizes > 8 bits, which are
> e.g. common when driving MIPI DBI displays.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: stm32: fix accidential revert to byte-sized transfer splitting
      commit: 715dc9a1f0c8ae0bbd4e5b37f9a165ea39e47fe9

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-21 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 14:52 [PATCH] spi: stm32: fix accidential revert to byte-sized transfer splitting Leonard Göhrs
2023-08-21 21:09 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).