ag10e.h revision 98bb403a
1/* 2 * Fujitsu AG-10e framebuffer - defines. 3 * 4 * Copyright (C) 2007 Michael Lorenz 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/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/suncg6/cg6.h,v 1.3 2001/05/04 19:05:45 dawes Exp $ */ 24 25#ifndef AG10E_H 26#define AG10E_H 27 28#include "xf86.h" 29#include "xf86_OSproc.h" 30#include "xf86_ansic.h" 31#include "xf86RamDac.h" 32#include "Xmd.h" 33#include "gcstruct.h" 34#include "ag10e_regs.h" 35#include "xf86sbusBus.h" 36#include "xaa.h" 37 38typedef struct { 39 unsigned char *fb; 40 unsigned char *regs; 41 int vclipmax; 42 int width; 43 int height; 44 int maxheight; 45 int vidmem; 46 47 sbusDevicePtr psdp; 48 Bool HWCursor; 49 Bool NoAccel; 50 CloseScreenProcPtr CloseScreen; 51 xf86CursorInfoPtr CursorInfoRec; 52 struct fbcursor Cursor; 53 unsigned char pal[9]; 54 55 OptionInfoPtr Options; 56 unsigned char *buffers[1]; 57 XAAInfoRecPtr AccelInfoRec; 58 int tex_width, tex_height; 59 FBAreaPtr tex_buffer; 60 61 /* Glint stuff */ 62 GCPtr CurrentGC; 63 DrawablePtr CurrentDrawable; 64 int IOOffset; 65 int FIFOSize; 66 int InFifoSpace; 67 int pprod; 68 CARD32 ROP; 69 CARD32 FrameBufferReadMode; 70 CARD32 BltScanDirection; 71 CARD32 TexMapFormat; 72 CARD32 PixelWidth; 73 Bool ClippingOn; 74 CARD32 ForeGroundColor; 75 CARD32 BackGroundColor; 76 int bppalign; 77 CARD32 startxdom; 78 CARD32 startxsub; 79 CARD32 starty; 80 CARD32 count; 81 CARD32 dy; 82 CARD32 x; 83 CARD32 y; 84 CARD32 w; 85 CARD32 h; 86 CARD32 dxdom; 87 int dwords; 88 int cpuheight; 89 int cpucount; 90 CARD32 planemask; 91 int realWidth; 92 93} AG10ERec, *AG10EPtr; 94 95extern int AG10EScreenPrivateIndex; 96extern int AG10EGCPrivateIndex; 97extern int AG10EWindowPrivateIndex; 98 99#define GET_AG10E_FROM_SCRN(p) ((AG10EPtr)((p)->driverPrivate)) 100 101#define AG10EGetScreenPrivate(s) \ 102((AG10EPtr) (s)->devPrivates[AG10EScreenPrivateIndex].ptr) 103 104#define AG10EGetGCPrivate(g) \ 105((AG10EPrivGCPtr) (g)->devPrivates [AG10EGCPrivateIndex].ptr) 106 107#define AG10EGetWindowPrivate(w) \ 108((AG10EStipplePtr) (w)->devPrivates[AG10EWindowPrivateIndex].ptr) 109 110#define AG10ESetWindowPrivate(w,p) \ 111((w)->devPrivates[AG10EWindowPrivateIndex].ptr = (pointer) p) 112 113int AG10EAccelInit(ScreenPtr); 114Bool AG10EDGAInit(ScreenPtr); 115 116#endif /* AG10E_H */ 117