4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #ifdef _MULTI_DATAMODEL
32 typedef struct drm_version_32
{
33 int version_major
; /* Major version */
34 int version_minor
; /* Minor version */
35 int version_patchlevel
; /* Patch level */
36 uint32_t name_len
; /* Length of name buffer */
37 caddr32_t name
; /* Name of driver */
38 uint32_t date_len
; /* Length of date buffer */
39 caddr32_t date
; /* User-space buffer to hold date */
40 uint32_t desc_len
; /* Length of desc buffer */
41 caddr32_t desc
; /* User-space buffer to hold desc */
44 typedef struct drm_unique_32
{
45 uint32_t unique_len
; /* Length of unique */
46 caddr32_t unique
; /* Unique name for driver instantiation */
49 typedef struct drm_ctx_priv_map_32
{
50 unsigned int ctx_id
; /* Context requesting private mapping */
51 caddr32_t handle
; /* Handle of map */
52 } drm_ctx_priv_map_32_t
;
54 typedef struct drm_map_32
{
55 unsigned long long offset
;
56 unsigned long long handle
;
59 drm_map_flags_t flags
;
64 typedef struct drm_client_32
{
65 int idx
; /* Which client desired? */
66 int auth
; /* Is client authenticated? */
67 uint32_t pid
; /* Process ID */
68 uint32_t uid
; /* User ID */
69 uint32_t magic
; /* Magic */
70 uint32_t iocs
; /* Ioctl count */
74 typedef struct drm_stats_32
{
83 typedef struct drm_buf_desc_32
{
84 int count
; /* Number of buffers of this size */
85 int size
; /* Size in bytes */
86 int low_mark
; /* Low water mark */
87 int high_mark
; /* High water mark */
91 * Start address of where the AGP buffers are
98 typedef struct drm_buf_free_32
{
104 * Used by DRM_IOCTL_MAP_BUFS_32
106 typedef struct drm_buf_pub_32
{
107 int idx
; /* Index into the master buffer list */
108 int total
; /* Buffer size */
109 int used
; /* Amount of buffer in use (for DMA) */
110 uint32_t address
; /* Address of buffer */
113 typedef struct drm_buf_map_32
{
114 int count
; /* Length of the buffer list */
115 #if defined(__cplusplus)
118 uint32_t virtual; /* Mmap'd area in user-virtual */
120 uint32_t list
; /* Buffer information */
124 typedef struct drm_agp_mode_32
{
125 uint32_t mode
; /* AGP mode */
128 typedef struct drm_agp_buffer32
{
129 uint32_t size
; /* In bytes -- will round to page boundary */
130 uint32_t handle
; /* Used for binding / unbinding */
131 uint32_t type
; /* Type of memory to allocate */
132 uint32_t physical
; /* Physical used by i810 */
133 } drm_agp_buffer_32_t
;
135 typedef struct drm_agp_binding_32
{
136 uint32_t handle
; /* From drm_agp_buffer */
137 uint32_t offset
; /* In bytes -- will round to page boundary */
138 } drm_agp_binding_32_t
;
140 typedef struct drm_agp_info_32
{
141 int agp_version_major
;
142 int agp_version_minor
;
144 uint32_t aperture_base
;
145 uint32_t aperture_size
;
146 uint32_t memory_allowed
;
147 uint32_t memory_used
;
148 unsigned short id_vendor
;
149 unsigned short id_device
;
152 typedef struct drm_scatter_gather_32
{
153 uint32_t size
; /* In bytes -- will round to page boundary */
154 uint32_t handle
; /* Used for mapping/unmapping */
155 } drm_scatter_gather_32_t
;
157 typedef struct drm_ctx_res_32
{
162 struct drm_wait_vblank_request_32
{
163 drm_vblank_seq_type_t type
;
167 struct drm_wait_vblank_reply_32
{
168 drm_vblank_seq_type_t type
;
175 * DRM_IOCTL_WAIT_VBLANK ioctl argument type.
177 * \sa drmWaitVBlank().
179 typedef union drm_wait_vblank_32
{
180 struct drm_wait_vblank_request_32 request
;
181 struct drm_wait_vblank_reply_32 reply
;
182 } drm_wait_vblank_32_t
;
185 #endif /* _MULTI_DATAMODEL */
187 #endif /* _DRM_IO32_H_ */