drm_io32.h revision 1450
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck/*
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck#ifndef _DRM_IO32_H_
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck#define _DRM_IO32_H_
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck#ifdef _MULTI_DATAMODEL
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck
058561cbaa119a6f2659bc27ef343e1b47266bb2jbecktypedef struct drm_version_32 {
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck int version_major; /* Major version */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck int version_minor; /* Minor version */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck int version_patchlevel; /* Patch level */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck uint32_t name_len; /* Length of name buffer */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck caddr32_t name; /* Name of driver */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck uint32_t date_len; /* Length of date buffer */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck caddr32_t date; /* User-space buffer to hold date */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck uint32_t desc_len; /* Length of desc buffer */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck caddr32_t desc; /* User-space buffer to hold desc */
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck} drm_version_32_t;
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck
058561cbaa119a6f2659bc27ef343e1b47266bb2jbecktypedef struct drm_unique_32 {
058561cbaa119a6f2659bc27ef343e1b47266bb2jbeck uint32_t unique_len; /* Length of unique */
caddr32_t unique; /* Unique name for driver instantiation */
} drm_unique_32_t;
typedef struct drm_ctx_priv_map_32 {
unsigned int ctx_id; /* Context requesting private mapping */
caddr32_t handle; /* Handle of map */
} drm_ctx_priv_map_32_t;
typedef struct drm_map_32 {
unsigned long long offset;
unsigned long long handle;
uint32_t size;
drm_map_type_t type;
drm_map_flags_t flags;
int mtrr;
} drm_map_32_t;
typedef struct drm_client_32 {
int idx; /* Which client desired? */
int auth; /* Is client authenticated? */
uint32_t pid; /* Process ID */
uint32_t uid; /* User ID */
uint32_t magic; /* Magic */
uint32_t iocs; /* Ioctl count */
} drm_client_32_t;
typedef struct drm_stats_32 {
uint32_t count;
struct {
uint32_t value;
drm_stat_type_t type;
} data[15];
} drm_stats_32_t;
typedef struct drm_buf_desc_32 {
int count; /* Number of buffers of this size */
int size; /* Size in bytes */
int low_mark; /* Low water mark */
int high_mark; /* High water mark */
enum drm_buf_flag flags;
/*
* Start address of where the AGP buffers are
* in the AGP aperture
*/
uint32_t agp_start;
} drm_buf_desc_32_t;
typedef struct drm_buf_free_32 {
int count;
uint32_t list;
} drm_buf_free_32_t;
/*
* Used by DRM_IOCTL_MAP_BUFS_32
*/
typedef struct drm_buf_pub_32 {
int idx; /* Index into the master buffer list */
int total; /* Buffer size */
int used; /* Amount of buffer in use (for DMA) */
uint32_t address; /* Address of buffer */
} drm_buf_pub_32_t;
typedef struct drm_buf_map_32 {
int count; /* Length of the buffer list */
#if defined(__cplusplus)
uint32_t c_virtual;
#else
uint32_t virtual; /* Mmap'd area in user-virtual */
#endif
uint32_t list; /* Buffer information */
int fd;
} drm_buf_map_32_t;
typedef struct drm_agp_mode_32 {
uint32_t mode; /* AGP mode */
} drm_agp_mode_32_t;
typedef struct drm_agp_buffer32 {
uint32_t size; /* In bytes -- will round to page boundary */
uint32_t handle; /* Used for binding / unbinding */
uint32_t type; /* Type of memory to allocate */
uint32_t physical; /* Physical used by i810 */
} drm_agp_buffer_32_t;
typedef struct drm_agp_binding_32 {
uint32_t handle; /* From drm_agp_buffer */
uint32_t offset; /* In bytes -- will round to page boundary */
} drm_agp_binding_32_t;
typedef struct drm_agp_info_32 {
int agp_version_major;
int agp_version_minor;
uint32_t mode;
uint32_t aperture_base;
uint32_t aperture_size;
uint32_t memory_allowed;
uint32_t memory_used;
unsigned short id_vendor;
unsigned short id_device;
} drm_agp_info_32_t;
typedef struct drm_scatter_gather_32 {
uint32_t size; /* In bytes -- will round to page boundary */
uint32_t handle; /* Used for mapping/unmapping */
} drm_scatter_gather_32_t;
typedef struct drm_ctx_res_32 {
int count;
caddr32_t contexts;
} drm_ctx_res_32_t;
struct drm_wait_vblank_request_32 {
drm_vblank_seq_type_t type;
unsigned int sequence;
unsigned long signal;
};
struct drm_wait_vblank_reply_32 {
drm_vblank_seq_type_t type;
unsigned int sequence;
long tval_sec;
long tval_usec;
};
/*
* DRM_IOCTL_WAIT_VBLANK ioctl argument type.
*
* \sa drmWaitVBlank().
*/
typedef union drm_wait_vblank_32 {
struct drm_wait_vblank_request_32 request;
struct drm_wait_vblank_reply_32 reply;
} drm_wait_vblank_32_t;
#endif /* _MULTI_DATAMODEL */
#endif /* _DRM_IO32_H_ */