diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-09-07 20:17:49 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-09-07 20:17:49 +0200 |
commit | b257bbe48a0851d27150d21cd124af2dc3e53385 (patch) | |
tree | c230ae915264a7249a23c0f858265cfe12622554 /bsd-core/drm_vm.c | |
parent | cbf7c5cace00d23f6b694977aa058026b9d39e9f (diff) | |
parent | 06bb07259531d10df2c1979919af899e3812057b (diff) |
Merge remote branch 'upstream/master' into i915-zone-renderingi915-zone-rendering
Conflicts:
linux-core/drm_bo.c
linux-core/drm_objects.h
linux-core/i915_buffer.c
shared-core/i915_dma.c
shared-core/i915_drm.h
shared-core/i915_drv.h
shared-core/i915_irq.c
Diffstat (limited to 'bsd-core/drm_vm.c')
-rw-r--r-- | bsd-core/drm_vm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bsd-core/drm_vm.c b/bsd-core/drm_vm.c index 7f732c9b..fea31f52 100644 --- a/bsd-core/drm_vm.c +++ b/bsd-core/drm_vm.c @@ -21,6 +21,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/** @file drm_vm.c + * Support code for mmaping of DRM maps. + */ + #include "drmP.h" #include "drm.h" @@ -33,7 +37,7 @@ int drm_mmap(dev_t kdev, vm_offset_t offset, int prot) paddr_t drm_mmap(dev_t kdev, off_t offset, int prot) #endif { - DRM_DEVICE; + drm_device_t *dev = drm_get_device_from_kdev(kdev); drm_local_map_t *map; drm_file_t *priv; drm_map_type_t type; @@ -52,7 +56,7 @@ paddr_t drm_mmap(dev_t kdev, off_t offset, int prot) } if (!priv->authenticated) - return DRM_ERR(EACCES); + return EACCES; if (dev->dma && offset >= 0 && offset < ptoa(dev->dma->page_count)) { drm_device_dma_t *dma = dev->dma; |