Staging: gma500: fix up trailing whitespace errors
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / gma500 / psb_ttm_fence_user.h
blobfc13f89c6e12f0807743fd6bebdfe6334f73e737
1 /**************************************************************************
3 * Copyright 2006-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
4 * All Rights Reserved.
5 * Copyright (c) 2009 VMware, Inc., Palo Alto, CA., USA
6 * All Rights Reserved.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
12 * This program is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
17 * You should have received a copy of the GNU General Public License along with
18 * this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 **************************************************************************/
23 * Authors
24 * Thomas Hellström <thomas-at-tungstengraphics-dot-com>
27 #ifndef TTM_FENCE_USER_H
28 #define TTM_FENCE_USER_H
30 #if !defined(__KERNEL__) && !defined(_KERNEL)
31 #include <stdint.h>
32 #endif
34 #define TTM_FENCE_MAJOR 0
35 #define TTM_FENCE_MINOR 1
36 #define TTM_FENCE_PL 0
37 #define TTM_FENCE_DATE "080819"
39 /**
40 * struct ttm_fence_signaled_req
42 * @handle: Handle to the fence object. Input.
44 * @fence_type: Fence types we want to flush. Input.
46 * @flush: Boolean. Flush the indicated fence_types. Input.
48 * Argument to the TTM_FENCE_SIGNALED ioctl.
51 struct ttm_fence_signaled_req {
52 uint32_t handle;
53 uint32_t fence_type;
54 int32_t flush;
55 uint32_t pad64;
58 /**
59 * struct ttm_fence_rep
61 * @signaled_types: Fence type that has signaled.
63 * @fence_error: Command execution error.
64 * Hardware errors that are consequences of the execution
65 * of the command stream preceding the fence are reported
66 * here.
68 * Output argument to the TTM_FENCE_SIGNALED and
69 * TTM_FENCE_FINISH ioctls.
72 struct ttm_fence_rep {
73 uint32_t signaled_types;
74 uint32_t fence_error;
77 union ttm_fence_signaled_arg {
78 struct ttm_fence_signaled_req req;
79 struct ttm_fence_rep rep;
83 * Waiting mode flags for the TTM_FENCE_FINISH ioctl.
85 * TTM_FENCE_FINISH_MODE_LAZY: Allow for sleeps during polling
86 * wait.
88 * TTM_FENCE_FINISH_MODE_NO_BLOCK: Don't block waiting for GPU,
89 * but return -EBUSY if the buffer is busy.
92 #define TTM_FENCE_FINISH_MODE_LAZY (1 << 0)
93 #define TTM_FENCE_FINISH_MODE_NO_BLOCK (1 << 1)
95 /**
96 * struct ttm_fence_finish_req
98 * @handle: Handle to the fence object. Input.
100 * @fence_type: Fence types we want to finish.
102 * @mode: Wait mode.
104 * Input to the TTM_FENCE_FINISH ioctl.
107 struct ttm_fence_finish_req {
108 uint32_t handle;
109 uint32_t fence_type;
110 uint32_t mode;
111 uint32_t pad64;
114 union ttm_fence_finish_arg {
115 struct ttm_fence_finish_req req;
116 struct ttm_fence_rep rep;
120 * struct ttm_fence_unref_arg
122 * @handle: Handle to the fence object.
124 * Argument to the TTM_FENCE_UNREF ioctl.
127 struct ttm_fence_unref_arg {
128 uint32_t handle;
129 uint32_t pad64;
133 * Ioctl offsets frome extenstion start.
136 #define TTM_FENCE_SIGNALED 0x01
137 #define TTM_FENCE_FINISH 0x02
138 #define TTM_FENCE_UNREF 0x03
140 #endif