Subject: port-alpha/12104: TGA char resolution ignores hardware resolution
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/01/2001 14:51:16
>Number:         12104
>Category:       port-alpha
>Synopsis:       TGA display ignores hardware resolution
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 01 14:54:00 PST 2001
>Originator:     Christian Groessler
>Release:        -current as of 01-Feb-2001
Architecture: alpha
Machine: alpha
	The TGA console is always initialized to 80x34
chars. Depending on font and resolution, different (bigger) x to y
layouts are possible. Currently only a centered window of 80x34 chars
is used, even if there is much more space.
	Set TGA to bigger resolution than 640x480 and see that only
part of the screen is used.
	The 80x34 is simply hardcoded in the source. My patch provides
a way to use the whole screen. Ideally the dimensions (or video mode)
should be selectable with wsconsctl etc..

	Here's a patch:
Index: tga.c
RCS file: /net/swamp/zeug/netbsd-rsync/main/syssrc/sys/dev/pci/tga.c,v
retrieving revision 1.30
diff -p -u -r1.30 tga.c
--- tga.c	2000/12/28 22:59:15	1.30
+++ tga.c	2001/02/01 22:41:43
@@ -331,7 +331,9 @@ tga_getdevconfig(memt, pc, tag, dc)
 	dc->dc_rinfo.ri_wsfcookie = cookie;
-	rasops_init(rip, 34, 80);
+	rasops_init(rip, dc->dc_ht / rip->ri_font->fontheight,
+		    dc->dc_wid / rip->ri_font->fontwidth);
 	/* add our accelerated functions */
 	/* XXX shouldn't have to do this; rasops should leave non-NULL