fbdev: Fix sys_imageblit() for arbitrary image widths
authorThomas Zimmermann <tzimmermann@suse.de>
Sun, 13 Mar 2022 19:29:51 +0000 (20:29 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 24 Mar 2022 23:55:52 +0000 (09:55 +1000)
commit40faaf80c463b2c99a0351d28bd74d75d64ed017
treeac30af48895176dea45e7beb3475b85d40c50c88
parentc73c3576a2227492b448f9be41428ce6a0b5855a
fbdev: Fix sys_imageblit() for arbitrary image widths

Commit 6f29e04938bf ("fbdev: Improve performance of sys_imageblit()")
broke sys_imageblit() for image width that are not aligned to 8-bit
boundaries. Fix this by handling the trailing pixels on each line
separately. The performance improvements in the original commit do not
regress by this change.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 6f29e04938bf ("fbdev: Improve performance of sys_imageblit()")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220313192952.12058-2-tzimmermann@suse.de
drivers/video/fbdev/core/sysimgblt.c