Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips use rasops_init(0,0)



details:   https://anonhg.NetBSD.org/src/rev/413eab2f2cd7
branches:  trunk
changeset: 772675:413eab2f2cd7
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Jan 11 16:18:30 2012 +0000

description:
use rasops_init(0,0)

diffstat:

 sys/arch/sgimips/dev/crmfb.c   |   6 +++---
 sys/arch/sgimips/gio/newport.c |  20 +++++++++++++++-----
 2 files changed, 18 insertions(+), 8 deletions(-)

diffs (104 lines):

diff -r aac0a283edff -r 413eab2f2cd7 sys/arch/sgimips/dev/crmfb.c
--- a/sys/arch/sgimips/dev/crmfb.c      Wed Jan 11 16:12:38 2012 +0000
+++ b/sys/arch/sgimips/dev/crmfb.c      Wed Jan 11 16:18:30 2012 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
        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);
diff -r aac0a283edff -r 413eab2f2cd7 sys/arch/sgimips/gio/newport.c
--- a/sys/arch/sgimips/gio/newport.c    Wed Jan 11 16:12:38 2012 +0000
+++ b/sys/arch/sgimips/gio/newport.c    Wed Jan 11 16:18:30 2012 +0000
@@ -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 @@
 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_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 @@
 
        /*&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 @@
 
                bitmap += font->stride;
        }
+       rex3_wait_gfifo(dc);
 }
 
 static void
@@ -905,6 +909,12 @@
                                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 @@
        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);
 }



Home | Main Index | Thread Index | Old Index