Skip to contentSkip to conversation

Disable ywrap if not supported by fbcon scrolling code

PATCH In review Knut Petersen 2 participants 2 messages Dec 13, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/video/console/fbcon.c +0 -0
diff -uprN -X linux/Documentation/dontdiff -x '*.bak' -x '*.ctx' linuxorig/drivers/video/console/fbcon.c linux/drivers/video/console/fbcon.c
@@ -1968,7 +1968,8 @@ static __inline__ void updatescrollmode(
		divides(ypan, vc->vc_font.height) && vyres > yres;
	int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
		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 fast_copyarea = (cap & FBINFO_HWACCEL_COPYAREA) &&
		!(cap & FBINFO_HWACCEL_DISABLED);

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Acked-by Antonino Daplas on v1 1/1
#1 lore raw
Quoted 10 lines · Knut Petersen

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.

Quoted 5 lines

No regression, no possible side effects.

Definitely needed by cyblafb and probably needed by amifb.

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click