Unverified Commit e479da40 authored by John Keeping's avatar John Keeping Committed by Javier Martinez Canillas
Browse files

drm/ssd130x: fix ssd132x_clear_screen() columns



The number of columns relates to the width, not the height.  Use the
correct variable.

Signed-off-by: default avatarJohn Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Fixes: fdd591e0 ("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: default avatarJavier Martinez Canillas <javierm@redhat.com>
parent afe38284
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);