1 /* sarea.h -- SAREA definitions -*- linux-c -*-
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  * TUNGSTEN GRAPHICS 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
23  * OTHER DEALINGS IN THE SOFTWARE.
24  *
25  * Authors:
26  *    Michel D�nzer <michel@daenzer.net>
27  */
28 
29 #ifndef _DRM_SAREA_H_
30 #define _DRM_SAREA_H_
31 
32 #define SAREA_MAX_DRAWABLES 		256
33 
34 typedef struct _drm_sarea_drawable_t {
35     unsigned int	stamp;
36     unsigned int	flags;
37 } drm_sarea_drawable_t;
38 
39 typedef struct _dri_sarea_frame_t {
40     unsigned int        x;
41     unsigned int        y;
42     unsigned int        width;
43     unsigned int        height;
44     unsigned int        fullscreen;
45 } drm_sarea_frame_t;
46 
47 typedef struct _drm_sarea_t {
48     /* first thing is always the drm locking structure */
49     drm_hw_lock_t		lock;
50 		/* NOT_DONE: Use readers/writer lock for drawable_lock */
51     drm_hw_lock_t		drawable_lock;
52     drm_sarea_drawable_t	drawableTable[SAREA_MAX_DRAWABLES];
53     drm_sarea_frame_t		frame;
54     drm_context_t		dummy_context;
55 } drm_sarea_t;
56 
57 #endif	/* _DRM_SAREA_H_ */
58