drm/sitronix/st7571-i2c: reset position before clearing display

We cannot know where the write pointer is, always reset position to
(0,0) before clearing display.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250913-st7571-reset-v1-1-ae5f58acdf8d@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Marcus Folkesson 2025-09-13 08:09:40 +02:00 committed by Javier Martinez Canillas
parent 0f2efbe6d8
commit eb0ed2ad33
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69

View File

@ -263,6 +263,7 @@ static int st7571_fb_clear_screen(struct st7571_device *st7571)
u32 npixels = st7571->ncols * round_up(st7571->nlines, ST7571_PAGE_HEIGHT) * st7571->bpp;
char pixelvalue = 0x00;
st7571_set_position(st7571, 0, 0);
for (int i = 0; i < npixels; i++)
regmap_bulk_write(st7571->regmap, ST7571_DATA_MODE, &pixelvalue, 1);