Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/dev add struct hpcfb_accessops to setclut m...



details:   https://anonhg.NetBSD.org/src/rev/de97af02a4aa
branches:  trunk
changeset: 485924:de97af02a4aa
user:      uch <uch%NetBSD.org@localhost>
date:      Mon May 08 21:56:32 2000 +0000

description:
add struct hpcfb_accessops to setclut method. TX3912 can't change
        color map index (R:G:B = 3:3:2), so use this.

diffstat:

 sys/arch/hpcmips/dev/hpcfb.c    |  25 ++++++++++---------------
 sys/arch/hpcmips/dev/hpcfbvar.h |  22 +++++++++-------------
 2 files changed, 19 insertions(+), 28 deletions(-)

diffs (103 lines):

diff -r fef921a8dc9b -r de97af02a4aa sys/arch/hpcmips/dev/hpcfb.c
--- a/sys/arch/hpcmips/dev/hpcfb.c      Mon May 08 20:09:44 2000 +0000
+++ b/sys/arch/hpcmips/dev/hpcfb.c      Mon May 08 21:56:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpcfb.c,v 1.5 2000/05/02 17:45:15 uch Exp $    */
+/*     $NetBSD: hpcfb.c,v 1.6 2000/05/08 21:56:32 uch Exp $    */
 
 /*-
  * Copyright (c) 1999
@@ -45,7 +45,7 @@
 static const char _copyright[] __attribute__ ((unused)) =
     "Copyright (c) 1999 Shin Takemura.  All rights reserved.";
 static const char _rcsid[] __attribute__ ((unused)) =
-    "$Id: hpcfb.c,v 1.5 2000/05/02 17:45:15 uch Exp $";
+    "$Id: hpcfb.c,v 1.6 2000/05/08 21:56:32 uch Exp $";
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -263,7 +263,7 @@
        void *aux;
 {
 #if 0
-       struct hpcfb_attach_args *fap = aux;
+       struct hpcfb_attach_args *ha = aux;
 #endif
 
        return (1);
@@ -344,6 +344,12 @@
 #endif /* HPCFB_BSTORE */
        printf("\n");
 
+       /* Set video chip dependent CLUT if any. */
+       if (hpcfbconsole && sc->sc_accessops->setclut) {
+               sc->sc_accessops->setclut(sc->sc_accessctx, 
+                                         &hpcfb_console_dc.dc_rinfo);
+       }
+
        wa.console = hpcfbconsole;
        wa.scrdata = &hpcfb_screenlist;
        wa.accessops = &hpcfb_accessops;
@@ -359,7 +365,7 @@
        const char *pnp;
 {
 #if 0
-       struct hpchpcfb_attach_args *fap = aux;
+       struct hpcfb_attach_args *ha = aux;
 #endif
 
        if (pnp)
@@ -482,17 +488,6 @@
        ri->ri_ops = hpcfb_emulops; /* struct copy */
 #endif /* HPCFB_HOOK */
 
-#if 0
-       /*
-        *  setup color map
-        *  overriding rasops.c: rasops_init_devcmap().
-        */
-       ri->ri_devcmap[0] = bg;
-       for (i = 1; i < 16; i++) {
-               ri->ri_devcmap[i] = fg;
-       }
-#endif
-
        return (0);
 }
 
diff -r fef921a8dc9b -r de97af02a4aa sys/arch/hpcmips/dev/hpcfbvar.h
--- a/sys/arch/hpcmips/dev/hpcfbvar.h   Mon May 08 20:09:44 2000 +0000
+++ b/sys/arch/hpcmips/dev/hpcfbvar.h   Mon May 08 21:56:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpcfbvar.h,v 1.3 2000/05/02 17:45:15 uch Exp $ */
+/*     $NetBSD: hpcfbvar.h,v 1.4 2000/05/08 21:56:32 uch Exp $ */
 
 /*-
  * Copyright (c) 1999
@@ -40,18 +40,14 @@
  * video access functions (must be provided by all video).
  */
 struct hpcfb_accessops {
-       int     (*ioctl) __P((void *v, u_long cmd, caddr_t data, int flag,
-                   struct proc *p));
-       int     (*mmap) __P((void *v, off_t off, int prot));
-       void    (*cursor) __P((void *v, int on, int xoff, int yoff, \
-                       int curwidth, int curheiht));
-       void    (*bitblit) __P((void *v, int srcxoff, int srcyoff, \
-                       int dstxoff, int dstyoff, int height, int width));
-       void    (*erase) __P((void *v, int xoff, int yoff, \
-                       int height, int width, int attr));
-       void    (*putchar) __P((void *v, int xoff, int yoff, \
-                       struct wsdisplay_font *font, int fclr, int uclr, \
-                       u_int uc, int attr));
+       int     (*ioctl) __P((void *, u_long, caddr_t, int, struct proc *));
+       int     (*mmap) __P((void *, off_t, int));
+       void    (*cursor) __P((void *, int, int, int, int, int));
+       void    (*bitblit) __P((void *, int, int, int, int, int, int));
+       void    (*erase) __P((void *, int, int, int, int, int));
+       void    (*putchar) __P((void *, int, int, struct wsdisplay_font *,
+                               int, int, u_int, int));
+       void    (*setclut) __P((void *, struct rasops_info *));
 };
 
 /*



Home | Main Index | Thread Index | Old Index