diff options
author | Geert Uytterhoeven <[email protected]> | 2022-03-17 09:18:30 +0100 |
---|---|---|
committer | Javier Martinez Canillas <[email protected]> | 2023-07-29 21:22:02 +0200 |
commit | fedf429e071f6dbbe7a69dfc342492e037692018 (patch) | |
tree | 9e99bd6c76ac6258f4c81c09370677aa94d2d4de | |
parent | 5f0d984053f74983a287100a9519b2fabb785fb5 (diff) |
drm/repaper: Reduce temporary buffer size in repaper_fb_dirty()
As the temporary buffer is no longer used to store 8-bit grayscale data,
its size can be reduced to the size needed to store the monochrome
bitmap data.
Fixes: 24c6bedefbe71de9 ("drm/repaper: Use format helper for xrgb8888 to monochrome conversion")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Javier Martinez Canillas <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/tiny/repaper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c index c2677d081a7b..13ae148f59b9 100644 --- a/drivers/gpu/drm/tiny/repaper.c +++ b/drivers/gpu/drm/tiny/repaper.c @@ -533,7 +533,7 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb) DRM_DEBUG("Flushing [FB:%d] st=%ums\n", fb->base.id, epd->factored_stage_time); - buf = kmalloc_array(fb->width, fb->height, GFP_KERNEL); + buf = kmalloc(fb->width * fb->height / 8, GFP_KERNEL); if (!buf) { ret = -ENOMEM; goto out_exit; |