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

Commit 0d03011894d2 ("fbdev: Improve performance of cfb_imageblit()")
broke cfb_imageblit() for image widths 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: 0d03011894d2 ("fbdev: Improve performance of cfb_imageblit()")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220313192952.12058-3-tzimmermann@suse.de
drivers/video/fbdev/core/cfbimgblt.c