Re: [PATCH] staging: sm750fb: fix mono image source stride mismatch in lynxfb_ops_imageblit()

Muhammad Bilal <[email protected]> Sat, 18 Jul 2026 15:38:52 +0500
Newsgroups org.kernel.vger.linux-fbdev,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel
Message-ID <CADqcGB=F6Qvk-3zQ=DCPewfpOAQvCta2q-WrfuSPanmoVqyGpg@mail.gmail.com>
On Sat, Jul 18, 2026, Dan Carpenter wrote:
> Looks reasonable.  Add a Fixes tag.
>
> You have this hardware and are finding these with testing?
>
> It would be better to move the source delta calculation into
> the the sm750_hw_imageblit() since it's just width rounded up
> (or rounded down if you want to be wrong I suppose).

Thanks for the review. Sending v2 as a separate message since it
came out as a fuller rework rather than a small diff on v1:

 - Added Fixes: 81dee67e215b2 ("staging: sm750fb: add sm750 to
   staging"), traced via git blame. The bug has been there,
   unchanged, since the original 2015 staging import.

 - No, I don't have this hardware. This was found by auditing
   sm750_hw_imageblit()'s internal stride calculation against what
   its caller was passing in, and confirmed with a clean "-Werror"
   build. No runtime testing on real sm750 silicon.

 - Moved the stride calculation into sm750_hw_imageblit() itself, as
   you suggested, and dropped src_delta as a parameter entirely. It
   was the only caller and was independently recomputing (wrong)
   something the function already had every input for - which is
   exactly how this bug happened. Updated the declaration in
   sm750_accel.h and the de_imageblit function pointer typedef in
   sm750.h to match.

regards,
Muhammad Bilal