summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/doc/man/XF86DGA.man
blob: 53cf1c3151bc3450ceff582915663c9cab0a6dc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
.\" Copyright (c) 1996  The XFree86 Project
.\" $XFree86: xc/programs/Xserver/hw/xfree86/doc/man/XF86DGA.man,v 3.5 1997/01/20 12:36:18 dawes Exp $
.\" $TOG: XF86DGA.man /main/9 1997/11/11 12:08:52 kaleb $
.\" 
.de ZN
.ie t \fB\^\\$1\^\fR\\$2
.el \fI\^\\$1\^\fP\\$2
..
.TH XF86DGA 3X11 "3.3.1+ (X11R6.4)" "XFree86" "X FUNCTIONS"
.SH NAME
XF86DGAQueryExtension, XF86DGAQueryVersion, XF86DGAQueryDirectVideo, XF86DGAGetVideo, XF86DGADirectVideo, XF86DGASetVidPage, XF86DGASetViewPort, XF86DGAViewPortChanged, XF86DGAGetViewPortSize, XF86DGAInstallColormap, XF86DGAForkApp \- XFree86-DGA extension interface functions
.SH SYNTAX
.nf
.LP
#include <X11/extensions/xf86dga.h>
.LP
Bool XF86DGAQueryExtension(
    Display *\fIdisplay\fP\^,
    int *\fIevent_base_return\fP\^,
    int *\fIerror_base_return\fP\^);
.LP
Bool XF86DGAQueryVersion(
    Display *\fIdisplay\fP\^,
    int *\fImajor_version_return\fP\^,
    int *\fIminor_version_return\fP\^);
.LP
Bool XF86DGAQueryDirectVideo(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int *\fIflags_return\fP\^);
.LP
Bool XF86DGAGetVideo(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    char **\fIaddr_return\fP\^,
    int *\fIwidth_return\fP\^,
    int *\fIbanksize_return\fP\^,
    int *\fImemsize_return\fP\^);
.LP
Bool XF86DGADirectVideo(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int \fIflags\fP\^);
.LP
Bool XF86DGASetVidPage(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int \fIpage\fP\^);
.LP
Bool XF86DGASetViewPort(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int \fIx\fP\^,
    int \fIy\fP\^);
.LP
Bool XF86DGAViewPortChanged(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int \fInum_pages\fP\^);
.LP
Bool XF86DGAGetViewPortSize(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int *\fIviewport_width_return\fP\^,
    int *\fIviewport_height_return\fP\^);
.LP
Bool XF86DGAInstallColormap(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    Colormap \fIcmap\fP\^);
.LP
int XF86DGAForkApp(
    int \fIscreen\fP\^);
.fi
.SH ARGUMENTS
.IP \fIdisplay\fP 2i
Specifies the connection to the X server.
.IP \fIscreen\fP 2i
Specifies which screen number the setting apply to.
.IP \fIevent_base_return\fP 2i
Returns the base event number for the extension.
.IP \fIerror_base_return\fP 2i
Returns the base error number for the extension.
.IP \fImajor_version_return\fP 2i
Returns the major version number of the extension.
.IP \fIminor_version_return\fP 2i
Returns the minor version number of the extension.
.IP \fIaddr_return\fP 2i
Returns a pointer to the start of the video framebuffer.
.IP \fIwidth_return\fP 2i
Returns the framebuffer line width.
.IP \fIbanksize_return\fP 2i
Returns the framebuffer bank size.
.IP \fImemsize_return\fP 2i
Returns the size of the framebuffer memory.
.IP \fIflags\fP 2i
Sets the DirectVideo access features.  When zero, DirectVideo mode is
disabled.  \fIflags\fP may be a a bit-wise combination of the following
values:
.nf
XF86DGADirectGraphics          enable Direct Video mode
XF86DGADirectMouse             enable reporting of pointer movement
                               as relative motion
XF86DGADirectKeyb              enable direct reporting of keyboard events
.fi
.IP \fIflags_return\fP 2i
Reports the DirectVideo features supported by the hardware.  When zero,
the hardware does not support direct video at all.
\fIflags\fP may be a a bit-wise combination of the following
values:
.nf
XF86DGADirectPresent           DirectVideo support is present
.fi
.IP \fIpage\fP 2i
Indicates the framebuffer page (bank) to activate for read/write access.
.IP \fIx\fP 2i
Incidates the x coordinate for the upper-left corner of the view port.
.IP \fIy\fP 2i
Incidates the y coordinate for the upper-left corner of the view port.
.IP \fIviewport_width_return\fP 2i
Reports the width of the view port.
.IP \fIviewport_width_return\fP 2i
Reports the height of the view port.
.IP \fInum_pages\fP 2i
Indicates the number of pages when doing hardware multi-buffering.
.IP \fIcmap\fP 2i
Indicates the colormap to install.
.SH DESCRIPTION
These functions provide an interface to the server extension
\fIXFree86-DGA\fP
which allows a local client direct access to the video framebuffer.
Applications that use these functions must be linked with
.ZN -lXxf86dga
.SS "DGA FUNCTIONS"
The function
.ZN XF86DGAQueryDirectVideo
returns the DirectVideo capabilities supported by the graphics device.
.PP
The
.ZN XF86DGAGetVideo
function is used to get the parameters for the framebuffer.  The parameters
returned are a pointer to the start of the framebuffer, the framebuffer line
width, framebuffer bank size, and framebuffer memory size.
.PP
.ZN XF86DGADirectVideo
is used to enable or disable DirectVideo mode.
.PP
The
.ZN XF86DGASetVidPage
function sets the currently active framebuffer page (bank).  This is only
required for hardware which has a banked memory layout (banksize < memsize).
.PP
The
.ZN XF86DGASetViewPort
function sets the framebuffer coordinates to use for the upper-left corner
of the view port.
.PP
The
.ZN XF86DGAViewPortChanged
function checks whether a previous XF86DGASetViewPort command has been
completed by the hardware, that is, whether a vertical retrace has
occurred since a previous XF86DGASetViewPort.  This can (must, in fact)
be used with page-flipping; you can start writing to the next page only
when this function returns TRUE.  For some devices this will be the case
immediately after XF86DGASetViewPort, however this may be changed in the
future.  The number of pages used is specified with \fInum_pages\fP; it
should be 2 for simple page flipping (double buffering).  If n is greater
than two (triple or multi-buffering), the function checks whether the
(n \- 2)-before-last SetViewPort has been completed.
.PP
The
.ZN XF86DGAGetViewPortSize
function returns the size of the view port, which is the part of the
framebuffer that is visible on the screen.
.PP
The
.ZN XF86DGAInstallColormap
function is used to install a colormap.  This must be called after DirectVideo
mode has been enabled.
.PP
The
.ZN XF86DGAForkApp
function causes the client application to fork, leaving the parent process
to hang around and return to non-DGA mode should the client exit for any
reason.  This function returns 0 for success, or the error condition
returned by fork().
.SS "OTHER FUNCTIONS"
The
.ZN XF86DGAQueryVersion
function can be used to determine the version of the extension
built into the server.
.PP
The function
.ZN XF86DGAQueryExtension
returns the lowest numbered error and event values
assigned to the extension.
.SH SEE ALSO
XFree86(1), XF86Config(4/5)
.SH AUTHORS
Jon Tombs, Harm Hanemaayer, Mark Vojkovich.