Skip to content
Commit 435c2490 authored by Yunhao Tian's avatar Yunhao Tian Committed by Noralf Trønnes
Browse files

drm/mipi-dbi: align max_chunk to 2 in spi_transfer



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 aligns max_chunk to 2 bytes (the maximum value of bpw is 16),
so that no partial transfer will occur.

Fixes: d23d4d4d ("drm/tinydrm: Move tinydrm_spi_transfer()")

Signed-off-by: default avatarYunhao Tian <t123yh.xyz@gmail.com>
Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220510030219.2486687-1-t123yh.xyz@gmail.com
parent 14374e3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment