2
* Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
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 copyright
7
* notice and this permission notice appear in supporting documentation, and
8
* that the name of Marc Aurele La France not be used in advertising or
9
* publicity pertaining to distribution of the software without specific,
10
* written prior permission. Marc Aurele La France 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
* MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
16
* EVENT SHALL MARC AURELE LA FRANCE 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.
23
/* $XFree86: xc/programs/Xserver/mi/mibank.h,v 1.10 2003/01/01 19:16:42 tsi Exp $ */
26
#define __MIBANK_H__ 1
28
#include "scrnintstr.h"
31
* Banking external interface.
35
* This is the banking function type. The return value is normally zero.
36
* Non-zero returns can be used to implement the likes of scanline interleave,
39
typedef int miBankProc(
40
ScreenPtr /*pScreen*/,
41
unsigned int /*iBank*/
44
typedef miBankProc *miBankProcPtr;
46
typedef struct _miBankInfo
49
* Banking refers to the use of one or more apertures (in the server's
50
* address space) to access various parts of a potentially larger hardware
53
* Three different banking schemes are supported:
55
* Single banking is indicated when pBankA and pBankB are equal and all
56
* three miBankProcPtr's point to the same function. Here, both reads and
57
* writes through the aperture access the same hardware location.
59
* Shared banking is indicated when pBankA and pBankB are equal but the
60
* source and destination functions differ. Here reads through the
61
* aperture do not necessarily access the same hardware location as writes.
63
* Double banking is indicated when pBankA and pBankB differ. Here two
64
* independent apertures are used to provide read/write access to
65
* potentially different hardware locations.
67
* Any other combination will result in no banking.
69
miBankProcPtr SetSourceBank; /* Set pBankA bank number */
70
miBankProcPtr SetDestinationBank; /* Set pBankB bank number */
71
miBankProcPtr SetSourceAndDestinationBanks; /* Set both bank numbers */
73
pointer pBankA; /* First aperture location */
74
pointer pBankB; /* First or second aperture location */
77
* BankSize is in units of sizeof(char) and is the size of each bank.
79
unsigned long BankSize;
82
* nBankDepth is the colour depth associated with the maximum number of a
83
* pixel's bits that are simultaneously accessible through the frame buffer
86
unsigned int nBankDepth;
87
} miBankInfoRec, *miBankInfoPtr;
91
ScreenPtr /*pScreen*/,
92
unsigned int /*xsize*/,
93
unsigned int /*ysize*/,
94
unsigned int /*width*/,
95
miBankInfoPtr /*pBankInfo*/
100
ScreenPtr /*pScreen*/,
101
miBankInfoPtr /*pBankInfo*/
105
* This function determines the minimum screen width, given a initial estimate
106
* and various screen attributes. DDX needs to determine this width before
107
* initializing the screen.
111
unsigned int /*xsize*/,
112
unsigned int /*ysize*/,
113
unsigned int /*width*/,
114
unsigned long /*BankSize*/,
115
PixmapFormatRec * /*pBankFormat*/,
116
unsigned int /*nWidthUnit*/
119
#endif /* __MIBANK_H__ */