]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/ssd130x: fix ssd132x_clear_screen() columns
authorJohn Keeping <jkeeping@inmusicbrands.com>
Wed, 11 Jun 2025 11:13:06 +0000 (12:13 +0100)
committerJavier Martinez Canillas <javierm@redhat.com>
Thu, 12 Jun 2025 12:04:56 +0000 (14:04 +0200)
The number of columns relates to the width, not the height.  Use the
correct variable.

Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")
Link: https://lore.kernel.org/r/20250611111307.1814876-1-jkeeping@inmusicbrands.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
drivers/gpu/drm/solomon/ssd130x.c

index dd2006d51c7a2fc8501904565da806aa47333ad6..eec43d1a55951b7a5fe00d27a2a0572eed6011e1 100644 (file)
@@ -974,7 +974,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
 
 static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
 {
-       unsigned int columns = DIV_ROUND_UP(ssd130x->height, SSD132X_SEGMENT_WIDTH);
+       unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
        unsigned int height = ssd130x->height;
 
        memset(data_array, 0, columns * height);