Staging: fbtft: Fix bug in fbtft-core
[deliverable/linux.git] / include / uapi / drm / drm_sarea.h
CommitLineData
1da177e4 1/**
b5e89ed5 2 * \file drm_sarea.h
1da177e4
LT
3 * \brief SAREA definitions
4 *
96de0e25 5 * \author Michel Dänzer <michel@daenzer.net>
1da177e4
LT
6 */
7
8/*
9 * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
10 * All Rights Reserved.
11 *
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:
18 *
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
21 * Software.
22 *
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.
30 */
31
32#ifndef _DRM_SAREA_H_
33#define _DRM_SAREA_H_
34
c6da66df 35#include "drm.h"
1da177e4 36
ebbb0e5c
EV
37#if defined(__cplusplus)
38extern "C" {
39#endif
40
1da177e4
LT
41/* SAREA area needs to be at least a page */
42#if defined(__alpha__)
7c1c2871 43#define SAREA_MAX 0x2000U
fc7b8127
HC
44#elif defined(__mips__)
45#define SAREA_MAX 0x4000U
1da177e4 46#elif defined(__ia64__)
7c1c2871 47#define SAREA_MAX 0x10000U /* 64kB */
1da177e4
LT
48#else
49/* Intel 830M driver needs at least 8k SAREA */
7c1c2871 50#define SAREA_MAX 0x2000U
1da177e4
LT
51#endif
52
53/** Maximum number of drawables in the SAREA */
bc5f4523 54#define SAREA_MAX_DRAWABLES 256
1da177e4
LT
55
56#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
57
58/** SAREA drawable */
bd63cb52 59struct drm_sarea_drawable {
b5e89ed5
DA
60 unsigned int stamp;
61 unsigned int flags;
bd63cb52 62};
1da177e4
LT
63
64/** SAREA frame */
bd63cb52 65struct drm_sarea_frame {
b5e89ed5
DA
66 unsigned int x;
67 unsigned int y;
68 unsigned int width;
69 unsigned int height;
70 unsigned int fullscreen;
bd63cb52 71};
1da177e4
LT
72
73/** SAREA */
bd63cb52 74struct drm_sarea {
1da177e4 75 /** first thing is always the DRM locking structure */
c60ce623 76 struct drm_hw_lock lock;
1da177e4 77 /** \todo Use readers/writer lock for drm_sarea::drawable_lock */
c60ce623 78 struct drm_hw_lock drawable_lock;
bd63cb52
DA
79 struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */
80 struct drm_sarea_frame frame; /**< frame */
b5e89ed5 81 drm_context_t dummy_context;
bd63cb52
DA
82};
83
84#ifndef __KERNEL__
85typedef struct drm_sarea_drawable drm_sarea_drawable_t;
86typedef struct drm_sarea_frame drm_sarea_frame_t;
87typedef struct drm_sarea drm_sarea_t;
88#endif
1da177e4 89
ebbb0e5c
EV
90#if defined(__cplusplus)
91}
92#endif
93
b5e89ed5 94#endif /* _DRM_SAREA_H_ */
This page took 0.895766 seconds and 5 git commands to generate.