drm: remove drm_u64_t, replace with uint64_t everwhere

This might break something, stdint.h inclusion in drm.h maybe required
but I'm not sure yet what platforms have it what ones don't.
main
Dave Airlie 2007-07-18 09:42:06 +10:00
parent bff698d0ed
commit 6ad1df2176
11 changed files with 41 additions and 51 deletions

View File

@ -49,7 +49,6 @@
#include <sys/mman.h>
#include <sys/time.h>
#include <stdarg.h>
#include "drm.h"
/* Not all systems have MAP_FAILED defined */
#ifndef MAP_FAILED
@ -2698,7 +2697,7 @@ static void drmBOCopyReply(const struct drm_bo_info_rep *rep, drmBO *buf)
int drmBOCreate(int fd, unsigned long start, unsigned long size,
unsigned pageAlignment, void *user_buffer, drm_bo_type_t type,
drm_u64_t mask,
uint64_t mask,
unsigned hint, drmBO *buf)
{
struct drm_bo_create_arg arg;
@ -2879,7 +2878,7 @@ int drmBOUnmap(int fd, drmBO *buf)
}
int drmBOValidate(int fd, drmBO *buf,
drm_u64_t flags, drm_u64_t mask,
uint64_t flags, uint64_t mask,
unsigned hint)
{
struct drm_bo_op_arg arg;
@ -3057,7 +3056,7 @@ int drmBOValidateList(int fd, drmBOList *list)
struct drm_bo_op_arg *arg, *first;
struct drm_bo_op_req *req;
struct drm_bo_arg_rep *rep;
drm_u64_t *prevNext = NULL;
uint64_t *prevNext = NULL;
drmBO *buf;
int ret;
@ -3121,7 +3120,7 @@ int drmBOFenceList(int fd, drmBOList *list, unsigned fenceHandle)
struct drm_bo_op_arg *arg, *first;
struct drm_bo_op_req *req;
struct drm_bo_arg_rep *rep;
drm_u64_t *prevNext = NULL;
uint64_t *prevNext = NULL;
drmBO *buf;
unsigned fence_flags;
int ret;

View File

@ -36,6 +36,7 @@
#include <stdarg.h>
#include <sys/types.h>
#include <stdint.h>
#include <drm.h>
/* Defaults, if nothing set in xf86config */

View File

@ -74,7 +74,6 @@
#define HASH_MAIN 0
#if !HASH_MAIN
# include "drm.h"
# include "xf86drm.h"
#endif

View File

@ -77,7 +77,6 @@
#define RANDOM_MAIN 0
#if !RANDOM_MAIN
# include "drm.h"
# include "xf86drm.h"
#endif

View File

@ -44,7 +44,6 @@
#define SL_MAIN 0
#if !SL_MAIN
# include "drm.h"
# include "xf86drm.h"
#else
# include <sys/time.h>

View File

@ -107,9 +107,9 @@ typedef struct _drmBO
{
drm_bo_type_t type;
unsigned handle;
drm_u64_t mapHandle;
drm_u64_t flags;
drm_u64_t mask;
uint64_t mapHandle;
uint64_t flags;
uint64_t mask;
unsigned mapFlags;
unsigned long size;
unsigned long offset;
@ -180,7 +180,7 @@ extern int drmBOCreateList(int numTarget, drmBOList *list);
extern int drmBOCreate(int fd, unsigned long start, unsigned long size,
unsigned pageAlignment,void *user_buffer,
drm_bo_type_t type, drm_u64_t mask,
drm_bo_type_t type, uint64_t mask,
unsigned hint, drmBO *buf);
extern int drmBODestroy(int fd, drmBO *buf);
extern int drmBOReference(int fd, unsigned handle, drmBO *buf);
@ -188,8 +188,8 @@ extern int drmBOUnReference(int fd, drmBO *buf);
extern int drmBOMap(int fd, drmBO *buf, unsigned mapFlags, unsigned mapHint,
void **address);
extern int drmBOUnmap(int fd, drmBO *buf);
extern int drmBOValidate(int fd, drmBO *buf, drm_u64_t flags,
drm_u64_t mask, unsigned hint);
extern int drmBOValidate(int fd, drmBO *buf, uint64_t flags,
uint64_t mask, unsigned hint);
extern int drmBOFence(int fd, drmBO *buf, unsigned flags, unsigned fenceHandle);
extern int drmBOInfo(int fd, drmBO *buf);

View File

@ -551,7 +551,7 @@ struct drm_map_list {
struct list_head head; /**< list head */
struct drm_hash_item hash;
struct drm_map *map; /**< mapping */
drm_u64_t user_token;
uint64_t user_token;
struct drm_mm_node *file_offset_node;
};
@ -931,9 +931,9 @@ extern int drm_unbind_agp(DRM_AGP_MEM * handle);
extern void drm_free_memctl(size_t size);
extern int drm_alloc_memctl(size_t size);
extern void drm_query_memctl(drm_u64_t *cur_used,
drm_u64_t *low_threshold,
drm_u64_t *high_threshold);
extern void drm_query_memctl(uint64_t *cur_used,
uint64_t *low_threshold,
uint64_t *high_threshold);
extern void drm_init_memctl(size_t low_threshold,
size_t high_threshold,
size_t unit_size);

View File

@ -2629,7 +2629,7 @@ static int drm_bo_setup_vm_locked(struct drm_buffer_object * bo)
return -ENOMEM;
}
list->user_token = ((drm_u64_t) list->hash.key) << PAGE_SHIFT;
list->user_token = ((uint64_t) list->hash.key) << PAGE_SHIFT;
return 0;
}

