Re: [PATCH] drm/mipi-dbi: Fix max_chunk calculation in spi_transfer

2022-04-16 Thread Noralf Trønnes
Den 08.03.2022 02.56, skrev Yunhao Tian: > In __spi_validate, there's a validation that no partial transfers > are accepted (xfer->len % w_size must be zero). When > max_chunk is not a multiple of bpw (e.g.max_chunk = 65535, > bpw = 16), the transfer will be rejected. > > This patch clamps max_

[PATCH] drm/mipi-dbi: Fix max_chunk calculation in spi_transfer

2022-03-08 Thread Yunhao Tian
In __spi_validate, there's a validation that no partial transfers are accepted (xfer->len % w_size must be zero). When max_chunk is not a multiple of bpw (e.g.max_chunk = 65535, bpw = 16), the transfer will be rejected. This patch clamps max_chunk to the word size, preventing the transfer from bei