3 * \brief SAREA definitions.
5 * The SAREA is a memory region is shared by the DRM device, the X server and
8 * This file defines its layout in user space.
10 * \author Kevin E. Martin <kevin@precisioninsight.com>
11 * \author Jens Owen <jens@tungstengraphics.com>
12 * \author Rickard E. (Rik) Faith <faith@valinux.com>
16 * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
17 * Copyright 2000 VA Linux Systems, Inc.
18 * All Rights Reserved.
20 * Permission is hereby granted, free of charge, to any person obtaining a
21 * copy of this software and associated documentation files (the
22 * "Software"), to deal in the Software without restriction, including
23 * without limitation the rights to use, copy, modify, merge, publish,
24 * distribute, sub license, and/or sell copies of the Software, and to
25 * permit persons to whom the Software is furnished to do so, subject to
26 * the following conditions:
28 * The above copyright notice and this permission notice (including the
29 * next paragraph) shall be included in all copies or substantial portions
32 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
33 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
34 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
35 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
36 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
37 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
38 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 /* SAREA area needs to be at least a page */
47 #if defined(__alpha__)
48 #define SAREA_MAX 0x2000
49 #elif defined(__ia64__)
50 #define SAREA_MAX 0x10000 /* 64kB */
52 /* Intel 830M driver needs at least 8k SAREA */
53 #define SAREA_MAX 0x2000
56 #define SAREA_MAX_DRAWABLES 256
58 #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
61 * \brief SAREA per drawable information.
65 typedef struct _XF86DRISAREADrawable
{
68 } XF86DRISAREADrawableRec
, *XF86DRISAREADrawablePtr
;
71 * \brief SAREA frame information.
75 typedef struct _XF86DRISAREAFrame
{
80 unsigned int fullscreen
;
81 } XF86DRISAREAFrameRec
, *XF86DRISAREAFramePtr
;
84 * \brief SAREA definition.
86 typedef struct _XF86DRISAREA
{
87 /** first thing is always the DRM locking structure */
89 /** \todo Use readers/writer lock for drawable_lock */
90 drmLock drawable_lock
;
91 XF86DRISAREADrawableRec drawableTable
[SAREA_MAX_DRAWABLES
];
92 XF86DRISAREAFrameRec frame
;
93 drmContext dummy_context
;
94 } XF86DRISAREARec
, *XF86DRISAREAPtr
;