Commit 34a9f3ac authored by Dave Airlie's avatar Dave Airlie

Miscellaneous changes from DRM CVS

parent 9d136148
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
#define DRM_IOC_WRITE _IOC_WRITE #define DRM_IOC_WRITE _IOC_WRITE
#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE #define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
#elif defined(__FreeBSD__) || defined(__NetBSD__) #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) && defined(XFree86Server) #if defined(__FreeBSD__) && defined(IN_MODULE)
/* Prevent name collision when including sys/ioccom.h */ /* Prevent name collision when including sys/ioccom.h */
#undef ioctl #undef ioctl
#include <sys/ioccom.h> #include <sys/ioccom.h>
...@@ -130,6 +130,18 @@ typedef struct drm_tex_region { ...@@ -130,6 +130,18 @@ typedef struct drm_tex_region {
unsigned int age; unsigned int age;
} drm_tex_region_t; } drm_tex_region_t;
/**
* Hardware lock.
*
* The lock structure is a simple cache-line aligned integer. To avoid
* processor bus contention on a multiprocessor system, there should not be any
* other data stored in the same cache line.
*/
typedef struct drm_hw_lock {
__volatile__ unsigned int lock; /**< lock variable */
char padding[60]; /**< Pad to cache line */
} drm_hw_lock_t;
/** /**
* DRM_IOCTL_VERSION ioctl argument type. * DRM_IOCTL_VERSION ioctl argument type.
......
...@@ -467,18 +467,6 @@ typedef struct drm_buf_entry { ...@@ -467,18 +467,6 @@ typedef struct drm_buf_entry {
drm_freelist_t freelist; drm_freelist_t freelist;
} drm_buf_entry_t; } drm_buf_entry_t;
/**
* Hardware lock.
*
* The lock structure is a simple cache-line aligned integer. To avoid
* processor bus contention on a multiprocessor system, there should not be any
* other data stored in the same cache line.
*/
typedef struct drm_hw_lock {
__volatile__ unsigned int lock; /**< lock variable */
char padding[60]; /**< Pad to cache line */
} drm_hw_lock_t;
/** File private data */ /** File private data */
typedef struct drm_file { typedef struct drm_file {
int authenticated; int authenticated;
......
...@@ -109,6 +109,8 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp, ...@@ -109,6 +109,8 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
return -EBUSY; return -EBUSY;
if (!drm_agp->acquire) if (!drm_agp->acquire)
return -EINVAL; return -EINVAL;
if ( dev->agp->cant_use_aperture )
return -EINVAL;
if ((retcode = drm_agp->acquire())) if ((retcode = drm_agp->acquire()))
return retcode; return retcode;
dev->agp->acquired = 1; dev->agp->acquired = 1;
......
...@@ -775,7 +775,7 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp, ...@@ -775,7 +775,7 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp,
} }
#endif /* __HAVE_PCI_DMA */ #endif /* __HAVE_PCI_DMA */
#ifdef __HAVE_SG #if __HAVE_SG
int DRM(addbufs_sg)( struct inode *inode, struct file *filp, int DRM(addbufs_sg)( struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg ) unsigned int cmd, unsigned long arg )
{ {
......
...@@ -209,8 +209,8 @@ int DRM(stub_register)(const char *name, struct file_operations *fops, ...@@ -209,8 +209,8 @@ int DRM(stub_register)(const char *name, struct file_operations *fops,
ret2 = DRM(stub_info).info_register(name, fops, dev); ret2 = DRM(stub_info).info_register(name, fops, dev);
if (ret2) { if (ret2) {
if (!ret1) { if (!ret1) {
unregister_chrdev(DRM_MAJOR, "drm"); unregister_chrdev(DRM_MAJOR, "drm");
class_simple_destroy(drm_class); class_simple_destroy(drm_class);
} }
if (!i) if (!i)
inter_module_unregister("drm"); inter_module_unregister("drm");
......
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