Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm/dist/bsd-core map the framebuffer and a...
details: https://anonhg.NetBSD.org/src/rev/928e53059ce2
branches: trunk
changeset: 762093:928e53059ce2
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Feb 15 14:24:23 2011 +0000
description:
map the framebuffer and agp with BUS_SPACE_MAP_PREFETCHABLE
diffstat:
sys/external/bsd/drm/dist/bsd-core/drm_memory.c | 3 ++-
sys/external/bsd/drm/dist/bsd-core/drm_vm.c | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 060d20001f1a -r 928e53059ce2 sys/external/bsd/drm/dist/bsd-core/drm_memory.c
--- a/sys/external/bsd/drm/dist/bsd-core/drm_memory.c Tue Feb 15 14:01:52 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/drm_memory.c Tue Feb 15 14:24:23 2011 +0000
@@ -197,7 +197,8 @@
dev->agp_map_data[i].mapped++;
dev->agp_map_data[i].base = map->offset;
dev->agp_map_data[i].size = map->size;
- dev->agp_map_data[i].flags = BUS_SPACE_MAP_LINEAR;
+ dev->agp_map_data[i].flags = BUS_SPACE_MAP_LINEAR |
+ BUS_SPACE_MAP_PREFETCHABLE;
dev->agp_map_data[i].maptype = PCI_MAPREG_TYPE_MEM;
map->fullmap = &(dev->agp_map_data[i]);
map->mapsize = dev->agp_map_data[i].size;
diff -r 060d20001f1a -r 928e53059ce2 sys/external/bsd/drm/dist/bsd-core/drm_vm.c
--- a/sys/external/bsd/drm/dist/bsd-core/drm_vm.c Tue Feb 15 14:01:52 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/drm_vm.c Tue Feb 15 14:24:23 2011 +0000
@@ -45,6 +45,7 @@
#elif defined(__NetBSD__)
paddr_t phys;
unsigned long map_offs;
+ int flags = 0;
#endif
#if defined(__FreeBSD__)
@@ -135,8 +136,11 @@
case _DRM_REGISTERS:
case _DRM_AGP:
#if defined(__NetBSD__)
+ flags = BUS_SPACE_MAP_LINEAR;
+ if (type == _DRM_FRAME_BUFFER || type == _DRM_AGP)
+ flags |= BUS_SPACE_MAP_PREFETCHABLE;
phys = bus_space_mmap(dev->pa.pa_memt, map->offset,
- offset - map->offset, prot, BUS_SPACE_MAP_LINEAR);
+ offset - map->offset, prot, flags);
if (phys == -1) {
DRM_ERROR("bus_space_mmap for %" PRIx64 " failed\n", offset);
return -1;
Home |
Main Index |
Thread Index |
Old Index