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/dev/fb/gfb.h

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  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
    3  * All rights reserved.
    4  *
    5  * Author: Chris G. Demetriou
    6  * 
    7  * Permission to use, copy, modify and distribute this software and
    8  * its documentation is hereby granted, provided that both the copyright
    9  * notice and this permission notice appear in all copies of the
   10  * software, derivative works or modified versions, and any portions
   11  * thereof, and that both notices appear in supporting documentation.
   12  * 
   13  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
   14  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
   15  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   16  * 
   17  * Carnegie Mellon requests users of this software to return to
   18  *
   19  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   20  *  School of Computer Science
   21  *  Carnegie Mellon University
   22  *  Pittsburgh PA 15213-3890
   23  *
   24  * any improvements or extensions that they make and grant Carnegie the
   25  * rights to redistribute these changes.
   26  *
   27  * Copyright (c) 2000 Andrew Miklic
   28  *
   29  * $FreeBSD: releng/5.2/sys/dev/fb/gfb.h 85810 2001-11-01 08:26:30Z obrien $
   30  */
   31 
   32 #ifndef _FB_GFB_H_
   33 #define _FB_GFB_H_
   34 
   35 #define MAX_NUM_GFB_CARDS       16
   36 
   37 #define GFB_UNIT(dev)           minor(dev)
   38 #define GFB_MKMINOR(unit)       (unit)
   39 #define BIT_REVERSE(byte)               \
   40         ((((byte) & 0x01) << 7) |       \
   41          (((byte) & 0x02) << 5) |       \
   42          (((byte) & 0x04) << 3) |       \
   43          (((byte) & 0x08) << 1) |       \
   44          (((byte) & 0x10) >> 1) |       \
   45          (((byte) & 0x20) >> 3) |       \
   46          (((byte) & 0x40) >> 5) |       \
   47          (((byte) & 0x80) >> 7))
   48 #define probe_done(adp)         ((adp)->va_flags & V_ADP_PROBED)
   49 #define init_done(adp)          ((adp)->va_flags & V_ADP_INITIALIZED)
   50 #define config_done(adp)        ((adp)->va_flags & V_ADP_REGISTERED)
   51 
   52 struct gfb_softc;
   53 
   54 int gfb_error(void);
   55 vi_probe_t gfb_probe;
   56 vi_init_t gfb_init;
   57 
   58 vi_get_info_t gfb_get_info;
   59 /*vi_query_mode_t gfb_query_mode;*/
   60 vi_set_mode_t gfb_set_mode;
   61 vi_save_font_t gfb_save_font;
   62 vi_load_font_t gfb_load_font;
   63 vi_show_font_t gfb_show_font;
   64 vi_save_palette_t gfb_save_palette;
   65 vi_load_palette_t gfb_load_palette;
   66 vi_save_state_t gfb_save_state;
   67 vi_load_state_t gfb_load_state;
   68 vi_read_hw_cursor_t gfb_read_hw_cursor;
   69 vi_set_hw_cursor_t gfb_set_hw_cursor;
   70 vi_set_hw_cursor_shape_t gfb_set_hw_cursor_shape;
   71 vi_mmap_t gfb_mmap;
   72 vi_ioctl_t gfb_ioctl;
   73 vi_set_border_t gfb_set_border;
   74 vi_set_win_org_t gfb_set_win_org;
   75 vi_fill_rect_t gfb_fill_rect;
   76 vi_bitblt_t gfb_bitblt;
   77 vi_clear_t gfb_clear;
   78 vi_diag_t gfb_diag;
   79 vi_save_cursor_palette_t gfb_save_cursor_palette;
   80 vi_load_cursor_palette_t gfb_load_cursor_palette;
   81 vi_copy_t gfb_copy;
   82 vi_putp_t gfb_putp;
   83 vi_putc_t gfb_putc;
   84 vi_puts_t gfb_puts;
   85 vi_putm_t gfb_putm;
   86 
   87 typedef void gfb_ramdac_init_t(struct gfb_softc *);
   88 typedef u_int8_t gfb_ramdac_rd_t(struct gfb_softc *, u_int);
   89 typedef void gfb_ramdac_wr_t(struct gfb_softc *, u_int, u_int8_t);
   90 typedef void gfb_ramdac_intr_t(struct gfb_softc *);
   91 typedef int gfb_ramdac_save_palette_t(video_adapter_t *, video_color_palette_t *);
   92 typedef int gfb_ramdac_load_palette_t(video_adapter_t *, video_color_palette_t *);
   93 typedef int gfb_ramdac_save_cursor_palette_t(video_adapter_t *, struct fbcmap *);
   94 typedef int gfb_ramdac_load_cursor_palette_t(video_adapter_t *, struct fbcmap *);
   95 typedef int gfb_ramdac_read_hw_cursor_t(video_adapter_t *, int *, int *);
   96 typedef int gfb_ramdac_set_hw_cursor_t(video_adapter_t *, int, int);
   97 typedef int gfb_ramdac_set_hw_cursor_shape_t(video_adapter_t *, int, int, int, int);
   98 typedef int gfb_builtin_save_palette_t(video_adapter_t *, video_color_palette_t *);
   99 typedef int gfb_builtin_load_palette_t(video_adapter_t *, video_color_palette_t *);
  100 typedef int gfb_builtin_save_cursor_palette_t(video_adapter_t *, struct fbcmap *);
  101 typedef int gfb_builtin_load_cursor_palette_t(video_adapter_t *, struct fbcmap *);
  102 typedef int gfb_builtin_read_hw_cursor_t(video_adapter_t *, int *, int *);
  103 typedef int gfb_builtin_set_hw_cursor_t(video_adapter_t *, int, int);
  104 typedef int gfb_builtin_set_hw_cursor_shape_t(video_adapter_t *, int, int, int, int);
  105 
  106 struct monitor {
  107         u_int16_t       cols;           /* Columns */
  108         u_int16_t       hfp;            /* Horizontal Front Porch */
  109         u_int16_t       hsync;          /* Horizontal Sync */
  110         u_int16_t       hbp;            /* Horizontal Back Porch */
  111         u_int16_t       rows;           /* Rows */
  112         u_int16_t       vfp;            /* Vertical Front Porch */
  113         u_int16_t       vsync;          /* Vertical Sync */
  114         u_int16_t       vbp;            /* Vertical Back Porch */
  115         u_int32_t       dotclock;       /* Dot Clock */
  116 };
  117 
  118 struct gfb_font {
  119         int width;
  120         int height;
  121         u_char data[256 * 32];
  122 };
  123 
  124 struct gfb_conf {
  125         char *name;                     /* name for this board type */
  126         char *ramdac_name;              /* name for this RAMDAC */
  127         u_char *font;
  128         struct gfb_font fonts[4];
  129         video_color_palette_t palette;
  130         struct fbcmap cursor_palette;
  131         gfb_ramdac_init_t *ramdac_init;
  132         gfb_ramdac_rd_t *ramdac_rd;
  133         gfb_ramdac_wr_t *ramdac_wr;
  134         gfb_ramdac_intr_t *ramdac_intr;
  135         gfb_ramdac_save_palette_t *ramdac_save_palette;
  136         gfb_ramdac_load_palette_t *ramdac_load_palette;
  137         gfb_ramdac_save_cursor_palette_t *ramdac_save_cursor_palette;
  138         gfb_ramdac_load_cursor_palette_t *ramdac_load_cursor_palette;
  139         gfb_ramdac_read_hw_cursor_t *ramdac_read_hw_cursor;
  140         gfb_ramdac_set_hw_cursor_t *ramdac_set_hw_cursor;
  141         gfb_ramdac_set_hw_cursor_shape_t *ramdac_set_hw_cursor_shape;
  142         gfb_builtin_save_palette_t *builtin_save_palette;
  143         gfb_builtin_load_palette_t *builtin_load_palette;
  144         gfb_builtin_save_cursor_palette_t *builtin_save_cursor_palette;
  145         gfb_builtin_load_cursor_palette_t *builtin_load_cursor_palette;
  146         gfb_builtin_read_hw_cursor_t *builtin_read_hw_cursor;
  147         gfb_builtin_set_hw_cursor_t *builtin_set_hw_cursor;
  148         gfb_builtin_set_hw_cursor_shape_t *builtin_set_hw_cursor_shape;
  149 };
  150 
  151 struct video_adapter;
  152 struct genfb_softc;
  153 
  154 typedef struct gfb_softc {
  155         char *driver_name;              /* name for this driver */
  156         struct video_adapter *adp;
  157         struct genfb_softc *gensc;
  158         struct gfb_conf *gfbc;
  159         bus_space_handle_t bhandle;
  160         bus_space_tag_t btag;
  161         bus_space_handle_t regs;
  162         void *intrhand;
  163         struct resource *irq;
  164         struct resource *res;
  165         u_int8_t rev;                   /* GFB revision */
  166         int type;
  167         int model;
  168         struct cdevsw *cdevsw;
  169         dev_t devt;
  170 } *gfb_softc_t;
  171 
  172 #endif /* _FB_GFB_H_ */

Cache object: 56d36638fcded4e34218d70ab85a6e87


[ 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.