Thread (4 messages) 4 messages, 3 authors, 2005-10-17

Re: Fw: [Bugme-new] [Bug 5441] New: SVGATextMode problem on 2.6.14-rc4

From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: 2005-10-14 23:14:33

Hum, I didn't know about messy programs like svgatextmode... Couldn't
this be integrated in some linux/drivers/video/console/svgacon.c ?... So
because of the existence of the svgatextmode program, the kernel is not
supposed to touch to CRT_OVERFLOW/SYNC_END/DISP/DISP_END/OFFSET ?

Disabling the check in vgacon_resize() might help indeed, but I'm really
not sure whether it will work for any chipset: in my patch, CRT
registers are set at each console switch, since stty rows/cols apply to
consoles separately...

The attached solution is to keep the test, but if it fails, we assume
that the caller knows what it does (i.e. it is svgatextmode) and then
disable any further call to vgacon_doresize. Svgatextmode is usually
used to _expand_ the display, not to shrink it. And it is harmless in
the case of a too big stty rows/cols: the display will just be cropped.
I tested it on my laptop, and it works fine with svgatextmode.

A better solution would be that svgatextmode explicitely tells the
kernel not to care about video timing, but for this an interface needs
be defined and svgatextmode be patched.

Signed-off-by: samuel.thibault@ens-lyon.org
--- drivers/video/console/vgacon-2.4.14-pre.c	2005-10-14 22:35:14.000000000 +0200
+++ drivers/video/console/vgacon.c	2005-10-14 22:58:06.000000000 +0200
@@ -563,7 +563,11 @@
 	if (!vga_is_gfx) {
 		scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf,
 			    c->vc_screenbuf_size > vga_vram_size ? vga_vram_size : c->vc_screenbuf_size);
-		vgacon_doresize(c, c->vc_cols, c->vc_rows);
+		if (!(vga_video_num_columns % 2) &&
+		    vga_video_num_columns <= ORIG_VIDEO_COLS &&
+		    vga_video_num_lines <= (ORIG_VIDEO_LINES *
+			vga_default_font_height) / c->vc_font.height)
+			vgacon_doresize(c, c->vc_cols, c->vc_rows);
 	}
 
 	return 0;		/* Redrawing not needed */
@@ -1019,7 +1023,8 @@
 	if (width % 2 || width > ORIG_VIDEO_COLS ||
 	    height > (ORIG_VIDEO_LINES * vga_default_font_height)/
 	    c->vc_font.height)
-		return -EINVAL;
+		/* let svgatextmode tinker with video timings */
+		return 0;
 
 	if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */
 		vgacon_doresize(c, width, height);


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help