Annotation of tme/machine/sun/sun-fb.h, revision 1.1.1.1

1.1       root        1: /* $Id: sun-fb.h,v 1.1 2004/08/19 11:34:14 fredette Exp $ */
                      2: 
                      3: /* machine/sun/sun-fb.h - header file for Sun framebuffer emulation: */
                      4: 
                      5: /*
                      6:  * Copyright (c) 2004 Matt Fredette
                      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 Fredette.
                     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
                     25:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
                     26:  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
                     27:  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                     28:  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
                     29:  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
                     31:  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
                     32:  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     33:  * POSSIBILITY OF SUCH DAMAGE.
                     34:  */
                     35: 
                     36: #ifndef _MACHINE_SUN_FB_H
                     37: #define _MACHINE_SUN_FB_H
                     38: 
                     39: #include <tme/common.h>
                     40: _TME_RCSID("$Id: sun-fb.h,v 1.1 2004/08/19 11:34:14 fredette Exp $");
                     41: 
                     42: /* includes: */
                     43: #include <tme/generic/bus.h>
                     44: 
                     45: /* macros: */
                     46: 
                     47: /* P4 register framebuffer identifiers: */
                     48: #define TME_SUN_P4_ID_MASK             (0xff000000)
                     49: #define  TME_SUN_P4_ID_BWTWO           (0x00000000)
                     50: #define  TME_SUN_P4_ID_CGFOUR          (0x40000000)
                     51: #define  TME_SUN_P4_ID_CGEIGHT         (0x45000000)
                     52: #define  TME_SUN_P4_ID_CGSIX           (0x60000000)
                     53: 
                     54: /* P4 register framebuffer sizes: */
                     55: #define TME_SUN_P4_SIZE_NULL           (0xffffffff)
                     56: #define TME_SUN_P4_SIZE_MASK           (0x0f000000)
                     57: #define  TME_SUN_P4_SIZE_1600_1280     (0x00000000)
                     58: #define  TME_SUN_P4_SIZE_1152_900      (0x01000000)
                     59: #define  TME_SUN_P4_SIZE_1024_1024     (0x02000000)
                     60: #define  TME_SUN_P4_SIZE_1280_1024     (0x03000000)
                     61: #define  TME_SUN_P4_SIZE_1440_1440     (0x04000000)
                     62: #define  TME_SUN_P4_SIZE_640_480       (0x05000000)
                     63: 
                     64: /* P4 register bits: */
                     65:                                        /* 0x00000080 is the diagnostic bit (?) */
                     66:                                        /* 0x00000040 is the readback bit (?) */
                     67: #define TME_SUN_P4_REG_ENABLE_VIDEO    (0x00000020)
                     68: #define TME_SUN_P4_REG_SYNC_RAMDAC     (0x00000010)
                     69: #define TME_SUN_P4_REG_IN_VTRACE       (0x00000008)
                     70: #define TME_SUN_P4_REG_INT_ACTIVE      (0x00000004)
                     71: #define TME_SUN_P4_REG_INT_RESET       (0x00000004)
                     72: #define TME_SUN_P4_REG_ENABLE_INT      (0x00000002)
                     73: #define TME_SUN_P4_REG_IN_VTRACE_1H    (0x00000001)
                     74: #define TME_SUN_P4_REG_RESET           (0x00000001)
                     75: 
                     76: /* P4 register read-only bits: */
                     77: #define TME_SUN_P4_RO_MASK             (TME_SUN_P4_ID_MASK \
                     78:                                         | TME_SUN_P4_SIZE_MASK \
                     79:                                         | TME_SUN_P4_REG_IN_VTRACE \
                     80:                                         | TME_SUN_P4_REG_INT_ACTIVE \
                     81:                                         | TME_SUN_P4_REG_IN_VTRACE_1H)
                     82: 
                     83: /* offsets from a P4 register: */
                     84: #define        TME_SUN_P4_OFFSET_BWTWO         (0x00100000)
                     85: 
                     86: /* prototypes: */
                     87: tme_uint32_t tme_sun_fb_p4_size _TME_P((const char *));
                     88: tme_uint32_t tme_sun_fb_p4_size_width _TME_P((tme_uint32_t));
                     89: tme_uint32_t tme_sun_fb_p4_size_height _TME_P((tme_uint32_t));
                     90: 
                     91: #endif /* !_MACHINE_SUN_FB_H */

unix.superglobalmegacorp.com

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