Merge branch 'mesa_7_6_branch' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa
[mesa.git] / src / mesa / drivers / dri / gamma / server / glint_common.h
1 /* glint_common.h -- common header definitions for Gamma 2D/3D/DRM suite
2 *
3 * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
24 *
25 * Converted to common header format:
26 * Jens Owen <jens@tungstengraphics.com>
27 *
28 *
29 */
30
31 #ifndef _GLINT_COMMON_H_
32 #define _GLINT_COMMON_H_
33
34 /*
35 * WARNING: If you change any of these defines, make sure to change
36 * the kernel include file as well (gamma_drm.h)
37 */
38
39 /* Driver specific DRM command indices
40 * NOTE: these are not OS specific, but they are driver specific
41 */
42 #define DRM_GAMMA_INIT 0x00
43 #define DRM_GAMMA_COPY 0x01
44
45 typedef struct {
46 enum {
47 GAMMA_INIT_DMA = 0x01,
48 GAMMA_CLEANUP_DMA = 0x02
49 } func;
50 int sarea_priv_offset;
51 int pcimode;
52 unsigned int mmio0;
53 unsigned int mmio1;
54 unsigned int mmio2;
55 unsigned int mmio3;
56 unsigned int buffers_offset;
57 int num_rast;
58 } drmGAMMAInit;
59
60 extern int drmGAMMAInitDMA( int fd, drmGAMMAInit *info );
61 extern int drmGAMMACleanupDMA( int fd );
62
63 #endif