Home Home > GIT Browse > SLE11-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-01-08 13:04:44 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2019-01-08 15:00:51 +0100
commit0daf39105b11e7da4ebde2649eb58f5580468e1e (patch)
treea04b1530d37850fd00490b16a24274ab8cd1f624
parent1ff345db7f5e8e893562343c79bd971606c00f67 (diff)
fbdev: fbmem: behave better with small rotated displays and many CPUs (bsc#1106886)
-rw-r--r--patches.fixes/0001-fbdev-fbmem-behave-better-with-small-rotated-display.patch58
-rw-r--r--series.conf1
2 files changed, 59 insertions, 0 deletions
diff --git a/patches.fixes/0001-fbdev-fbmem-behave-better-with-small-rotated-display.patch b/patches.fixes/0001-fbdev-fbmem-behave-better-with-small-rotated-display.patch
new file mode 100644
index 0000000000..ae55c61656
--- /dev/null
+++ b/patches.fixes/0001-fbdev-fbmem-behave-better-with-small-rotated-display.patch
@@ -0,0 +1,58 @@
+From f75df8d4b4fabfad7e3cba2debfad12741c6fde7 Mon Sep 17 00:00:00 2001
+From: Peter Rosin <peda@axentia.se>
+Date: Thu, 20 Dec 2018 19:13:07 +0100
+Subject: fbdev: fbmem: behave better with small rotated displays and many CPUs
+Git-commit: f75df8d4b4fabfad7e3cba2debfad12741c6fde7
+Patch-mainline: v5.0-rc1
+References: bsc#1106886
+
+Blitting an image with "negative" offsets is not working since there
+is no clipping. It hopefully just crashes. For the bootup logo, there
+is protection so that blitting does not happen as the image is drawn
+further and further to the right (ROTATE_UR) or further and further
+down (ROTATE_CW). There is however no protection when drawing in the
+opposite directions (ROTATE_UD and ROTATE_CCW).
+
+Add back this protection.
+
+The regression is 20-odd years old but the mindless warning-killing
+mentality displayed in commit 34bdb666f4b2 ("fbdev: fbmem: remove
+positive test on unsigned values") is also to blame, methinks.
+
+Fixes: 448d479747b8 ("fbdev: fb_do_show_logo() updates")
+Signed-off-by: Peter Rosin <peda@axentia.se>
+Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Cc: Fabian Frederick <ffrederick@users.sourceforge.net>
+Cc: Geert Uytterhoeven <geert+renesas@glider.be>
+cc: Geoff Levand <geoff@infradead.org>
+Cc: James Simmons <jsimmons@users.sf.net>
+Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ drivers/video/fbmem.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/video/fbmem.c
++++ b/drivers/video/fbmem.c
+@@ -428,7 +428,9 @@ static void fb_do_show_logo(struct fb_in
+ image->dx += image->width + 8;
+ }
+ } else if (rotate == FB_ROTATE_UD) {
+- for (x = 0; x < num && image->dx >= 0; x++) {
++ u32 dx = image->dx;
++
++ for (x = 0; x < num && image->dx <= dx; x++) {
+ info->fbops->fb_imageblit(info, image);
+ image->dx -= image->width + 8;
+ }
+@@ -440,7 +442,9 @@ static void fb_do_show_logo(struct fb_in
+ image->dy += image->height + 8;
+ }
+ } else if (rotate == FB_ROTATE_CCW) {
+- for (x = 0; x < num && image->dy >= 0; x++) {
++ u32 dy = image->dy;
++
++ for (x = 0; x < num && image->dy <= dy; x++) {
+ info->fbops->fb_imageblit(info, image);
+ image->dy -= image->height + 8;
+ }
diff --git a/series.conf b/series.conf
index 5f25b35fbd..3ed674ec04 100644
--- a/series.conf
+++ b/series.conf
@@ -12614,6 +12614,7 @@
# bsc1106886
patches.fixes/0001-fbdev-omapfb-off-by-one-in-omapfb_register_client.patch
+ patches.fixes/0001-fbdev-fbmem-behave-better-with-small-rotated-display.patch
# boo1112963
patches.drm/0001-drm-ast-Remove-existing-framebuffers-before-loading-.patch