diff options
author | rnoland <rnoland@FreeBSD.org> | 2010-04-22 18:44:23 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2010-04-22 18:44:23 +0000 |
commit | 50a4503e464790a7d2b96bb43ebb5094d8f430d8 (patch) | |
tree | 31b5c6321ec517bffe70279237d0b00e4debda92 /sys/dev/drm/drmP.h | |
parent | b733ebaa1ccc608f662359519c4712cf384b1360 (diff) | |
download | FreeBSD-src-50a4503e464790a7d2b96bb43ebb5094d8f430d8.zip FreeBSD-src-50a4503e464790a7d2b96bb43ebb5094d8f430d8.tar.gz |
re-write scatter gather memory allocation yet again...
This time, abandon the use of busdma and start interacting with the VM
system directly. Make use of the new kmem_alloc_attr() which allows us
to easily allocate non-contiguous pages to back the GART table. This
should help a lot when starting or restarting X after the system has
been running for a while and memory has become fragmented.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/drm/drmP.h')
-rw-r--r-- | sys/dev/drm/drmP.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index 1204974..26bda43 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -49,6 +49,7 @@ struct drm_file; #include <sys/module.h> #include <sys/systm.h> #include <sys/conf.h> +#include <sys/sglist.h> #include <sys/stat.h> #if __FreeBSD_version >= 700000 #include <sys/priv.h> @@ -68,10 +69,13 @@ struct drm_file; #include <vm/vm.h> #include <vm/pmap.h> #include <vm/vm_extern.h> +#include <vm/vm_kern.h> #include <vm/vm_map.h> #include <vm/vm_object.h> #include <vm/vm_page.h> +#include <vm/vm_pager.h> #include <vm/vm_param.h> +#include <vm/vm_phys.h> #include <machine/param.h> #include <machine/pmap.h> #include <machine/bus.h> @@ -474,11 +478,10 @@ typedef struct drm_agp_head { } drm_agp_head_t; typedef struct drm_sg_mem { - unsigned long handle; - void *virtual; - int pages; - dma_addr_t *busaddr; - struct drm_dma_handle *dmah; /* Handle to PCI memory */ + vm_offset_t vaddr; + vm_paddr_t *busaddr; + vm_pindex_t pages; + vm_object_t obj; } drm_sg_mem_t; #define DRM_MAP_HANDLE_BITS (sizeof(void *) == 4 ? 4 : 24) |