diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-08-26 00:16:01 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-08-26 00:16:01 +0000 |
commit | 55bea952b326b88f2fa6502321f605f96ee9be66 (patch) | |
tree | 9de73f0fa9527d8e3954808e7cb30493f166d1ac /bsd-core/drmP.h | |
parent | 9942cad1f6078c24bb69a126795635b2f34d65b5 (diff) |
[1] Fix BSD DRM for the nonroot changes. [2] Don't attempt to acquire the
DMA lock in a non-DMA driver, as it will be uninitialized.
Submitted by: [1] jkim (minor changes by me)
Diffstat (limited to 'bsd-core/drmP.h')
-rw-r--r-- | bsd-core/drmP.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h index 7e16fe66..d5907355 100644 --- a/bsd-core/drmP.h +++ b/bsd-core/drmP.h @@ -229,7 +229,8 @@ enum { int flags, DRM_STRUCTPROC *p, DRMFILE filp #define PAGE_ALIGN(addr) round_page(addr) -#define DRM_SUSER(p) suser(p) +/* DRM_SUSER returns true if the user is superuser */ +#define DRM_SUSER(p) (suser(p) == 0) #define DRM_AGP_FIND_DEVICE() agp_find_device() #define DRM_MTRR_WC MDF_WRITECOMBINE #define jiffies ticks @@ -249,7 +250,8 @@ enum { #define CDEV_MAJOR 34 #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) -#define DRM_SUSER(p) suser(p->p_ucred, &p->p_acflag) +/* DRM_SUSER returns true if the user is superuser */ +#define DRM_SUSER(p) (suser(p->p_ucred, &p->p_acflag) == 0) #define DRM_AGP_FIND_DEVICE() agp_find_device(0) #define DRM_MTRR_WC MTRR_TYPE_WC #define jiffies hardclock_ticks @@ -524,6 +526,7 @@ typedef TAILQ_HEAD(drm_file_list, drm_file) drm_file_list_t; struct drm_file { TAILQ_ENTRY(drm_file) link; int authenticated; + int master; int minor; pid_t pid; uid_t uid; @@ -585,6 +588,7 @@ typedef struct drm_agp_head { typedef struct drm_sg_mem { unsigned long handle; + void *virtual; int pages; dma_addr_t *busaddr; drm_dma_handle_t *dmah; /* Handle to PCI memory for ATI PCIGART table */ |