]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ssd130x: Reduce temporary buffer sizes
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 17 Mar 2022 08:18:29 +0000 (09:18 +0100)
committerJavier Martinez Canillas <javierm@redhat.com>
Thu, 17 Mar 2022 11:29:43 +0000 (12:29 +0100)
commit59f5ee566f7173c97ade3a24619550b36299d416
treee87c5970f1330ded157bdab8a48a551434d4ca3b
parentf73b2e71fe0ae120f6df8bd3c0c075cd59c0f508
drm/ssd130x: Reduce temporary buffer sizes

ssd130x_clear_screen() allocates a temporary buffer sized to hold one
byte per pixel, while it only needs to hold one bit per pixel.

ssd130x_fb_blit_rect() allocates a temporary buffer sized to hold one
byte per pixel for the whole frame buffer, while it only needs to hold
one bit per pixel for the part that is to be updated.
Pass dst_pitch to drm_fb_xrgb8888_to_mono(), as we have already
calculated it anyway.

Fixes: 15bc6b68c98a73f6 ("drm: Add driver for Solomon SSD130x OLED displays")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220317081830.1211400-5-geert@linux-m68k.org
drivers/gpu/drm/solomon/ssd130x.c