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)
commit4442ac1af10442d6e7e824fdc226f89ed94d5b53
treee87c5970f1330ded157bdab8a48a551434d4ca3b
parenta97e753fd358e23155ae42c61292dfd57eb54c4a
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: a61732e808672cfa ("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