The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/chips/sfb_misc.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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  Software.Distribution@CS.CMU.EDU
   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  * HISTORY
   28  * $Log:        sfb_misc.c,v $
   29  * Revision 2.2  93/02/05  08:07:28  danner
   30  *      Flamingo, protos.
   31  *      [93/02/04  01:39:27  af]
   32  * 
   33  *      Created.
   34  *      [92/12/10  15:44:58  af]
   35  * 
   36  */
   37 /*
   38  *      File: sfb_misc.c
   39  *      Author: Alessandro Forin, Carnegie Mellon University
   40  *      Date: 11/92
   41  *
   42  *      Driver for the PMAGB-BA smart color framebuffer
   43  *
   44  */
   45 
   46 #include <sfb.h>
   47 #if     (NSFB > 0)
   48 #include <platforms.h>
   49 
   50 /*
   51  * NOTE: This driver relies heavily on the pm one, as well as the cfb.
   52  */
   53 
   54 #include <device/device_types.h>
   55 #include <chips/screen_defs.h>
   56 #include <chips/pm_defs.h>
   57 typedef pm_softc_t      sfb_softc_t;
   58 
   59 #include <chips/bt459.h>
   60 #define bt459           cursor_registers
   61 
   62 #ifdef  DECSTATION
   63 #include <mips/PMAX/pmagb_ba.h>
   64 #endif
   65 
   66 #ifdef  FLAMINGO
   67 #include <mips/PMAX/pmagb_ba.h>         /* XXXX */
   68 #endif
   69 
   70 /*
   71  * Initialize color map, for kernel use
   72  */
   73 #define sfb_init_colormap               cfb_init_colormap
   74 
   75 /*
   76  * Position cursor
   77  */
   78 sfb_pos_cursor(
   79         bt459_regmap_t  *regs,
   80         int             x,
   81         int             y)
   82 {
   83         bt459_pos_cursor( regs, x + 368 - 219, y + 37 - 34);
   84 }
   85 
   86 /*
   87  * Large viz small cursor
   88  */
   89 #define sfb_small_cursor_to_large       cfb_small_cursor_to_large
   90 
   91 /*
   92  * Device-specific set status
   93  */
   94 #define sfb_set_status                  cfb_set_status
   95 
   96 /*
   97  * Hardware initialization
   98  */
   99 sfb_init_screen(
  100         sfb_softc_t *sfb)
  101 {
  102         bt459_init( sfb->bt459,
  103                     sfb->bt459 + (SFB_OFFSET_RESET - SFB_OFFSET_BT459),
  104                     4 /* 4:1 MUX */);
  105 }
  106 
  107 /*
  108  * Do what's needed when X exits
  109  */
  110 sfb_soft_reset(
  111         screen_softc_t  sc)
  112 {
  113         sfb_softc_t     *sfb = (sfb_softc_t*) sc->hw_state;
  114         user_info_t     *up =  sc->up;
  115         extern cursor_sprite_t  dc503_default_cursor;
  116 
  117         /*
  118          * Restore params in mapped structure
  119          */
  120         pm_init_screen_params(sc,up);
  121         up->row = up->max_row - 1;
  122 
  123         up->dev_dep_2.pm.x26 = 2; /* you do not want to know */
  124         up->dev_dep_1.pm.x18 = (short*)2;
  125 
  126         /*
  127          * Restore RAMDAC chip to default state
  128          */
  129         sfb_init_screen(sfb);
  130 
  131         /*
  132          * Load kernel's cursor sprite: just use the same pmax one
  133          */
  134         sfb_small_cursor_to_large(up, dc503_default_cursor);
  135         bt459_cursor_sprite(sfb->bt459, up->dev_dep_2.pm.cursor_sprite);
  136 
  137         /*
  138          * Color map and cursor color
  139          */
  140         sfb_init_colormap(sc);
  141 }
  142 
  143 
  144 #endif  (NSFB > 0)

Cache object: aa9a9e483957457abbfa0f6405eceb11


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.