[BACK]Return to macfbvar.h CVS log [TXT][DIR] Up to [local] / sys / arch / mac68k / dev

Annotation of sys/arch/mac68k/dev/macfbvar.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: macfbvar.h,v 1.7 2006/03/13 22:35:17 miod Exp $       */
        !             2: /* $NetBSD: macfbvar.h,v 1.3 2005/01/15 16:00:59 chs Exp $ */
        !             3: /*     $NetBSD: grfvar.h,v 1.11 1996/08/04 06:03:58 scottr Exp $       */
        !             4: /*     $NetBSD: grfioctl.h,v 1.5 1995/07/02 05:26:45 briggs Exp $      */
        !             5: /*
        !             6:  * Copyright (c) 1998 Matt DeBergalis
        !             7:  * All rights reserved.
        !             8:  *
        !             9:  * Redistribution and use in source and binary forms, with or without
        !            10:  * modification, are permitted provided that the following conditions
        !            11:  * are met:
        !            12:  * 1. Redistributions of source code must retain the above copyright
        !            13:  *    notice, this list of conditions and the following disclaimer.
        !            14:  * 2. Redistributions in binary form must reproduce the above copyright
        !            15:  *    notice, this list of conditions and the following disclaimer in the
        !            16:  *    documentation and/or other materials provided with the distribution.
        !            17:  * 3. All advertising materials mentioning features or use of this software
        !            18:  *    must display the following acknowledgement:
        !            19:  *      This product includes software developed by Matt DeBergalis
        !            20:  * 4. The name of the author may not be used to endorse or promote products
        !            21:  *    derived from this software without specific prior written permission
        !            22:  *
        !            23:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
        !            24:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        !            25:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            26:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            27:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        !            28:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        !            29:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        !            30:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        !            31:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
        !            32:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        !            33:  */
        !            34: /*
        !            35:  * Copyright (c) 1988 University of Utah.
        !            36:  * Copyright (c) 1990 The Regents of the University of California.
        !            37:  * All rights reserved.
        !            38:  *
        !            39:  * This code is derived from software contributed to Berkeley by
        !            40:  * the Systems Programming Group of the University of Utah Computer
        !            41:  * Science Department.
        !            42:  *
        !            43:  * Redistribution and use in source and binary forms, with or without
        !            44:  * modification, are permitted provided that the following conditions
        !            45:  * are met:
        !            46:  * 1. Redistributions of source code must retain the above copyright
        !            47:  *    notice, this list of conditions and the following disclaimer.
        !            48:  * 2. Redistributions in binary form must reproduce the above copyright
        !            49:  *    notice, this list of conditions and the following disclaimer in the
        !            50:  *    documentation and/or other materials provided with the distribution.
        !            51:  * 3. Neither the name of the University nor the names of its contributors
        !            52:  *    may be used to endorse or promote products derived from this software
        !            53:  *    without specific prior written permission.
        !            54:  *
        !            55:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
        !            56:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            57:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            58:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
        !            59:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            60:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            61:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            62:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            63:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            64:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            65:  * SUCH DAMAGE.
        !            66:  *
        !            67:  * from: Utah $Hdr: grfvar.h 1.9 91/01/21$
        !            68:  *
        !            69:  *     @(#)grfvar.h    7.3 (Berkeley) 5/7/91
        !            70:  */
        !            71:
        !            72: /*
        !            73:  * Nubus image data structure.  This is the equivalent of a PixMap in
        !            74:  * MacOS programming parlance.  One of these structures exists for each
        !            75:  * video mode that a quickdraw compatible card can fit in.
        !            76:  */
        !            77: struct image_data {
        !            78:        u_int32_t       size;
        !            79:        u_int32_t       offset;
        !            80:        u_int16_t       rowbytes;
        !            81:        u_int16_t       top;
        !            82:        u_int16_t       left;
        !            83:        u_int16_t       bottom;
        !            84:        u_int16_t       right;
        !            85:        u_int16_t       version;
        !            86:        u_int16_t       packType;
        !            87:        u_int32_t       packSize;
        !            88:        u_int32_t       hRes;
        !            89:        u_int32_t       vRes;
        !            90:        u_int16_t       pixelType;
        !            91:        u_int16_t       pixelSize;
        !            92:        u_int16_t       cmpCount;
        !            93:        u_int16_t       cmpSize;
        !            94:        u_int32_t       planeBytes;
        !            95: };
        !            96:
        !            97: #define VID_PARAMS             1
        !            98: #define VID_TABLE_OFFSET       2
        !            99: #define VID_PAGE_CNT           3
        !           100: #define VID_DEV_TYPE           4
        !           101:
        !           102: struct macfb_devconfig {
        !           103:        vaddr_t         dc_vaddr;       /* memory space virtual base address */
        !           104:        paddr_t         dc_paddr;       /* memory space physical base address */
        !           105:        psize_t         dc_size;        /* size of slot memory */
        !           106:        vaddr_t         dc_cmapregs;    /* va of cmap registers if known */
        !           107:
        !           108:        int             dc_offset;      /* offset to base of flat fb */
        !           109:
        !           110:        int             dc_wid;         /* width of frame buffer */
        !           111:        int             dc_ht;          /* height of frame buffer */
        !           112:        int             dc_depth;       /* depth of frame buffer */
        !           113:        int             dc_rowbytes;    /* bytes in fb scan line */
        !           114:
        !           115:        int             dc_flags;       /* various flags */
        !           116: #define        FB_MACOS_PALETTE        0x01    /* text mode uses MacOS palette */
        !           117:
        !           118:        /* rasops information */
        !           119:        struct rasops_info dc_ri;
        !           120:
        !           121:        /* shadow colormap */
        !           122:        u_int8_t        dc_cmap[256 * 3];
        !           123:        void            (*dc_setcolor)(void *, u_int, u_int);
        !           124:
        !           125:        /* wsdisplay information */
        !           126:        struct wsscreen_descr dc_wsd;
        !           127:        struct wsscreen_descr *dc_scrlist[1];
        !           128:        struct wsscreen_list dc_screenlist;
        !           129:        int             dc_nscreens;
        !           130: };
        !           131:
        !           132: struct macfb_softc {
        !           133:        struct device           sc_dev;
        !           134:
        !           135:        nubus_slot              sc_slot;
        !           136:
        !           137:        bus_addr_t              sc_basepa;      /* base of video space */
        !           138:        bus_addr_t              sc_fbofs;       /* offset to framebuffer */
        !           139:
        !           140:        bus_space_tag_t         sc_tag;
        !           141:        bus_space_handle_t      sc_handle;
        !           142:        bus_space_handle_t      sc_regh;
        !           143:
        !           144:        u_int32_t       card_id;        /* DrHW value for nubus cards   */
        !           145:        bus_size_t      cli_offset;     /* Offset of byte to clear intr */
        !           146:                                        /* for cards where that's suff.  */
        !           147:        u_int32_t       cli_value;      /* Value to write at cli_offset */
        !           148:
        !           149:        struct macfb_devconfig  *sc_dc;
        !           150: };
        !           151:
        !           152: void   macfb_attach_common(struct macfb_softc *, struct macfb_devconfig *);
        !           153: int    macfb_cnattach(void);

CVSweb