Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jan 2010 17:03:16 -0500
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Alexey Dokuchaev <danfe@FreeBSD.ORG>
Cc:        svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG
Subject:   Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
Message-ID:  <201001251703.18130.jkim@FreeBSD.org>
In-Reply-To: <20100125192941.GA9196@FreeBSD.org>
References:  <200911032022.nA3KM96H003434@svn.freebsd.org> <20100125192941.GA9196@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Boundary-00=_mUhXLYAFO8xpZ8W
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Monday 25 January 2010 02:29 pm, Alexey Dokuchaev wrote:
> On Tue, Nov 03, 2009 at 08:22:09PM +0000, Jung-uk Kim wrote:
> > Author: jkim
> > Date: Tue Nov  3 20:22:09 2009
> > New Revision: 198858
> > URL: http://svn.freebsd.org/changeset/base/198858
> >
> > Log:
> >   Fix VESA color palette corruption:
> >
> >   - VBE 3.0 says palette format resets to 6-bit mode when video
> > mode changes. We simply set 8-bit mode when we switch modes if
> > the adapter supports it. - VBE 3.0 also says if the mode is not
> > VGA compatible, we must use VBE function to save/restore palette.
> >  Otherwise, VGA function may be used. Thus, reinstate the
> > save/load palette functions only for non-VGA compatible modes
> > regardless of its palette format.
> >   - Let vesa(4) set VESA modes even if vga(4) claims to support
> > it. - Reset default palette if VESA pixel mode is set initially.
> > - Fix more style nits.
> >
> > Modified:
> >   head/sys/dev/fb/vesa.c
> >   head/sys/dev/syscons/syscons.c
> >   head/sys/sys/fbio.h
>
> Apparently this revision broke logo screen saver w/ vesa.ko on i386
> (it works, but image is significantly darker).  Building vesa from
> earlier sources gives previously seen (i.e. correct) result.  Could
> you take a look please?  My gfx card is GF6600.  Thanks.

If your VESA BIOS is lying or ignorant about compatibility with VGA 
mode, you may see some images like that.  Please try to avoid the 
mode, e.g., see the attached patch.

Jung-uk Kim

--Boundary-00=_mUhXLYAFO8xpZ8W
Content-Type: text/plain;
  charset="iso-8859-1";
  name="logo.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="logo.diff"

--- sys/dev/syscons/logo/logo_saver.c	2009-11-03 19:27:43.000000000 -0500
+++ sys/dev/syscons/logo/logo_saver.c	2010-01-25 16:44:24.000000000 -0500
@@ -135,9 +135,11 @@ static int
 logo_init(video_adapter_t *adp)
 {
 	video_info_t info;
-	
-	if (!vidd_get_info(adp, M_VESA_CG800x600, &info)) {
-		scrmode = M_VESA_CG800x600;
+
+	if (!vidd_get_info(adp, M_VESA_CG640x480, &info)) {
+		scrmode = M_VESA_CG640x480;
+	} else if (!vidd_get_info(adp, M_VESA_CG640x400, &info)) {
+		scrmode = M_VESA_CG640x400;
 	} else if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
 		scrmode = M_VGA_CG320;
 	} else if (!vidd_get_info(adp, M_PC98_PEGC640x480, &info)) {

--Boundary-00=_mUhXLYAFO8xpZ8W--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001251703.18130.jkim>