Commit 1d7f83d5 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Ingo Molnar

make drm headers use strict integer types

The drm headers are traditionally shared with BSD and
could not use the strict linux integer types. This is
over now, so we can use our own types now.

Cc: David Airlie <airlied@linux.ie>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ccef7ab5
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
#ifndef _DRM_H_ #ifndef _DRM_H_
#define _DRM_H_ #define _DRM_H_
#if defined(__KERNEL__) #include <linux/types.h>
#endif
#include <asm/ioctl.h> /* For _IO* macros */ #include <asm/ioctl.h> /* For _IO* macros */
#define DRM_IOCTL_NR(n) _IOC_NR(n) #define DRM_IOCTL_NR(n) _IOC_NR(n)
#define DRM_IOC_VOID _IOC_NONE #define DRM_IOC_VOID _IOC_NONE
...@@ -497,8 +496,8 @@ union drm_wait_vblank { ...@@ -497,8 +496,8 @@ union drm_wait_vblank {
* \sa drmModesetCtl(). * \sa drmModesetCtl().
*/ */
struct drm_modeset_ctl { struct drm_modeset_ctl {
uint32_t crtc; __u32 crtc;
uint32_t cmd; __u32 cmd;
}; };
/** /**
...@@ -574,29 +573,29 @@ struct drm_set_version { ...@@ -574,29 +573,29 @@ struct drm_set_version {
/** DRM_IOCTL_GEM_CLOSE ioctl argument type */ /** DRM_IOCTL_GEM_CLOSE ioctl argument type */
struct drm_gem_close { struct drm_gem_close {
/** Handle of the object to be closed. */ /** Handle of the object to be closed. */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
}; };
/** DRM_IOCTL_GEM_FLINK ioctl argument type */ /** DRM_IOCTL_GEM_FLINK ioctl argument type */
struct drm_gem_flink { struct drm_gem_flink {
/** Handle for the object being named */ /** Handle for the object being named */
uint32_t handle; __u32 handle;
/** Returned global name */ /** Returned global name */
uint32_t name; __u32 name;
}; };
/** DRM_IOCTL_GEM_OPEN ioctl argument type */ /** DRM_IOCTL_GEM_OPEN ioctl argument type */
struct drm_gem_open { struct drm_gem_open {
/** Name of object being opened */ /** Name of object being opened */
uint32_t name; __u32 name;
/** Returned handle for the object */ /** Returned handle for the object */
uint32_t handle; __u32 handle;
/** Returned size of the object */ /** Returned size of the object */
uint64_t size; __u64 size;
}; };
#include "drm_mode.h" #include "drm_mode.h"
......
...@@ -27,11 +27,8 @@ ...@@ -27,11 +27,8 @@
#ifndef _DRM_MODE_H #ifndef _DRM_MODE_H
#define _DRM_MODE_H #define _DRM_MODE_H
#if !defined(__KERNEL__) && !defined(_KERNEL)
#include <stdint.h>
#else
#include <linux/kernel.h> #include <linux/kernel.h>
#endif #include <linux/types.h>
#define DRM_DISPLAY_INFO_LEN 32 #define DRM_DISPLAY_INFO_LEN 32
#define DRM_CONNECTOR_NAME_LEN 32 #define DRM_CONNECTOR_NAME_LEN 32
...@@ -81,41 +78,41 @@ ...@@ -81,41 +78,41 @@
#define DRM_MODE_DITHERING_ON 1 #define DRM_MODE_DITHERING_ON 1
struct drm_mode_modeinfo { struct drm_mode_modeinfo {
uint32_t clock; __u32 clock;
uint16_t hdisplay, hsync_start, hsync_end, htotal, hskew; __u16 hdisplay, hsync_start, hsync_end, htotal, hskew;
uint16_t vdisplay, vsync_start, vsync_end, vtotal, vscan; __u16 vdisplay, vsync_start, vsync_end, vtotal, vscan;
uint32_t vrefresh; /* vertical refresh * 1000 */ __u32 vrefresh; /* vertical refresh * 1000 */
uint32_t flags; __u32 flags;
uint32_t type; __u32 type;
char name[DRM_DISPLAY_MODE_LEN]; char name[DRM_DISPLAY_MODE_LEN];
}; };
struct drm_mode_card_res { struct drm_mode_card_res {
uint64_t fb_id_ptr; __u64 fb_id_ptr;
uint64_t crtc_id_ptr; __u64 crtc_id_ptr;
uint64_t connector_id_ptr; __u64 connector_id_ptr;
uint64_t encoder_id_ptr; __u64 encoder_id_ptr;
uint32_t count_fbs; __u32 count_fbs;
uint32_t count_crtcs; __u32 count_crtcs;
uint32_t count_connectors; __u32 count_connectors;
uint32_t count_encoders; __u32 count_encoders;
uint32_t min_width, max_width; __u32 min_width, max_width;
uint32_t min_height, max_height; __u32 min_height, max_height;
}; };
struct drm_mode_crtc { struct drm_mode_crtc {
uint64_t set_connectors_ptr; __u64 set_connectors_ptr;
uint32_t count_connectors; __u32 count_connectors;
uint32_t crtc_id; /**< Id */ __u32 crtc_id; /**< Id */
uint32_t fb_id; /**< Id of framebuffer */ __u32 fb_id; /**< Id of framebuffer */
uint32_t x, y; /**< Position on the frameuffer */ __u32 x, y; /**< Position on the frameuffer */
uint32_t gamma_size; __u32 gamma_size;
uint32_t mode_valid; __u32 mode_valid;
struct drm_mode_modeinfo mode; struct drm_mode_modeinfo mode;
}; };
...@@ -126,13 +123,13 @@ struct drm_mode_crtc { ...@@ -126,13 +123,13 @@ struct drm_mode_crtc {
#define DRM_MODE_ENCODER_TVDAC 4 #define DRM_MODE_ENCODER_TVDAC 4
struct drm_mode_get_encoder { struct drm_mode_get_encoder {
uint32_t encoder_id; __u32 encoder_id;
uint32_t encoder_type; __u32 encoder_type;
uint32_t crtc_id; /**< Id of crtc */ __u32 crtc_id; /**< Id of crtc */
uint32_t possible_crtcs; __u32 possible_crtcs;
uint32_t possible_clones; __u32 possible_clones;
}; };
/* This is for connectors with multiple signal types. */ /* This is for connectors with multiple signal types. */
...@@ -161,23 +158,23 @@ struct drm_mode_get_encoder { ...@@ -161,23 +158,23 @@ struct drm_mode_get_encoder {
struct drm_mode_get_connector { struct drm_mode_get_connector {
uint64_t encoders_ptr; __u64 encoders_ptr;
uint64_t modes_ptr; __u64 modes_ptr;
uint64_t props_ptr; __u64 props_ptr;
uint64_t prop_values_ptr; __u64 prop_values_ptr;
uint32_t count_modes; __u32 count_modes;
uint32_t count_props; __u32 count_props;
uint32_t count_encoders; __u32 count_encoders;
uint32_t encoder_id; /**< Current Encoder */ __u32 encoder_id; /**< Current Encoder */
uint32_t connector_id; /**< Id */ __u32 connector_id; /**< Id */
uint32_t connector_type; __u32 connector_type;
uint32_t connector_type_id; __u32 connector_type_id;
uint32_t connection; __u32 connection;
uint32_t mm_width, mm_height; /**< HxW in millimeters */ __u32 mm_width, mm_height; /**< HxW in millimeters */
uint32_t subpixel; __u32 subpixel;
}; };
#define DRM_MODE_PROP_PENDING (1<<0) #define DRM_MODE_PROP_PENDING (1<<0)
...@@ -187,46 +184,46 @@ struct drm_mode_get_connector { ...@@ -187,46 +184,46 @@ struct drm_mode_get_connector {
#define DRM_MODE_PROP_BLOB (1<<4) #define DRM_MODE_PROP_BLOB (1<<4)
struct drm_mode_property_enum { struct drm_mode_property_enum {
uint64_t value; __u64 value;
char name[DRM_PROP_NAME_LEN]; char name[DRM_PROP_NAME_LEN];
}; };
struct drm_mode_get_property { struct drm_mode_get_property {
uint64_t values_ptr; /* values and blob lengths */ __u64 values_ptr; /* values and blob lengths */
uint64_t enum_blob_ptr; /* enum and blob id ptrs */ __u64 enum_blob_ptr; /* enum and blob id ptrs */
uint32_t prop_id; __u32 prop_id;
uint32_t flags; __u32 flags;
char name[DRM_PROP_NAME_LEN]; char name[DRM_PROP_NAME_LEN];
uint32_t count_values; __u32 count_values;
uint32_t count_enum_blobs; __u32 count_enum_blobs;
}; };
struct drm_mode_connector_set_property { struct drm_mode_connector_set_property {
uint64_t value; __u64 value;
uint32_t prop_id; __u32 prop_id;
uint32_t connector_id; __u32 connector_id;
}; };
struct drm_mode_get_blob { struct drm_mode_get_blob {
uint32_t blob_id; __u32 blob_id;
uint32_t length; __u32 length;
uint64_t data; __u64 data;
}; };
struct drm_mode_fb_cmd { struct drm_mode_fb_cmd {
uint32_t fb_id; __u32 fb_id;
uint32_t width, height; __u32 width, height;
uint32_t pitch; __u32 pitch;
uint32_t bpp; __u32 bpp;
uint32_t depth; __u32 depth;
/* driver specific handle */ /* driver specific handle */
uint32_t handle; __u32 handle;
}; };
struct drm_mode_mode_cmd { struct drm_mode_mode_cmd {
uint32_t connector_id; __u32 connector_id;
struct drm_mode_modeinfo mode; struct drm_mode_modeinfo mode;
}; };
...@@ -248,24 +245,24 @@ struct drm_mode_mode_cmd { ...@@ -248,24 +245,24 @@ struct drm_mode_mode_cmd {
* y * y
*/ */
struct drm_mode_cursor { struct drm_mode_cursor {
uint32_t flags; __u32 flags;
uint32_t crtc_id; __u32 crtc_id;
int32_t x; __s32 x;
int32_t y; __s32 y;
uint32_t width; __u32 width;
uint32_t height; __u32 height;
/* driver specific handle */ /* driver specific handle */
uint32_t handle; __u32 handle;
}; };
struct drm_mode_crtc_lut { struct drm_mode_crtc_lut {
uint32_t crtc_id; __u32 crtc_id;
uint32_t gamma_size; __u32 gamma_size;
/* pointers to arrays */ /* pointers to arrays */
uint64_t red; __u64 red;
uint64_t green; __u64 green;
uint64_t blue; __u64 blue;
}; };
#endif #endif
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
/* Please note that modifications to all structs defined here are /* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints. * subject to backwards-compatibility constraints.
*/ */
#include <linux/types.h>
#include "drm.h" #include "drm.h"
/* Each region is a minimum of 16k, and there are at most 255 of them. /* Each region is a minimum of 16k, and there are at most 255 of them.
...@@ -116,15 +116,15 @@ typedef struct _drm_i915_sarea { ...@@ -116,15 +116,15 @@ typedef struct _drm_i915_sarea {
/* fill out some space for old userspace triple buffer */ /* fill out some space for old userspace triple buffer */
drm_handle_t unused_handle; drm_handle_t unused_handle;
uint32_t unused1, unused2, unused3; __u32 unused1, unused2, unused3;
/* buffer object handles for static buffers. May change /* buffer object handles for static buffers. May change
* over the lifetime of the client. * over the lifetime of the client.
*/ */
uint32_t front_bo_handle; __u32 front_bo_handle;
uint32_t back_bo_handle; __u32 back_bo_handle;
uint32_t unused_bo_handle; __u32 unused_bo_handle;
uint32_t depth_bo_handle; __u32 depth_bo_handle;
} drm_i915_sarea_t; } drm_i915_sarea_t;
...@@ -325,7 +325,7 @@ typedef struct drm_i915_vblank_swap { ...@@ -325,7 +325,7 @@ typedef struct drm_i915_vblank_swap {
} drm_i915_vblank_swap_t; } drm_i915_vblank_swap_t;
typedef struct drm_i915_hws_addr { typedef struct drm_i915_hws_addr {
uint64_t addr; __u64 addr;
} drm_i915_hws_addr_t; } drm_i915_hws_addr_t;
struct drm_i915_gem_init { struct drm_i915_gem_init {
...@@ -333,12 +333,12 @@ struct drm_i915_gem_init { ...@@ -333,12 +333,12 @@ struct drm_i915_gem_init {
* Beginning offset in the GTT to be managed by the DRM memory * Beginning offset in the GTT to be managed by the DRM memory
* manager. * manager.
*/ */
uint64_t gtt_start; __u64 gtt_start;
/** /**
* Ending offset in the GTT to be managed by the DRM memory * Ending offset in the GTT to be managed by the DRM memory
* manager. * manager.
*/ */
uint64_t gtt_end; __u64 gtt_end;
}; };
struct drm_i915_gem_create { struct drm_i915_gem_create {
...@@ -347,94 +347,94 @@ struct drm_i915_gem_create { ...@@ -347,94 +347,94 @@ struct drm_i915_gem_create {
* *
* The (page-aligned) allocated size for the object will be returned. * The (page-aligned) allocated size for the object will be returned.
*/ */
uint64_t size; __u64 size;
/** /**
* Returned handle for the object. * Returned handle for the object.
* *
* Object handles are nonzero. * Object handles are nonzero.
*/ */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
}; };
struct drm_i915_gem_pread { struct drm_i915_gem_pread {
/** Handle for the object being read. */ /** Handle for the object being read. */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
/** Offset into the object to read from */ /** Offset into the object to read from */
uint64_t offset; __u64 offset;
/** Length of data to read */ /** Length of data to read */
uint64_t size; __u64 size;
/** /**
* Pointer to write the data into. * Pointer to write the data into.
* *
* This is a fixed-size type for 32/64 compatibility. * This is a fixed-size type for 32/64 compatibility.
*/ */
uint64_t data_ptr; __u64 data_ptr;
}; };
struct drm_i915_gem_pwrite { struct drm_i915_gem_pwrite {
/** Handle for the object being written to. */ /** Handle for the object being written to. */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
/** Offset into the object to write to */ /** Offset into the object to write to */
uint64_t offset; __u64 offset;
/** Length of data to write */ /** Length of data to write */
uint64_t size; __u64 size;
/** /**
* Pointer to read the data from. * Pointer to read the data from.
* *
* This is a fixed-size type for 32/64 compatibility. * This is a fixed-size type for 32/64 compatibility.
*/ */
uint64_t data_ptr; __u64 data_ptr;
}; };
struct drm_i915_gem_mmap { struct drm_i915_gem_mmap {
/** Handle for the object being mapped. */ /** Handle for the object being mapped. */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
/** Offset in the object to map. */ /** Offset in the object to map. */
uint64_t offset; __u64 offset;
/** /**
* Length of data to map. * Length of data to map.
* *
* The value will be page-aligned. * The value will be page-aligned.
*/ */
uint64_t size; __u64 size;
/** /**
* Returned pointer the data was mapped at. * Returned pointer the data was mapped at.
* *
* This is a fixed-size type for 32/64 compatibility. * This is a fixed-size type for 32/64 compatibility.
*/ */
uint64_t addr_ptr; __u64 addr_ptr;
}; };
struct drm_i915_gem_mmap_gtt { struct drm_i915_gem_mmap_gtt {
/** Handle for the object being mapped. */ /** Handle for the object being mapped. */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
/** /**
* Fake offset to use for subsequent mmap call * Fake offset to use for subsequent mmap call
* *
* This is a fixed-size type for 32/64 compatibility. * This is a fixed-size type for 32/64 compatibility.
*/ */
uint64_t offset; __u64 offset;
}; };
struct drm_i915_gem_set_domain { struct drm_i915_gem_set_domain {
/** Handle for the object */ /** Handle for the object */
uint32_t handle; __u32 handle;
/** New read domains */ /** New read domains */
uint32_t read_domains; __u32 read_domains;
/** New write domain */ /** New write domain */
uint32_t write_domain; __u32 write_domain;
}; };
struct drm_i915_gem_sw_finish { struct drm_i915_gem_sw_finish {
/** Handle for the object */ /** Handle for the object */
uint32_t handle; __u32 handle;
}; };
struct drm_i915_gem_relocation_entry { struct drm_i915_gem_relocation_entry {
...@@ -446,16 +446,16 @@ struct drm_i915_gem_relocation_entry { ...@@ -446,16 +446,16 @@ struct drm_i915_gem_relocation_entry {
* a relocation list for state buffers and not re-write it per * a relocation list for state buffers and not re-write it per
* exec using the buffer. * exec using the buffer.
*/ */
uint32_t target_handle; __u32 target_handle;
/** /**
* Value to be added to the offset of the target buffer to make up * Value to be added to the offset of the target buffer to make up
* the relocation entry. * the relocation entry.
*/ */
uint32_t delta; __u32 delta;
/** Offset in the buffer the relocation entry will be written into */ /** Offset in the buffer the relocation entry will be written into */
uint64_t offset; __u64 offset;
/** /**
* Offset value of the target buffer that the relocation entry was last * Offset value of the target buffer that the relocation entry was last
...@@ -465,12 +465,12 @@ struct drm_i915_gem_relocation_entry { ...@@ -465,12 +465,12 @@ struct drm_i915_gem_relocation_entry {
* and writing the relocation. This value is written back out by * and writing the relocation. This value is written back out by
* the execbuffer ioctl when the relocation is written. * the execbuffer ioctl when the relocation is written.
*/ */
uint64_t presumed_offset; __u64 presumed_offset;
/** /**
* Target memory domains read by this operation. * Target memory domains read by this operation.
*/ */
uint32_t read_domains; __u32 read_domains;
/** /**
* Target memory domains written by this operation. * Target memory domains written by this operation.
...@@ -479,7 +479,7 @@ struct drm_i915_gem_relocation_entry { ...@@ -479,7 +479,7 @@ struct drm_i915_gem_relocation_entry {
* execbuffer operation, so that where there are conflicts, * execbuffer operation, so that where there are conflicts,
* the application will get -EINVAL back. * the application will get -EINVAL back.
*/ */
uint32_t write_domain; __u32 write_domain;
}; };
/** @{ /** @{
...@@ -510,24 +510,24 @@ struct drm_i915_gem_exec_object { ...@@ -510,24 +510,24 @@ struct drm_i915_gem_exec_object {
* User's handle for a buffer to be bound into the GTT for this * User's handle for a buffer to be bound into the GTT for this
* operation. * operation.
*/ */
uint32_t handle; __u32 handle;
/** Number of relocations to be performed on this buffer */ /** Number of relocations to be performed on this buffer */
uint32_t relocation_count; __u32 relocation_count;
/** /**
* Pointer to array of struct drm_i915_gem_relocation_entry containing * Pointer to array of struct drm_i915_gem_relocation_entry containing
* the relocations to be performed in this buffer. * the relocations to be performed in this buffer.
*/ */
uint64_t relocs_ptr; __u64 relocs_ptr;
/** Required alignment in graphics aperture */ /** Required alignment in graphics aperture */
uint64_t alignment; __u64 alignment;
/** /**
* Returned value of the updated offset of the object, for future * Returned value of the updated offset of the object, for future
* presumed_offset writes. * presumed_offset writes.
*/ */
uint64_t offset; __u64 offset;
}; };
struct drm_i915_gem_execbuffer { struct drm_i915_gem_execbuffer {
...@@ -541,44 +541,44 @@ struct drm_i915_gem_execbuffer { ...@@ -541,44 +541,44 @@ struct drm_i915_gem_execbuffer {
* a buffer is performing refer to buffers that have already appeared * a buffer is performing refer to buffers that have already appeared
* in the validate list. * in the validate list.
*/ */
uint64_t buffers_ptr; __u64 buffers_ptr;
uint32_t buffer_count; __u32 buffer_count;
/** Offset in the batchbuffer to start execution from. */ /** Offset in the batchbuffer to start execution from. */
uint32_t batch_start_offset; __u32 batch_start_offset;
/** Bytes used in batchbuffer from batch_start_offset */ /** Bytes used in batchbuffer from batch_start_offset */
uint32_t batch_len; __u32 batch_len;
uint32_t DR1; __u32 DR1;
uint32_t DR4; __u32 DR4;
uint32_t num_cliprects; __u32 num_cliprects;
/** This is a struct drm_clip_rect *cliprects */ /** This is a struct drm_clip_rect *cliprects */
uint64_t cliprects_ptr; __u64 cliprects_ptr;
}; };
struct drm_i915_gem_pin { struct drm_i915_gem_pin {
/** Handle of the buffer to be pinned. */ /** Handle of the buffer to be pinned. */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
/** alignment required within the aperture */ /** alignment required within the aperture */
uint64_t alignment; __u64 alignment;
/** Returned GTT offset of the buffer. */ /** Returned GTT offset of the buffer. */
uint64_t offset; __u64 offset;
}; };
struct drm_i915_gem_unpin { struct drm_i915_gem_unpin {
/** Handle of the buffer to be unpinned. */ /** Handle of the buffer to be unpinned. */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
}; };
struct drm_i915_gem_busy { struct drm_i915_gem_busy {
/** Handle of the buffer to check for busy */ /** Handle of the buffer to check for busy */
uint32_t handle; __u32 handle;
/** Return busy status (1 if busy, 0 if idle) */ /** Return busy status (1 if busy, 0 if idle) */
uint32_t busy; __u32 busy;
}; };
#define I915_TILING_NONE 0 #define I915_TILING_NONE 0
...@@ -595,7 +595,7 @@ struct drm_i915_gem_busy { ...@@ -595,7 +595,7 @@ struct drm_i915_gem_busy {
struct drm_i915_gem_set_tiling { struct drm_i915_gem_set_tiling {
/** Handle of the buffer to have its tiling state updated */ /** Handle of the buffer to have its tiling state updated */
uint32_t handle; __u32 handle;
/** /**
* Tiling mode for the object (I915_TILING_NONE, I915_TILING_X, * Tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
...@@ -609,47 +609,47 @@ struct drm_i915_gem_set_tiling { ...@@ -609,47 +609,47 @@ struct drm_i915_gem_set_tiling {
* *
* Buffer contents become undefined when changing tiling_mode. * Buffer contents become undefined when changing tiling_mode.
*/ */
uint32_t tiling_mode; __u32 tiling_mode;
/** /**
* Stride in bytes for the object when in I915_TILING_X or * Stride in bytes for the object when in I915_TILING_X or
* I915_TILING_Y. * I915_TILING_Y.
*/ */
uint32_t stride; __u32 stride;
/** /**
* Returned address bit 6 swizzling required for CPU access through * Returned address bit 6 swizzling required for CPU access through
* mmap mapping. * mmap mapping.
*/ */
uint32_t swizzle_mode; __u32 swizzle_mode;
}; };
struct drm_i915_gem_get_tiling { struct drm_i915_gem_get_tiling {
/** Handle of the buffer to get tiling state for. */ /** Handle of the buffer to get tiling state for. */
uint32_t handle; __u32 handle;
/** /**
* Current tiling mode for the object (I915_TILING_NONE, I915_TILING_X, * Current tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
* I915_TILING_Y). * I915_TILING_Y).
*/ */
uint32_t tiling_mode; __u32 tiling_mode;
/** /**
* Returned address bit 6 swizzling required for CPU access through * Returned address bit 6 swizzling required for CPU access through
* mmap mapping. * mmap mapping.
*/ */
uint32_t swizzle_mode; __u32 swizzle_mode;
}; };
struct drm_i915_gem_get_aperture { struct drm_i915_gem_get_aperture {
/** Total size of the aperture used by i915_gem_execbuffer, in bytes */ /** Total size of the aperture used by i915_gem_execbuffer, in bytes */
uint64_t aper_size; __u64 aper_size;
/** /**
* Available space in the aperture used by i915_gem_execbuffer, in * Available space in the aperture used by i915_gem_execbuffer, in
* bytes * bytes
*/ */
uint64_t aper_available_size; __u64 aper_available_size;
}; };
#endif /* _I915_DRM_H_ */ #endif /* _I915_DRM_H_ */
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#ifndef __MGA_DRM_H__ #ifndef __MGA_DRM_H__
#define __MGA_DRM_H__ #define __MGA_DRM_H__
#include <linux/types.h>
/* WARNING: If you change any of these defines, make sure to change the /* WARNING: If you change any of these defines, make sure to change the
* defines in the Xserver file (mga_sarea.h) * defines in the Xserver file (mga_sarea.h)
*/ */
...@@ -255,8 +257,8 @@ typedef struct _drm_mga_sarea { ...@@ -255,8 +257,8 @@ typedef struct _drm_mga_sarea {
#define DRM_IOCTL_MGA_ILOAD DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_ILOAD, drm_mga_iload_t) #define DRM_IOCTL_MGA_ILOAD DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_ILOAD, drm_mga_iload_t)
#define DRM_IOCTL_MGA_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_BLIT, drm_mga_blit_t) #define DRM_IOCTL_MGA_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_BLIT, drm_mga_blit_t)
#define DRM_IOCTL_MGA_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_GETPARAM, drm_mga_getparam_t) #define DRM_IOCTL_MGA_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_GETPARAM, drm_mga_getparam_t)
#define DRM_IOCTL_MGA_SET_FENCE DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_SET_FENCE, uint32_t) #define DRM_IOCTL_MGA_SET_FENCE DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_SET_FENCE, __u32)
#define DRM_IOCTL_MGA_WAIT_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_WAIT_FENCE, uint32_t) #define DRM_IOCTL_MGA_WAIT_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_WAIT_FENCE, __u32)
#define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t) #define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t)
typedef struct _drm_mga_warp_index { typedef struct _drm_mga_warp_index {
...@@ -310,7 +312,7 @@ typedef struct drm_mga_dma_bootstrap { ...@@ -310,7 +312,7 @@ typedef struct drm_mga_dma_bootstrap {
*/ */
/*@{ */ /*@{ */
unsigned long texture_handle; /**< Handle used to map AGP textures. */ unsigned long texture_handle; /**< Handle used to map AGP textures. */
uint32_t texture_size; /**< Size of the AGP texture region. */ __u32 texture_size; /**< Size of the AGP texture region. */
/*@} */ /*@} */
/** /**
...@@ -319,7 +321,7 @@ typedef struct drm_mga_dma_bootstrap { ...@@ -319,7 +321,7 @@ typedef struct drm_mga_dma_bootstrap {
* On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
* filled in with the actual AGP mode. If AGP was not available * filled in with the actual AGP mode. If AGP was not available
*/ */
uint32_t primary_size; __u32 primary_size;
/** /**
* Requested number of secondary DMA buffers. * Requested number of secondary DMA buffers.
...@@ -329,7 +331,7 @@ typedef struct drm_mga_dma_bootstrap { ...@@ -329,7 +331,7 @@ typedef struct drm_mga_dma_bootstrap {
* allocated. Particularly when PCI DMA is used, this may be * allocated. Particularly when PCI DMA is used, this may be
* (subtantially) less than the number requested. * (subtantially) less than the number requested.
*/ */
uint32_t secondary_bin_count; __u32 secondary_bin_count;
/** /**
* Requested size of each secondary DMA buffer. * Requested size of each secondary DMA buffer.
...@@ -338,7 +340,7 @@ typedef struct drm_mga_dma_bootstrap { ...@@ -338,7 +340,7 @@ typedef struct drm_mga_dma_bootstrap {
* dma_mga_dma_bootstrap::secondary_bin_count, it is \b not allowed * dma_mga_dma_bootstrap::secondary_bin_count, it is \b not allowed
* to reduce dma_mga_dma_bootstrap::secondary_bin_size. * to reduce dma_mga_dma_bootstrap::secondary_bin_size.
*/ */
uint32_t secondary_bin_size; __u32 secondary_bin_size;
/** /**
* Bit-wise mask of AGPSTAT2_* values. Currently only \c AGPSTAT2_1X, * Bit-wise mask of AGPSTAT2_* values. Currently only \c AGPSTAT2_1X,
...@@ -350,12 +352,12 @@ typedef struct drm_mga_dma_bootstrap { ...@@ -350,12 +352,12 @@ typedef struct drm_mga_dma_bootstrap {
* filled in with the actual AGP mode. If AGP was not available * filled in with the actual AGP mode. If AGP was not available
* (i.e., PCI DMA was used), this value will be zero. * (i.e., PCI DMA was used), this value will be zero.
*/ */
uint32_t agp_mode; __u32 agp_mode;
/** /**
* Desired AGP GART size, measured in megabytes. * Desired AGP GART size, measured in megabytes.
*/ */
uint8_t agp_size; __u8 agp_size;
} drm_mga_dma_bootstrap_t; } drm_mga_dma_bootstrap_t;
typedef struct drm_mga_clear { typedef struct drm_mga_clear {
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#ifndef __RADEON_DRM_H__ #ifndef __RADEON_DRM_H__
#define __RADEON_DRM_H__ #define __RADEON_DRM_H__
#include <linux/types.h>
/* WARNING: If you change any of these defines, make sure to change the /* WARNING: If you change any of these defines, make sure to change the
* defines in the X server file (radeon_sarea.h) * defines in the X server file (radeon_sarea.h)
*/ */
...@@ -722,7 +724,7 @@ typedef struct drm_radeon_irq_wait { ...@@ -722,7 +724,7 @@ typedef struct drm_radeon_irq_wait {
typedef struct drm_radeon_setparam { typedef struct drm_radeon_setparam {
unsigned int param; unsigned int param;
int64_t value; __s64 value;
} drm_radeon_setparam_t; } drm_radeon_setparam_t;
#define RADEON_SETPARAM_FB_LOCATION 1 /* determined framebuffer location */ #define RADEON_SETPARAM_FB_LOCATION 1 /* determined framebuffer location */
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#ifndef _VIA_DRM_H_ #ifndef _VIA_DRM_H_
#define _VIA_DRM_H_ #define _VIA_DRM_H_
#include <linux/types.h>
/* WARNING: These defines must be the same as what the Xserver uses. /* WARNING: These defines must be the same as what the Xserver uses.
* if you change them, you must change the defines in the Xserver. * if you change them, you must change the defines in the Xserver.
*/ */
...@@ -114,19 +116,19 @@ ...@@ -114,19 +116,19 @@
#define VIA_MEM_UNKNOWN 4 #define VIA_MEM_UNKNOWN 4
typedef struct { typedef struct {
uint32_t offset; __u32 offset;
uint32_t size; __u32 size;
} drm_via_agp_t; } drm_via_agp_t;
typedef struct { typedef struct {
uint32_t offset; __u32 offset;
uint32_t size; __u32 size;
} drm_via_fb_t; } drm_via_fb_t;
typedef struct { typedef struct {
uint32_t context; __u32 context;
uint32_t type; __u32 type;
uint32_t size; __u32 size;
unsigned long index; unsigned long index;
unsigned long offset; unsigned long offset;
} drm_via_mem_t; } drm_via_mem_t;
...@@ -148,9 +150,9 @@ typedef struct _drm_via_futex { ...@@ -148,9 +150,9 @@ typedef struct _drm_via_futex {
VIA_FUTEX_WAIT = 0x00, VIA_FUTEX_WAIT = 0x00,
VIA_FUTEX_WAKE = 0X01 VIA_FUTEX_WAKE = 0X01
} func; } func;
uint32_t ms; __u32 ms;
uint32_t lock; __u32 lock;
uint32_t val; __u32 val;
} drm_via_futex_t; } drm_via_futex_t;
typedef struct _drm_via_dma_init { typedef struct _drm_via_dma_init {
...@@ -211,7 +213,7 @@ typedef struct _drm_via_cmdbuf_size { ...@@ -211,7 +213,7 @@ typedef struct _drm_via_cmdbuf_size {
VIA_CMDBUF_LAG = 0x02 VIA_CMDBUF_LAG = 0x02
} func; } func;
int wait; int wait;
uint32_t size; __u32 size;
} drm_via_cmdbuf_size_t; } drm_via_cmdbuf_size_t;
typedef enum { typedef enum {
...@@ -236,8 +238,8 @@ enum drm_via_irqs { ...@@ -236,8 +238,8 @@ enum drm_via_irqs {
struct drm_via_wait_irq_request { struct drm_via_wait_irq_request {
unsigned irq; unsigned irq;
via_irq_seq_type_t type; via_irq_seq_type_t type;
uint32_t sequence; __u32 sequence;
uint32_t signal; __u32 signal;
}; };
typedef union drm_via_irqwait { typedef union drm_via_irqwait {
...@@ -246,7 +248,7 @@ typedef union drm_via_irqwait { ...@@ -246,7 +248,7 @@ typedef union drm_via_irqwait {
} drm_via_irqwait_t; } drm_via_irqwait_t;
typedef struct drm_via_blitsync { typedef struct drm_via_blitsync {
uint32_t sync_handle; __u32 sync_handle;
unsigned engine; unsigned engine;
} drm_via_blitsync_t; } drm_via_blitsync_t;
...@@ -257,16 +259,16 @@ typedef struct drm_via_blitsync { ...@@ -257,16 +259,16 @@ typedef struct drm_via_blitsync {
*/ */
typedef struct drm_via_dmablit { typedef struct drm_via_dmablit {
uint32_t num_lines; __u32 num_lines;
uint32_t line_length; __u32 line_length;
uint32_t fb_addr; __u32 fb_addr;
uint32_t fb_stride; __u32 fb_stride;
unsigned char *mem_addr; unsigned char *mem_addr;
uint32_t mem_stride; __u32 mem_stride;
uint32_t flags; __u32 flags;
int to_fb; int to_fb;
drm_via_blitsync_t sync; drm_via_blitsync_t sync;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment