On 3/15/22 12:07, Geert Uytterhoeven wrote: > The rectangle update functions ssd130x_fb_blit_rect() and > ssd130x_update_rect() do not behave correctly when x1 != 0 or y1 != > 0, or when y1 or y2 are not aligned to display page boundaries. > E.g. when used as a text console, only the first line of text is shown > on the display. > > 1. The buffer passed by ssd130x_fb_blit_rect() points to the first > byte of monochrome bitmap data, and thus has its origin at (x1, > y1), while ssd130x_update_rect() assumes it is at (0, 0). > Fix ssd130x_update_rect() by changing the vertical and horizontal > loop ranges, and adding the offsets only when needed. > > 2. In ssd130x_fb_blit_rect(), align y1 and y2 to the display page > boundaries before doing the color conversion, so the full page > is converted and updated. > Remove the correction for an unaligned y1 from > ssd130x_update_rect(), and add a check to make sure y1 is aligned. > > Fixes: a61732e808672cfa ("drm: Add driver for Solomon SSD130x OLED displays") > Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> > --- Thanks for fixing this too. Acked-by: Javier Martinez Canillas <javierm@xxxxxxxxxx> -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat