Patch "drm/repaper: Reduce temporary buffer size in repaper_fb_dirty()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/repaper: Reduce temporary buffer size in repaper_fb_dirty()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-repaper-reduce-temporary-buffer-size-in-repaper_.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ea21440c33b801d3e4aeea388badd1edd3f4dcc3
Author: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Date:   Thu Mar 17 09:18:30 2022 +0100

    drm/repaper: Reduce temporary buffer size in repaper_fb_dirty()
    
    [ Upstream commit fedf429e071f6dbbe7a69dfc342492e037692018 ]
    
    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 <geert@xxxxxxxxxxxxxx>
    Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
    Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220317081830.1211400-6-geert@xxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index e62f4d16b2c6b..7e2b0e2241358 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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux