Skip to content

Commit e479da4

Browse files
johnkeepingmartinezjavier
authored andcommitted
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: John Keeping <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Fixes: fdd591e ("drm/ssd130x: Add support for the SSD132x OLED controller family") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Javier Martinez Canillas <[email protected]>
1 parent afe3828 commit e479da4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/solomon/ssd130x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
974974

975975
static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
976976
{
977-
unsigned int columns = DIV_ROUND_UP(ssd130x->height, SSD132X_SEGMENT_WIDTH);
977+
unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
978978
unsigned int height = ssd130x->height;
979979

980980
memset(data_array, 0, columns * height);

0 commit comments

Comments
 (0)