Annotation of Gnu-Mach/chips/sfb_misc.c, revision 1.1.1.1

1.1       root        1: /* 
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1992 Carnegie Mellon University
                      4:  * All Rights Reserved.
                      5:  * 
                      6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
                     11:  * 
                     12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     15:  * 
                     16:  * Carnegie Mellon requests users of this software to return to
                     17:  * 
                     18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
                     22:  * 
                     23:  * any improvements or extensions that they make and grant Carnegie Mellon
                     24:  * the rights to redistribute these changes.
                     25:  */
                     26: /*
                     27:  *     File: sfb_misc.c
                     28:  *     Author: Alessandro Forin, Carnegie Mellon University
                     29:  *     Date: 11/92
                     30:  *
                     31:  *     Driver for the PMAGB-BA smart color framebuffer
                     32:  *
                     33:  */
                     34: 
                     35: #include <sfb.h>
                     36: #if    (NSFB > 0)
                     37: #include <platforms.h>
                     38: 
                     39: /*
                     40:  * NOTE: This driver relies heavily on the pm one, as well as the cfb.
                     41:  */
                     42: 
                     43: #include <device/device_types.h>
                     44: #include <chips/screen_defs.h>
                     45: #include <chips/pm_defs.h>
                     46: typedef pm_softc_t     sfb_softc_t;
                     47: 
                     48: #include <chips/bt459.h>
                     49: #define        bt459           cursor_registers
                     50: 
                     51: #ifdef DECSTATION
                     52: #include <mips/PMAX/pmagb_ba.h>
                     53: #endif
                     54: 
                     55: #ifdef FLAMINGO
                     56: #include <mips/PMAX/pmagb_ba.h>                /* XXXX */
                     57: #endif
                     58: 
                     59: /*
                     60:  * Initialize color map, for kernel use
                     61:  */
                     62: #define        sfb_init_colormap               cfb_init_colormap
                     63: 
                     64: /*
                     65:  * Position cursor
                     66:  */
                     67: sfb_pos_cursor(
                     68:        bt459_regmap_t  *regs,
                     69:        int             x,
                     70:        int             y)
                     71: {
                     72:        bt459_pos_cursor( regs, x + 368 - 219, y + 37 - 34);
                     73: }
                     74: 
                     75: /*
                     76:  * Large viz small cursor
                     77:  */
                     78: #define        sfb_small_cursor_to_large       cfb_small_cursor_to_large
                     79: 
                     80: /*
                     81:  * Device-specific set status
                     82:  */
                     83: #define sfb_set_status                 cfb_set_status
                     84: 
                     85: /*
                     86:  * Hardware initialization
                     87:  */
                     88: sfb_init_screen(
                     89:        sfb_softc_t *sfb)
                     90: {
                     91:        bt459_init( sfb->bt459,
                     92:                    sfb->bt459 + (SFB_OFFSET_RESET - SFB_OFFSET_BT459),
                     93:                    4 /* 4:1 MUX */);
                     94: }
                     95: 
                     96: /*
                     97:  * Do what's needed when X exits
                     98:  */
                     99: sfb_soft_reset(
                    100:        screen_softc_t  sc)
                    101: {
                    102:        sfb_softc_t     *sfb = (sfb_softc_t*) sc->hw_state;
                    103:        user_info_t     *up =  sc->up;
                    104:        extern cursor_sprite_t  dc503_default_cursor;
                    105: 
                    106:        /*
                    107:         * Restore params in mapped structure
                    108:         */
                    109:        pm_init_screen_params(sc,up);
                    110:        up->row = up->max_row - 1;
                    111: 
                    112:        up->dev_dep_2.pm.x26 = 2; /* you do not want to know */
                    113:        up->dev_dep_1.pm.x18 = (short*)2;
                    114: 
                    115:        /*
                    116:         * Restore RAMDAC chip to default state
                    117:         */
                    118:        sfb_init_screen(sfb);
                    119: 
                    120:        /*
                    121:         * Load kernel's cursor sprite: just use the same pmax one
                    122:         */
                    123:        sfb_small_cursor_to_large(up, dc503_default_cursor);
                    124:        bt459_cursor_sprite(sfb->bt459, up->dev_dep_2.pm.cursor_sprite);
                    125: 
                    126:        /*
                    127:         * Color map and cursor color
                    128:         */
                    129:        sfb_init_colormap(sc);
                    130: }
                    131: 
                    132: 
                    133: #endif (NSFB > 0)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.