1 | /**
|
---|
2 | * \file sarea.h
|
---|
3 | * SAREA definitions.
|
---|
4 | *
|
---|
5 | * \author Kevin E. Martin <[email protected]>
|
---|
6 | * \author Jens Owen <[email protected]>
|
---|
7 | * \author Rickard E. (Rik) Faith <[email protected]>
|
---|
8 | */
|
---|
9 |
|
---|
10 | /*
|
---|
11 | * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
---|
12 | * Copyright 2000 VA Linux Systems, Inc.
|
---|
13 | * All Rights Reserved.
|
---|
14 | *
|
---|
15 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
16 | * copy of this software and associated documentation files (the
|
---|
17 | * "Software"), to deal in the Software without restriction, including
|
---|
18 | * without limitation the rights to use, copy, modify, merge, publish,
|
---|
19 | * distribute, sub license, and/or sell copies of the Software, and to
|
---|
20 | * permit persons to whom the Software is furnished to do so, subject to
|
---|
21 | * the following conditions:
|
---|
22 | *
|
---|
23 | * The above copyright notice and this permission notice (including the
|
---|
24 | * next paragraph) shall be included in all copies or substantial portions
|
---|
25 | * of the Software.
|
---|
26 | *
|
---|
27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
---|
28 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
---|
29 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
---|
30 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
---|
31 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
---|
32 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
---|
33 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
34 | */
|
---|
35 |
|
---|
36 |
|
---|
37 | #ifndef _SAREA_H_
|
---|
38 | #define _SAREA_H_
|
---|
39 |
|
---|
40 | #include "xf86drm.h"
|
---|
41 |
|
---|
42 | /* SAREA area needs to be at least a page */
|
---|
43 | #if defined(__alpha__)
|
---|
44 | #define SAREA_MAX 0x2000
|
---|
45 | #elif defined(__ia64__)
|
---|
46 | #define SAREA_MAX 0x10000 /* 64kB */
|
---|
47 | #else
|
---|
48 | /* Intel 830M driver needs at least 8k SAREA */
|
---|
49 | #define SAREA_MAX 0x2000
|
---|
50 | #endif
|
---|
51 |
|
---|
52 | #define SAREA_MAX_DRAWABLES 256
|
---|
53 |
|
---|
54 | #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
|
---|
55 |
|
---|
56 | /**
|
---|
57 | * SAREA per drawable information.
|
---|
58 | *
|
---|
59 | * \sa _XF86DRISAREA.
|
---|
60 | */
|
---|
61 | typedef struct _XF86DRISAREADrawable {
|
---|
62 | unsigned int stamp;
|
---|
63 | unsigned int flags;
|
---|
64 | } XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
|
---|
65 |
|
---|
66 | /**
|
---|
67 | * SAREA frame information.
|
---|
68 | *
|
---|
69 | * \sa _XF86DRISAREA.
|
---|
70 | */
|
---|
71 | typedef struct _XF86DRISAREAFrame {
|
---|
72 | unsigned int x;
|
---|
73 | unsigned int y;
|
---|
74 | unsigned int width;
|
---|
75 | unsigned int height;
|
---|
76 | unsigned int fullscreen;
|
---|
77 | } XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
|
---|
78 |
|
---|
79 | /**
|
---|
80 | * SAREA definition.
|
---|
81 | */
|
---|
82 | typedef struct _XF86DRISAREA {
|
---|
83 | /** first thing is always the DRM locking structure */
|
---|
84 | drmLock lock;
|
---|
85 | /** \todo Use readers/writer lock for drawable_lock */
|
---|
86 | drmLock drawable_lock;
|
---|
87 | XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
|
---|
88 | XF86DRISAREAFrameRec frame;
|
---|
89 | drm_context_t dummy_context;
|
---|
90 | } XF86DRISAREARec, *XF86DRISAREAPtr;
|
---|
91 |
|
---|
92 | #endif
|
---|