Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: suryasaimadhu <suryasaimadhu369@gmail.com>
Cc: andy@kernel.org, gregkh@linuxfoundation.org,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: fbtft: fix unaligned vmem writes when txbuf is byte-offset
Date: Thu, 25 Jun 2026 16:59:55 +0300	[thread overview]
Message-ID: <aj00W8sbiqsYDH7b@ashevche-desk.local> (raw)
In-Reply-To: <20260625110237.304435-1-suryasaimadhu369@gmail.com>

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 <suryasaimadhu369@gmail.com>

Use your name in accordance with your official documents.

...

> +++ 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?

...

> +++ 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



      parent reply	other threads:[~2026-06-25 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260625104220.21E5A1F00A3D@smtp.kernel.org>
2026-06-25 11:02 ` [PATCH] staging: fbtft: fix unaligned vmem writes when txbuf is byte-offset suryasaimadhu
2026-06-25 13:20   ` kernel test robot
2026-06-25 13:53   ` kernel test robot
2026-06-25 13:59   ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aj00W8sbiqsYDH7b@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=suryasaimadhu369@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox