1 /****************************************************************************
2 * Copyright (C) 2003-2006 by XGI Technology, Taiwan.
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation on the rights to use, copy, modify, merge,
10 * publish, distribute, sublicense, and/or sell copies of the Software,
11 * and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial
16 * portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 * XGI AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 ***************************************************************************/
27 #ifndef _XGI_CMDLIST_H_
28 #define _XGI_CMDLIST_H_
30 struct xgi_cmdring_info {
32 * Kernel space pointer to the base of the command ring.
37 * Size, in bytes, of the command ring.
42 * Base address of the command ring from the hardware's PoV.
44 unsigned int ring_hw_base;
49 * Offset, in bytes, from the start of the ring to the next available
50 * location to store a command.
52 unsigned int ring_offset;
56 extern int xgi_cmdlist_initialize(struct xgi_info * info, size_t size,
57 struct drm_file * filp);
59 extern int xgi_state_change(struct xgi_info * info, unsigned int to,
62 extern void xgi_cmdlist_cleanup(struct xgi_info * info);
64 extern void xgi_emit_irq(struct xgi_info * info);
66 #endif /* _XGI_CMDLIST_H_ */