tcx.h revision 25ad54ca
1/* 2 * TCX framebuffer - defines. 3 * 4 * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com) 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights 9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 * copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in 14 * all copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 */ 23 24#ifndef TCX_H 25#define TCX_H 26 27#include "xf86.h" 28#include "xf86_OSproc.h" 29#include "xf86Cursor.h" 30#include <X11/Xmd.h> 31#include "gcstruct.h" 32#include "xf86sbusBus.h" 33#include "exa.h" 34#include "tcx_regs.h" 35 36#include "compat-api.h" 37/* Various offsets in virtual (ie. mmap()) spaces Linux and Solaris support. */ 38#define TCX_RAM8_VOFF 0x00000000 39#define TCX_RAM24_VOFF 0x01000000 40#define TCX_STIP_VOFF 0x10000000 41#define TCX_BLIT_VOFF 0x20000000 42#define TCX_CPLANE_VOFF 0x28000000 43#define TCX_RSTIP_VOFF 0x30000000 44#define TCX_RBLIT_VOFF 0x38000000 45#define TCX_TEC_VOFF 0x70000000 46#define TCX_BTREGS_VOFF 0x70002000 47#define TCX_THC_VOFF 0x70004000 48#define TCX_DHC_VOFF 0x70008000 49#define TCX_ALT_VOFF 0x7000a000 50#define TCX_SYNC_VOFF 0x7000e000 51 52typedef struct { 53 unsigned char *fb; 54 int width; 55 int height; 56 unsigned int *cplane; 57 TcxThcPtr thc; 58 sbusDevicePtr psdp; 59 CloseScreenProcPtr CloseScreen; 60 Bool HWCursor; 61 Bool Is8bit; 62 Bool HasStipROP; 63 int vramsize; /* size of the 8bit fb */ 64 volatile uint64_t *rblit; 65 volatile uint64_t *rstip; 66 xf86CursorInfoPtr CursorInfoRec; 67 unsigned int CursorXY; 68 int CursorBg, CursorFg; 69 Bool CursorEnabled, NoAccel; 70 unsigned char CursorShiftX, CursorShiftY; 71 unsigned char *CursorData; 72 OptionInfoPtr Options; 73 ExaDriverPtr pExa; 74 int xdir, ydir, srcoff, srcpitch, fg, pitchshift; 75} TcxRec, *TcxPtr; 76 77Bool TcxInitAccel(ScreenPtr); 78 79#define TCX_CPLANE_MODE 0x03000000 80 81#define GET_TCX_FROM_SCRN(p) ((TcxPtr)((p)->driverPrivate)) 82 83#endif /* TCX_H */ 84