View File

@ -38,9 +38,9 @@
static struct {
spinlock_t lock;
drm_u64_t cur_used;
drm_u64_t low_threshold;
drm_u64_t high_threshold;
uint64_t cur_used;
uint64_t low_threshold;
uint64_t high_threshold;
} drm_memctl = {
.lock = SPIN_LOCK_UNLOCKED
};
@ -82,9 +82,9 @@ void drm_free_memctl(size_t size)
}
EXPORT_SYMBOL(drm_free_memctl);
void drm_query_memctl(drm_u64_t *cur_used,
drm_u64_t *low_threshold,
drm_u64_t *high_threshold)
void drm_query_memctl(uint64_t *cur_used,
uint64_t *low_threshold,
uint64_t *high_threshold)
{
spin_lock(&drm_memctl.lock);
*cur_used = drm_memctl.cur_used;

View File

@ -436,9 +436,9 @@ static int drm__objects_info(char *buf, char **start, off_t offset, int request,
int len = 0;
struct drm_buffer_manager *bm = &dev->bm;
struct drm_fence_manager *fm = &dev->fm;
drm_u64_t used_mem;
drm_u64_t low_mem;
drm_u64_t high_mem;
uint64_t used_mem;
uint64_t low_mem;
uint64_t high_mem;
if (offset > DRM_PROC_LIMIT) {

View File

@ -127,16 +127,9 @@
#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
#if defined(__linux__)
#if defined(__KERNEL__)
typedef __u64 drm_u64_t;
#else
typedef unsigned long long drm_u64_t;
#endif
typedef unsigned int drm_handle_t;
#else
#include <sys/types.h>
typedef u_int64_t drm_u64_t;
typedef unsigned long drm_handle_t; /**< To mapped regions */
#endif
typedef unsigned int drm_context_t; /**< GLXContext handle */
@ -677,7 +670,7 @@ struct drm_fence_arg {
unsigned int flags;
unsigned int signaled;
unsigned int pad64;
drm_u64_t expand_pad[3]; /*Future expansion */
uint64_t expand_pad[3]; /*Future expansion */
};
/* Buffer permissions, referring to how the GPU uses the buffers.
@ -792,8 +785,8 @@ enum drm_bo_type {
};
struct drm_bo_info_req {
drm_u64_t mask;
drm_u64_t flags;
uint64_t mask;
uint64_t flags;
unsigned int handle;
unsigned int hint;
unsigned int fence_class;
@ -801,9 +794,9 @@ struct drm_bo_info_req {
};
struct drm_bo_create_req {
drm_u64_t mask;
drm_u64_t size;
drm_u64_t buffer_start;
uint64_t mask;
uint64_t size;
uint64_t buffer_start;
unsigned int hint;
unsigned int page_alignment;
enum drm_bo_type type;
@ -827,12 +820,12 @@ struct drm_bo_op_req {
#define DRM_BO_REP_BUSY 0x00000001
struct drm_bo_info_rep {
drm_u64_t flags;
drm_u64_t mask;
drm_u64_t size;
drm_u64_t offset;
drm_u64_t arg_handle;
drm_u64_t buffer_start;
uint64_t flags;
uint64_t mask;
uint64_t size;
uint64_t offset;
uint64_t arg_handle;
uint64_t buffer_start;
unsigned int handle;
unsigned int fence_flags;
unsigned int rep_flags;
@ -841,7 +834,7 @@ struct drm_bo_info_rep {
unsigned int hw_tile_stride;
unsigned int tile_info;
unsigned int pad64;
drm_u64_t expand_pad[4]; /*Future expansion */
uint64_t expand_pad[4]; /*Future expansion */
};
struct drm_bo_arg_rep {
@ -876,7 +869,7 @@ struct drm_bo_map_wait_idle_arg {
};
struct drm_bo_op_arg {
drm_u64_t next;
uint64_t next;
union {
struct drm_bo_op_req req;
struct drm_bo_arg_rep rep;
@ -905,8 +898,8 @@ struct drm_mm_init_arg {
unsigned int major;
unsigned int minor;
unsigned int mem_type;
drm_u64_t p_offset;
drm_u64_t p_size;
uint64_t p_offset;
uint64_t p_size;
};
/**