]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
video: ssd1307fb: Start page range at page_offset
authorMarko Kohtala <marko.kohtala@okoko.fi>
Tue, 18 Jun 2019 07:41:08 +0000 (10:41 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Dec 2019 18:01:09 +0000 (18:01 +0000)
commit dd9782834dd9dde3624ff1acea8859f3d3e792d4 upstream.

The page_offset was only applied to the end of the page range. This caused
the display updates to cause a scrolling effect on the display because the
amount of data written to the display did not match the range display
expected.

Fixes: 301bc0675b67 ("video: ssd1307fb: Make use of horizontal addressing mode")
Signed-off-by: Marko Kohtala <marko.kohtala@okoko.fi>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: Michal Vokáč <michal.vokac@ysoft.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190618074111.9309-4-marko.kohtala@okoko.fi
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/video/fbdev/ssd1307fb.c

index 0ea6345cabcac3c69e520f1f032d163c35338b70..729dd7cc92756a75fe9f002c522cf4c58ab46ead 100644 (file)
@@ -426,7 +426,7 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
        if (ret < 0)
                return ret;
 
-       ret = ssd1307fb_write_cmd(par->client, 0x0);
+       ret = ssd1307fb_write_cmd(par->client, par->page_offset);
        if (ret < 0)
                return ret;