浏览代码

[PATCH] fbcon: disable ywrap if not supported by fbcon scrolling code

updatescrollmode() must not select ywrap scrolling if
divides(vc->vc_font.height, yres) is not true as this is not supported by
the actual ywrap scrolling code.

The bug is triggered with e.g.  mode 800x600, vxres 1024, vyres 8192, bpp
8, font dimensions 8x16, 8Mb video ram and FBINFO_HWACCEL_YWRAP set.  If
those conditions are met, scrolling is broken and garbage is permanently
displayed at the bottom of the screen.

No regression, no possible side effects.

Definitely needed by cyblafb and probably needed by amifb.

Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Knut Petersen 19 年之前
父节点
当前提交
244ab72d84
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/video/console/fbcon.c

+ 2 - 1
drivers/video/console/fbcon.c

@@ -1965,7 +1965,8 @@ static __inline__ void updatescrollmode(struct display *p,
 		divides(ypan, vc->vc_font.height) && vyres > yres;
 		divides(ypan, vc->vc_font.height) && vyres > yres;
 	int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
 	int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
 		divides(ywrap, vc->vc_font.height) &&
 		divides(ywrap, vc->vc_font.height) &&
-		divides(vc->vc_font.height, vyres);
+		divides(vc->vc_font.height, vyres) &&
+		divides(vc->vc_font.height, yres);
 	int reading_fast = cap & FBINFO_READS_FAST;
 	int reading_fast = cap & FBINFO_READS_FAST;
 	int fast_copyarea = (cap & FBINFO_HWACCEL_COPYAREA) &&
 	int fast_copyarea = (cap & FBINFO_HWACCEL_COPYAREA) &&
 		!(cap & FBINFO_HWACCEL_DISABLED);
 		!(cap & FBINFO_HWACCEL_DISABLED);