From owner-freebsd-multimedia@FreeBSD.ORG Sat Nov 27 06:44:08 2004 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C29A016A4CE; Sat, 27 Nov 2004 06:44:08 +0000 (GMT) Received: from grosbein.pp.ru (grgw.svzserv.kemerovo.su [213.184.64.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AE7143D31; Sat, 27 Nov 2004 06:44:07 +0000 (GMT) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (eugen@localhost [127.0.0.1]) by grosbein.pp.ru (8.13.1/8.13.1) with ESMTP id iAR6i420001132; Sat, 27 Nov 2004 13:44:04 +0700 (KRAT) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.13.1/8.13.1/Submit) id iAR6i3OT001131; Sat, 27 Nov 2004 13:44:03 +0700 (KRAT) (envelope-from eugen) Date: Sat, 27 Nov 2004 13:44:03 +0700 From: Eugene Grosbein To: bug-followup@freebsd.org Message-ID: <20041127064403.GA1116@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: multimedia@freebsd.org Subject: Re: kern/64114: [PATCH] bad vertical refresh for console using Radeon 9200 VIVO X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 06:44:09 -0000 Michael Joyner wrote: > eh? > > plain text please! Here it comes: --- sys/conf/options.i386.orig Sat Mar 6 14:33:55 2004 +++ sys/conf/options.i386 Fri Mar 12 00:48:44 2004 @@ -101,6 +101,7 @@ VGA_NO_MODE_CHANGE opt_vga.h VGA_SLOW_IOACCESS opt_vga.h VGA_WIDTH90 opt_vga.h +VGA_PREFER_BIOSMODE opt_vga.h VESA opt_vesa.h VESA_DEBUG opt_vesa.h --- sys/i386/conf/LINT.orig Sat Mar 6 14:34:13 2004 +++ sys/i386/conf/LINT Fri Mar 12 00:54:21 2004 @@ -1141,6 +1141,11 @@ # The following option probably won't work with the LCD displays. options VGA_WIDTH90 # support 90 column modes +# Try the following option if an initial video mode does not satisfy you. +# The vga(4) driver will prefer BIOS mode settings that are better for some +# cards provided with video-out (f.e. ATI Radeon) +options VGA_PREFER_BIOSMODE + # To include support for VESA video modes options VESA --- sys/dev/fb/vga.c.orig Sat Aug 11 10:58:44 2001 +++ sys/dev/fb/vga.c Thu Oct 7 02:20:39 2004 @@ -1105,6 +1105,13 @@ rows_offset = adpstate.regs[1] + 1 - mp[1]; break; +#ifdef VGA_PREFER_BIOSMODE + case COMP_DIFFERENT: /* one may prefer BIOS register values */ + default: + bcopy(adpstate2.regs, adpstate.regs, sizeof(adpstate.regs)); + /* FALL THROUGH */ +#endif + case COMP_SIMILAR: /* * Not exactly the same, but similar enough to be @@ -1117,6 +1124,7 @@ adpstate.regs[1] -= rows_offset - 1; break; +#ifndef VGA_PREFER_BIOSMODE case COMP_DIFFERENT: default: /* @@ -1130,6 +1138,7 @@ mode_map[adp->va_initial_mode] = adpstate.regs; rows_offset = 1; break; +#endif } } #endif /* VGA_NO_BIOS || VGA_NO_MODE_CHANGE */ @@ -1379,6 +1388,16 @@ return ENXIO; adp->va_flags |= V_ADP_REGISTERED; } + +#ifdef VGA_PREFER_BIOSMODE + /* + reset parameter values immediately if initial mode + was not changed by splash(4) or by other means + */ + if (adp->va_mode == adp->va_initial_mode) + vga_set_mode(adp, adp->va_initial_mode); +#endif + if (vga_sub_configure != NULL) (*vga_sub_configure)(0); --- share/man/man4/vga.4.orig Fri Mar 12 01:37:08 2004 +++ share/man/man4/vga.4 Fri Mar 12 01:48:52 2004 @@ -38,6 +38,7 @@ .Cd "options VGA_ALT_SEQACCESS" .Cd "options VGA_NO_FONT_LOADING" .Cd "options VGA_NO_MODE_CHANGE" +.Cd "options VGA_PREFER_BIOSMODE" .Cd "options VGA_SLOW_IOACCESS" .Cd "options VGA_WIDTH90" .Cd "device vga0 at isa? port ? @@ -82,6 +83,13 @@ You may want to try this option if the mouse pointer is not drawn correctly or the font does not seem to be loaded properly on the VGA card. However, it may cause flicker on some systems. +.It Dv VGA_PREFER_BIOSMODE +This option changes default behaviour of the driver when the settings +of the initial video mode differ from BIOS setting for that mode greatly. +By default the driver will ignore BIOS settings. The option forces +it to ignore initial settings and use ones supplied by BIOS. +Try this option if you experience very low refresh rate using +standard video console. .It Dv VGA_SLOW_IOACCESS Older VGA cards may require this option for proper operation. It makes the driver perform byte-wide I/O to VGA registers and