First import
[xorg_rtime.git] / xorg-server-1.4 / hw / kdrive / epson / epson13806draw.h
blobb5f1bf5c2a034120d08cef0d9724d50b22bd6e1f
1 /*
2 * Copyright 2004 by Costas Stylianou <costas.stylianou@psion.com> +44(0)7850 394095
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Costas Sylianou not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. Costas Stylianou makes no representations
11 * about the suitability of this software for any purpose. It is provided
12 * "as is" without express or implied warranty.
14 * COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL COSTAS STYLIANOU BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
22 /*
23 * epson13806draw.h - Implementation of hard ware accelerated functions for epson S1D13806
24 * Graphic controller.
26 * History:
27 * 28-Jan-04 C.Stylianou PRJ NBL: Created from chipsdraw.h
31 #ifndef _EPSON13806DRAW_H_
32 #define _EPSON13806DRAW_H_
36 * offset from ioport beginning
40 #define SetupEpson(s) KdScreenPriv(s); \
41 epsonCardInfo(pScreenPriv); \
42 EpsonPtr epson = epsonc->epson
45 typedef volatile CARD8 VOL8;
46 typedef volatile CARD16 VOL16;
47 typedef volatile CARD32 VOL32;
49 typedef struct _epsonSave {
50 int dummy;
51 } EpsonSave;
53 typedef struct _epsonCardInfo {
54 EpsonPriv epson;
55 CARD32 *window;
56 Bool mmio;
57 EpsonSave save;
58 } epsonCardInfo;
60 #define getEpsonCardInfo(kd) ((epsonCardInfo *) ((kd)->card->driver))
61 #define epsonCardInfo(kd) epsonCardInfo *epsonc = getEpsonCardInfo(kd)
63 typedef struct _epsonCursor {
64 int width, height;
65 int xhot, yhot;
66 Bool has_cursor;
67 CursorPtr pCursor;
68 Pixel source, mask;
69 } EpsonCursor;
71 #define epson_CURSOR_WIDTH 64
72 #define epson_CURSOR_HEIGHT 64
74 typedef struct _epsonScreenInfo {
75 EpsonScrPriv epson;
76 CARD8 *cursor_base;
77 CARD8 *screen;
78 CARD8 *off_screen;
79 int off_screen_size;
80 EpsonCursor cursor;
81 void *regbase_virt;
82 } EpsonScreenInfo;
84 #define getEpsonScreenInfo(kd) ((EpsonScreenInfo *) ((kd)->screen->driver))
85 #define epsonScreenInfo(kd) EpsonScreenInfo *epsons = getEpsonScreenInfo(kd)
87 Bool
88 epsonDrawInit (ScreenPtr pScreen);
90 void
91 epsonDrawEnable (ScreenPtr pScreen);
93 void
94 epsonDrawSync (ScreenPtr pScreen);
96 void
97 epsonDrawDisable (ScreenPtr pScreen);
99 void
100 epsonDrawFini (ScreenPtr pScreen);
102 Bool
103 epsonCursorInit (ScreenPtr pScreen);
105 void
106 epsonCursorEnable (ScreenPtr pScreen);
108 void
109 epsonCursorDisable (ScreenPtr pScreen);
111 void
112 epsonCursorFini (ScreenPtr pScreen);
114 void
115 epsonRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef);
117 extern KdCardFuncs epsonFuncs;
119 #endif