DRM 20050615 import

This commit is contained in:
Ian Romanick 2005-06-15 18:31:52 +00:00
parent 6e301a8e97
commit 68e856ff5b
5 changed files with 10 additions and 11 deletions

View File

@ -62,8 +62,6 @@
# ifdef DRM_USE_MALLOC # ifdef DRM_USE_MALLOC
# define _DRM_MALLOC malloc # define _DRM_MALLOC malloc
# define _DRM_FREE free # define _DRM_FREE free
extern int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *);
extern int xf86RemoveSIGIOHandler(int fd);
# else # else
# include <X11/Xlibint.h> # include <X11/Xlibint.h>
# define _DRM_MALLOC Xmalloc # define _DRM_MALLOC Xmalloc
@ -106,10 +104,6 @@ extern unsigned long _bus_base(void);
#define DRM_MAX_MINOR 16 #define DRM_MAX_MINOR 16
#endif #endif
#ifdef __linux__
#include <sys/sysmacros.h> /* for makedev() */
#endif
#ifndef makedev #ifndef makedev
/* This definition needs to be changed on /* This definition needs to be changed on
some systems if dev_t is a structure. some systems if dev_t is a structure.
@ -2268,7 +2262,7 @@ int drmCommandWriteRead(int fd, unsigned long drmCommandIndex,
return 0; return 0;
} }
#if defined(XFree86Server) || defined(DRM_USE_MALLOC) #if defined(XFree86Server)
static void drmSIGIOHandler(int interrupt, void *closure) static void drmSIGIOHandler(int interrupt, void *closure)
{ {
unsigned long key; unsigned long key;

View File

@ -76,6 +76,7 @@
# include <stdio.h> # include <stdio.h>
# include <stdlib.h> # include <stdlib.h>
#else #else
# include "drm.h"
# include "xf86drm.h" # include "xf86drm.h"
# ifdef XFree86LOADER # ifdef XFree86LOADER
# include "xf86.h" # include "xf86.h"

View File

@ -79,6 +79,7 @@
# include <stdio.h> # include <stdio.h>
# include <stdlib.h> # include <stdlib.h>
#else #else
# include "drm.h"
# include "xf86drm.h" # include "xf86drm.h"
# ifdef XFree86LOADER # ifdef XFree86LOADER
# include "xf86.h" # include "xf86.h"

View File

@ -47,6 +47,7 @@
# include <stdlib.h> # include <stdlib.h>
# include <sys/time.h> # include <sys/time.h>
#else #else
# include "drm.h"
# include "xf86drm.h" # include "xf86drm.h"
# ifdef XFree86LOADER # ifdef XFree86LOADER
# include "xf86.h" # include "xf86.h"

View File

@ -104,7 +104,8 @@ typedef enum {
DRM_REGISTERS = 1, /**< no caching, no core dump */ DRM_REGISTERS = 1, /**< no caching, no core dump */
DRM_SHM = 2, /**< shared, cached */ DRM_SHM = 2, /**< shared, cached */
DRM_AGP = 3, /**< AGP/GART */ DRM_AGP = 3, /**< AGP/GART */
DRM_SCATTER_GATHER = 4 /**< PCI scatter/gather */ DRM_SCATTER_GATHER = 4, /**< PCI scatter/gather */
DRM_CONSISTENT = 5 /**< PCI consistent */
} drmMapType; } drmMapType;
typedef enum { typedef enum {
@ -147,7 +148,8 @@ typedef enum {
typedef enum { typedef enum {
DRM_PAGE_ALIGN = 0x01, DRM_PAGE_ALIGN = 0x01,
DRM_AGP_BUFFER = 0x02, DRM_AGP_BUFFER = 0x02,
DRM_SG_BUFFER = 0x04 DRM_SG_BUFFER = 0x04,
DRM_FB_BUFFER = 0x08
} drmBufDescFlags; } drmBufDescFlags;
typedef enum { typedef enum {
@ -281,8 +283,8 @@ typedef struct _drmSetVersion {
#define __drm_dummy_lock(lock) (*(__volatile__ unsigned int *)lock) #define __drm_dummy_lock(lock) (*(__volatile__ unsigned int *)lock)
#define DRM_LOCK_HELD 0x80000000 /**< Hardware lock is held */ #define DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */
#define DRM_LOCK_CONT 0x40000000 /**< Hardware lock is contended */ #define DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */
#if defined(__GNUC__) && (__GNUC__ >= 2) #if defined(__GNUC__) && (__GNUC__ >= 2)
# if defined(__i386) || defined(__AMD64__) # if defined(__i386) || defined(__AMD64__)