diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-26 15:41:01 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-26 15:41:01 +0000 |
commit | 55d0ea063b25d8b25fea5135f59de22437ecd4ea (patch) | |
tree | 42c739678ad68f903e06cc29eb0db1df3bf6298e /sys/dev/pci/drm | |
parent | 47f20d782a94ebc11fb4c7b43294559377be4989 (diff) |
Kill pmap_phys_address(), and force every driver's mmap() routine to return
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument].
This allows MI drivers to implement mmap() routines without having to know
about the pmap_phys_address() implementation and #ifdef obfuscation.
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 8a2a9d26bab..c7977adade7 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -863,7 +863,7 @@ drmmmap(dev_t kdev, off_t offset, int prot) rw_enter_write(&dma->dma_lock); if (dma->pagelist != NULL) - phys = atop(dma->pagelist[offset >> PAGE_SHIFT]); + phys = dma->pagelist[offset >> PAGE_SHIFT]; rw_exit_write(&dma->dma_lock); return (phys); @@ -904,7 +904,7 @@ drmmmap(dev_t kdev, off_t offset, int prot) case _DRM_FRAME_BUFFER: case _DRM_REGISTERS: case _DRM_AGP: - return (atop(offset + map->offset)); + return (offset + map->offset); break; /* XXX unify all the bus_dmamem_mmap bits */ case _DRM_SCATTER_GATHER: |