3 * \brief SAREA definitions
5 * \author Michel D�zer <michel@daenzer.net>
9 * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
10 * All Rights Reserved.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice (including the next
20 * paragraph) shall be included in all copies or substantial portions of the
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 * OTHER DEALINGS IN THE SOFTWARE.
35 #pragma ident "%Z%%M% %I% %E% SMI"
39 /* SAREA area needs to be at least a page */
40 #if defined(__alpha__)
41 #define SAREA_MAX 0x2000
42 #elif defined(__ia64__)
43 #define SAREA_MAX 0x10000 /* 64kB */
45 /* Intel 830M driver needs at least 8k SAREA */
46 #define SAREA_MAX 0x2000UL
49 /** Maximum number of drawables in the SAREA */
50 #define SAREA_MAX_DRAWABLES 256
52 #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
55 typedef struct drm_sarea_drawable
{
58 } drm_sarea_drawable_t
;
61 typedef struct drm_sarea_frame
{
66 unsigned int fullscreen
;
70 typedef struct drm_sarea
{
71 /** first thing is always the DRM locking structure */
73 /** \todo Use readers/writer lock for drm_sarea::drawable_lock */
74 drm_hw_lock_t drawable_lock
;
75 drm_sarea_drawable_t drawableTable
[SAREA_MAX_DRAWABLES
]; /**< drawables */
76 drm_sarea_frame_t frame
; /**< frame */
77 drm_context_t dummy_context
;
81 #endif /* _DRM_SAREA_H */