Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sun fixed a typo in cg6_ras_do_cursor and made using...



details:   https://anonhg.NetBSD.org/src/rev/adb377b3c7a4
branches:  trunk
changeset: 581043:adb377b3c7a4
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sun May 22 03:45:08 2005 +0000

description:
fixed a typo in cg6_ras_do_cursor and made using the blitter to draw the
cursor optional when using RASTERCONSOLE

diffstat:

 sys/dev/sun/cgsix.c |  31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diffs (105 lines):

diff -r 38a3991c1b9d -r adb377b3c7a4 sys/dev/sun/cgsix.c
--- a/sys/dev/sun/cgsix.c       Sun May 22 03:05:15 2005 +0000
+++ b/sys/dev/sun/cgsix.c       Sun May 22 03:45:08 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgsix.c,v 1.23 2005/05/16 14:29:11 macallan Exp $ */
+/*     $NetBSD: cgsix.c,v 1.24 2005/05/22 03:45:08 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.23 2005/05/16 14:29:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.24 2005/05/22 03:45:08 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -328,7 +328,7 @@
 static void cg6_ras_copycols(void *, int, int, int, int);
 static void cg6_ras_erasecols(void *, int, int, int, long int);
 static void cg6_ras_eraserows(void *, int, int, long int);
-#ifdef RASTERCONSOLE
+#if defined(RASTERCONSOLE) && defined(CG6_BLIT_CURSOR)
 static void cg6_ras_do_cursor(struct rasops_info *);
 #endif
 static void
@@ -589,7 +589,7 @@
 #endif
 }
 
-#ifdef RASTERCONSOLE
+#if defined(RASTERCONSOLE) && defined(CG6_BLIT_CURSOR)
 /*
  * Really want something more like fg^bg here, but that would be more
  * or less impossible to migrate to colors.  So we hope there's
@@ -599,14 +599,14 @@
 static void
 cg6_ras_do_cursor(struct rasops_info *ri)
 {
-       struct cg6_screen *scr=ri->ri_hw;
-       struct cgsix_softc *sc=scr->sc;
+       struct cg6_screen *scr = ri->ri_hw;
+       struct cgsix_softc *sc = scr->sc;
        int row, col;
        
        row = ri->ri_crow * ri->ri_font->fontheight;
        col = ri->ri_ccol * ri->ri_font->fontwidth;
-       cg6_invert(sc, ri->ri_yorigin + row,ri->ri_xorigin + 
-           col, ri->ri_font->fontwidth, ri->ri_font->fontheight);
+       cg6_invert(sc, ri->ri_xorigin + col,ri->ri_yorigin + 
+           row, ri->ri_font->fontwidth, ri->ri_font->fontheight);
 }
 #endif /* RASTERCONSOLE */
 
@@ -662,7 +662,9 @@
                        sc->sc_fb.fb_rinfo.ri_ops.copycols = cg6_ras_copycols;
                        sc->sc_fb.fb_rinfo.ri_ops.erasecols = cg6_ras_erasecols;
                        sc->sc_fb.fb_rinfo.ri_ops.eraserows = cg6_ras_eraserows;
+#ifdef CG6_BLIT_CURSOR
                        sc->sc_fb.fb_rinfo.ri_do_cursor = cg6_ras_do_cursor;
+#endif
                        cg6_ras_init(sc);
                }
 #endif
@@ -673,6 +675,10 @@
        sc->sc_stride = fb->fb_type.fb_width;
        sc->sc_height = fb->fb_type.fb_height;
 
+       printf("\n");
+       printf("%s: framebuffer size: %d MB\n", sc->sc_dev.dv_xname, 
+           sc->sc_ramsize >> 20);
+
 #if NWSDISPLAY
        /* setup rasops and so on for wsdisplay */
        wsfont_init();
@@ -700,16 +706,13 @@
                wsdisplay_cnattach(&cgsix_defaultscreen, ri, 0, 0, defattr);
        }
 
+
        aa.console = isconsole;
        aa.scrdata = &cgsix_screenlist;
        aa.accessops = &cgsix_accessops;
        aa.accesscookie = sc;
-       printf("\n");
-       printf("%s: framebuffer size: %d MB\n", sc->sc_dev.dv_xname, 
-           sc->sc_ramsize >> 20);
        config_found(&sc->sc_dev, &aa, wsemuldisplaydevprint);
 #else
-       printf("\n");
        bt_initcmap(&sc->sc_cmap, 256); 
        cg6_loadcmap(sc, 0, 256);
        
@@ -1676,8 +1679,8 @@
        fbc->fbc_alu = CG6_ALU_FLIP;
        fbc->fbc_arecty = y;
        fbc->fbc_arectx = x;
-       fbc->fbc_arecty = y+he - 1;
-       fbc->fbc_arectx = x+wi - 1;
+       fbc->fbc_arecty = y + he - 1;
+       fbc->fbc_arectx = x + wi - 1;
        CG6_DRAW_WAIT(fbc);
 }
 



Home | Main Index | Thread Index | Old Index