Module Name:    src
Committed By:   macallan
Date:           Wed Jan 11 16:18:30 UTC 2012

Modified Files:
        src/sys/arch/sgimips/dev: crmfb.c
        src/sys/arch/sgimips/gio: newport.c

Log Message:
use rasops_init(0,0)


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sgimips/dev/crmfb.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/gio/newport.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sgimips/dev/crmfb.c
diff -u src/sys/arch/sgimips/dev/crmfb.c:1.35 src/sys/arch/sgimips/dev/crmfb.c:1.36
--- src/sys/arch/sgimips/dev/crmfb.c:1.35	Fri Jul  1 18:53:46 2011
+++ src/sys/arch/sgimips/dev/crmfb.c	Wed Jan 11 16:18:30 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: crmfb.c,v 1.35 2011/07/01 18:53:46 dyoung Exp $ */
+/* $NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <[email protected]>
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.35 2011/07/01 18:53:46 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -590,7 +590,7 @@ crmfb_init_screen(void *c, struct vcons_
 	if (existing)
 		ri->ri_flg |= RI_CLEAR;
 
-	rasops_init(ri, ri->ri_height / 16, ri->ri_width / 8);
+	rasops_init(ri, 0, 0);
 	ri->ri_caps = WSSCREEN_WSCOLORS;
 	rasops_reconfig(ri, ri->ri_height / ri->ri_font->fontheight,
 	    ri->ri_width / ri->ri_font->fontwidth);

Index: src/sys/arch/sgimips/gio/newport.c
diff -u src/sys/arch/sgimips/gio/newport.c:1.15 src/sys/arch/sgimips/gio/newport.c:1.16
--- src/sys/arch/sgimips/gio/newport.c:1.15	Tue May 12 23:51:25 2009
+++ src/sys/arch/sgimips/gio/newport.c	Wed Jan 11 16:18:30 2012
@@ -1,7 +1,8 @@
-/*	$NetBSD: newport.c,v 1.15 2009/05/12 23:51:25 macallan Exp $	*/
+/*	$NetBSD: newport.c,v 1.16 2012/01/11 16:18:30 macallan Exp $	*/
 
 /*
  * Copyright (c) 2003 Ilpo Ruotsalainen
+ *               2009 Michael Lorenz
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -30,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.15 2009/05/12 23:51:25 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.16 2012/01/11 16:18:30 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,7 +172,8 @@ rex3_read(struct newport_devconfig *dc, 
 static void
 rex3_wait_gfifo(struct newport_devconfig *dc)
 {
-	while (rex3_read(dc, REX3_REG_STATUS) & REX3_STATUS_GFXBUSY)
+	while (rex3_read(dc, REX3_REG_STATUS) &
+	    (REX3_STATUS_GFXBUSY | REX3_STATUS_PIPELEVEL_MASK))
 		;
 }
 
@@ -589,6 +591,7 @@ newport_attach(device_t parent, device_t
 		    &newport_console_screen.scr_ri.ri_ops;
 		memcpy(&newport_textops, &newport_console_screen.scr_ri.ri_ops,
 		    sizeof(struct wsdisplay_emulops));
+		vcons_replay_msgbuf(&newport_console_screen);
 	}
 	wa.scrdata = &newport_screenlist;
 	wa.accessops = &newport_accessops;
@@ -651,7 +654,7 @@ newport_init_screen(void *cookie, struct
 
 	/*&ri->ri_bits = (char *)sc->sc_fb.fb_pixels;*/
 
-	rasops_init(ri, dc->dc_yres / 8, dc->dc_xres / 8);
+	rasops_init(ri, 0, 0);
 	ri->ri_caps = WSSCREEN_WSCOLORS;
 
 	rasops_reconfig(ri, dc->dc_yres / ri->ri_font->fontheight,
@@ -777,6 +780,7 @@ newport_putchar(void *c, int row, int co
 
 		bitmap += font->stride;
 	}
+	rex3_wait_gfifo(dc);
 }
 
 static void
@@ -905,6 +909,12 @@ newport_ioctl(void *v, void *vs, u_long 
 				rex3_wait_gfifo(dc);
 				newport_setup_hw(dc);
 				vcons_redraw_screen(vd->active);
+			} else {
+				xmap9_write_mode(dc, 0,
+	    			    XMAP9_MODE_GAMMA_BYPASS |
+				    XMAP9_CONFIG_RGBMAP_2 |
+	    			    XMAP9_MODE_PIXSIZE_24BPP);
+				xmap9_write(dc, XMAP9_DCBCRS_MODE_SELECT, 0);
 			}
 		}
 		return 0;
@@ -924,5 +934,5 @@ newport_mmap(void *v, void *vs, off_t of
 	if ( offset >= 0xfffff)
 		return -1;
 
-	return mips_btop(dc->dc_addr + offset);
+	return bus_space_mmap(dc->dc_st, dc->dc_sh, offset, prot, 0);
 }

Reply via email to