Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/playstation2/ee PR/32730: Ed Shouten: setting WS_DE...



details:   https://anonhg.NetBSD.org/src/rev/51c5a787ffeb
branches:  trunk
changeset: 587967:51c5a787ffeb
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 04 14:54:56 2006 +0000

description:
PR/32730: Ed Shouten: setting WS_DEFAULT_[FB]G does not change colors entirely

diffstat:

 sys/arch/playstation2/ee/gsfb.c |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 523958b977ca -r 51c5a787ffeb sys/arch/playstation2/ee/gsfb.c
--- a/sys/arch/playstation2/ee/gsfb.c   Sat Feb 04 14:11:34 2006 +0000
+++ b/sys/arch/playstation2/ee/gsfb.c   Sat Feb 04 14:54:56 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gsfb.c,v 1.14 2006/02/04 12:13:05 martin Exp $ */
+/*     $NetBSD: gsfb.c,v 1.15 2006/02/04 14:54:56 christos Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gsfb.c,v 1.14 2006/02/04 12:13:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gsfb.c,v 1.15 2006/02/04 14:54:56 christos Exp $");
 
 #include "debug_playstation2.h"
 
@@ -316,13 +316,16 @@
 gsfbcninit(struct consdev *cndev)
 {
        paddr_t paddr = MIPS_KSEG0_TO_PHYS(gsfb_init_cmd_640x480);
-       long defattr =  ATTR_BG_SET(WSCOL_BLACK) | ATTR_FG_SET(WSCOL_WHITE);
+       u_int32_t *buf = (void *)MIPS_PHYS_TO_KSEG1(paddr);
+       long defattr =  ATTR_BG_SET(WS_DEFAULT_BG) | ATTR_FG_SET(WS_DEFAULT_FG);
 
        gsfb.is_console = 1;
 
        gsfb_hwinit();
        gsfb_swinit();
 
+       /* Set the screen to the default background color at boot */
+       buf[28] = gsfb_ansi_psmct32[ATTR_BG_GET(defattr)];
        gsfb_dma_kick(paddr, sizeof gsfb_init_cmd_640x480);
 #ifdef GSFB_DEBUG_MONITOR
        {
@@ -510,8 +513,8 @@
                return (EINVAL);
 
        if ((flags & WSATTR_WSCOLORS) == 0) {
-               fg = WSCOL_WHITE;
-               bg = WSCOL_BLACK;
+               fg = WS_DEFAULT_FG;
+               bg = WS_DEFAULT_BG;
        }
 
        if ((flags & WSATTR_HILIT) != 0)
@@ -544,7 +547,7 @@
     int *curxp, int *curyp, long *attrp)
 {
 
-       *attrp = ATTR_BG_SET(WSCOL_BLACK) | ATTR_FG_SET(WSCOL_WHITE);
+       *attrp = ATTR_BG_SET(WS_DEFAULT_BG) | ATTR_FG_SET(WS_DEFAULT_FG);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index