sis_common.h revision 72b676d7
1/* $XFree86$ */
2/* $XdotOrg$ */
3/*
4 * Common header definitions for SiS 2D/3D/DRM suite
5 *
6 * Copyright (C) 2003 Eric Anholt
7 *
8 * Permission to use, copy, modify, distribute, and sell this software and its
9 * documentation for any purpose is hereby granted without fee, provided that
10 * the above copyright notice appears in all copies and that both that copyright
11 * notice and this permission notice appear in supporting documentation, and
12 * and that the name of the copyright holder not be used in advertising
13 * or publicity pertaining to distribution of the software without specific,
14 * written prior permission. The copyright holder makes no representations
15 * about the suitability of this software for any purpose.  It is provided
16 * "as is" without expressed or implied warranty.
17 *
18 * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
19 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
20 * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
21 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
22 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
23 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
24 * PERFORMANCE OF THIS SOFTWARE.
25 *
26 * Author:
27 *   	Eric Anholt <anholt@FreeBSD.org>
28 *
29 */
30
31#ifndef _SIS_COMMON_H_
32#define _SIS_COMMON_H_
33
34#define DRM_SIS_FB_ALLOC	0x04
35#define DRM_SIS_FB_FREE		0x05
36#define DRM_SIS_FLIP		0x08
37#define DRM_SIS_FLIP_INIT	0x09
38#define DRM_SIS_FLIP_FINAL	0x10
39#define DRM_SIS_AGP_INIT	0x13
40#define DRM_SIS_AGP_ALLOC	0x14
41#define DRM_SIS_AGP_FREE	0x15
42#define DRM_SIS_FB_INIT		0x16
43
44typedef struct {
45	int context;
46	unsigned long offset;
47	unsigned long size;
48	void *free;
49} drm_sis_mem_t;
50
51typedef struct {
52	unsigned long offset, size;
53} drm_sis_agp_t;
54
55typedef struct {
56	unsigned long offset, size;
57} drm_sis_fb_t;
58
59typedef struct {
60	unsigned int left, right;
61} drm_sis_flip_t;
62
63#endif /* _SIS_COMMON_H_ */
64
65