Thread (4 messages) read the whole thread 4 messages, 3 authors, 2026-06-25

Re: [PATCH] staging: fbtft: fix unaligned vmem writes when txbuf is byte-offset

From: Andy Shevchenko <hidden>
Date: 2026-06-25 14:00:01
Also in: dri-devel, linux-staging, lkml

On Thu, Jun 25, 2026 at 07:02:37PM +0800, suryasaimadhu wrote:
fbtft_write_vmem16_bus8() and fb_ra8875's write_vmem16_bus8() offset
txbuf16 by one byte for a command/start prefix, then store 16-bit pixel
data via txbuf16[i]. On strict-alignment architectures this can fault
the same way as the write_reg path fixed in the previous patch.
.write_reg()

Can you provide a real world example of the failure?
Use put_unaligned() for these stores.
Sounds like a fix without Fixes tag.
Signed-off-by: suryasaimadhu <redacted>
Use your name in accordance with your official documents.

...
quoted hunk ↗ jump to hunk
+++ b/drivers/staging/fbtft/fb_ra8875.c
@@ -10,6 +10,7 @@
 #include <linux/delay.h>
 
You should move this blank line to be...
 #include <linux/gpio/consumer.h>
+#include <linux/unaligned.h>
...here.
 #include "fbtft.h"
...
 #define DRVNAME "fb_ra8875"
Are other drivers also being affected?

...
quoted hunk ↗ jump to hunk
+++ b/drivers/staging/fbtft/fbtft-bus.c
Also needs linux/unaligned.h.
+			put_unaligned(cpu_to_be16(vmem16[i]), &txbuf16[i]);
-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help