Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/dev get rid of the cg3/cg8 'emulation' kludge...
details: https://anonhg.NetBSD.org/src/rev/52bedd11d591
branches: trunk
changeset: 755514:52bedd11d591
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Jun 08 06:30:41 2010 +0000
description:
get rid of the cg3/cg8 'emulation' kludge since we have the xf86-video-suncg14
driver now
this will probably need some work in cgfourteenmmap() to match what the
driver expects from a cg14
diffstat:
sys/arch/sparc/dev/cgfourteen.c | 46 +++++-----------------------------------
1 files changed, 6 insertions(+), 40 deletions(-)
diffs (102 lines):
diff -r 9be07aec1bf3 -r 52bedd11d591 sys/arch/sparc/dev/cgfourteen.c
--- a/sys/arch/sparc/dev/cgfourteen.c Tue Jun 08 06:14:57 2010 +0000
+++ b/sys/arch/sparc/dev/cgfourteen.c Tue Jun 08 06:30:41 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgfourteen.c,v 1.62 2009/08/27 20:52:18 macallan Exp $ */
+/* $NetBSD: cgfourteen.c,v 1.63 2010/06/08 06:30:41 macallan Exp $ */
/*
* Copyright (c) 1996
@@ -68,13 +68,6 @@
*/
#undef CG14_MAP_REGS
-/*
- * The following enables 24-bit operation: when opened, the framebuffer
- * will switch to 24-bit mode (actually 32-bit mode), and provide a
- * simple cg8 emulation.
- */
-#define CG14_CG8
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
@@ -250,16 +243,9 @@
/* Mask out invalid flags from the user. */
fb->fb_flags = device_cfdata(sc->sc_dev)->cf_flags & FB_USERMASK;
- /*
- * We're emulating a cg3/8, so represent ourselves as one
- */
-#ifdef CG14_CG8
- fb->fb_type.fb_type = FBTYPE_MEMCOLOR;
+ fb->fb_type.fb_type = FBTYPE_MDICOLOR;
fb->fb_type.fb_depth = 32;
-#else
- fb->fb_type.fb_type = FBTYPE_SUN3COLOR;
- fb->fb_type.fb_depth = 8;
-#endif
+
fb_setsize_obp(fb, sc->sc_fb.fb_type.fb_depth, 1152, 900, node);
ramsize = roundup(fb->fb_type.fb_height * fb->fb_linebytes, NBPG);
@@ -308,13 +294,9 @@
/*
* Let the user know that we're here
*/
-#ifdef CG14_CG8
- printf(": cgeight emulated at %dx%dx24bpp",
+ printf(": %dx%d",
fb->fb_type.fb_width, fb->fb_type.fb_height);
-#else
- printf(": cgthree emulated at %dx%dx8bpp",
- fb->fb_type.fb_width, fb->fb_type.fb_height);
-#endif
+
/*
* Enable the video.
*/
@@ -474,9 +456,6 @@
case FBIOPUTCMAP:
/* copy to software map */
#define p ((struct fbcmap *)data)
-#ifdef CG14_CG8
- p->index &= 0xffffff;
-#endif
error = cg14_put_cmap(p, &sc->sc_cmap, CG14_CLUT_SIZE);
if (error)
return (error);
@@ -633,25 +612,11 @@
sc->sc_savexlut[i] = xlut[i];
}
-#ifdef CG14_CG8
- /*
- * Enable the video, and put in 24 bit mode.
- */
- sc->sc_ctl->ctl_mctl = CG14_MCTL_ENABLEVID | CG14_MCTL_PIXMODE_32 |
- CG14_MCTL_POWERCTL;
-
- /*
- * Zero the xlut to enable direct-color mode
- */
- for (i = 0; i < CG14_CLUT_SIZE; i++)
- sc->sc_xlut->xlut_lut[i] = 0;
-#else
/*
* Enable the video and put it in 8 bit mode
*/
sc->sc_ctl->ctl_mctl = CG14_MCTL_ENABLEVID | CG14_MCTL_PIXMODE_8 |
CG14_MCTL_POWERCTL;
-#endif
}
static void
@@ -930,6 +895,7 @@
return 0;
}
+
static int
cg14_ioctl(void *v, void *vs, u_long cmd, void *data, int flag,
struct lwp *l)
Home |
Main Index |
Thread Index |
Old Index