linux/drivers/gpu/drm/sitronix
David Lechner 46d8a07b4a drm/sitronix/st7586: fix bad pixel data due to byte swap
Correctly set dbi->write_memory_bpw for the ST7586 driver. This driver
is for a monochrome display that has an unusual data format, so the
default value set in mipi_dbi_spi_init() is not correct simply because
this controller is non-standard.

Previously, we were using dbi->swap_bytes to make the same sort of
workaround, but it was removed in the same commit that added
dbi->write_memory_bpw, so we need to use the latter now to have the
correct behavior.

This fixes every 3 columns of pixels being swapped on the display. There
are 3 pixels per byte, so the byte swap caused this effect.

Fixes: df3fb27a74 ("drm/mipi-dbi: Make bits per word configurable for pixel transfers")
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20260228-drm-mipi-dbi-fix-st7586-byte-swap-v1-1-e78f6c24cd28@baylibre.com
2026-03-07 17:14:09 -06:00
..
Kconfig drm: Add driver for Sitronix ST7920 LCD displays 2025-12-15 18:25:09 +01:00
Makefile drm: Add driver for Sitronix ST7920 LCD displays 2025-12-15 18:25:09 +01:00
st7571-i2c.c drm/sitronix/st7571: split up the driver into a common and an i2c part 2025-12-15 13:49:40 +01:00
st7571-spi.c drm/sitronix/st7571-spi: add support for SPI interface 2025-12-15 13:49:40 +01:00
st7571.c drm/sitronix/st7571: split up the driver into a common and an i2c part 2025-12-15 13:49:40 +01:00
st7571.h drm/sitronix/st7571: split up the driver into a common and an i2c part 2025-12-15 13:49:40 +01:00
st7586.c drm/sitronix/st7586: fix bad pixel data due to byte swap 2026-03-07 17:14:09 -06:00
st7735r.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
st7920.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00