diff options
author | Felix Kuehling <fxkuehl@gmx.de> | 2005-01-01 20:03:15 +0000 |
---|---|---|
committer | Felix Kuehling <fxkuehl@gmx.de> | 2005-01-01 20:03:15 +0000 |
commit | ed165a25292740d5d3ef7e78dc04a6a3402562aa (patch) | |
tree | 28545324112665f06e11a8f1ae5d786b1672595e /linux-core/drm_vm.c | |
parent | fe4ade81bb7a1242b18b84e012c1a293eea0420b (diff) |
Added a new DRM map type _DRM_CONSISTENT for consistent PCI memory. It uses
drm_pci_alloc/free for allocating/freeing the memory. Only implemented
in the Linux DRM so far.
Diffstat (limited to 'linux-core/drm_vm.c')
-rw-r--r-- | linux-core/drm_vm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 9b49efdc..3372498b 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -232,6 +232,10 @@ void drm_vm_shm_close(struct vm_area_struct *vma) case _DRM_AGP: case _DRM_SCATTER_GATHER: break; + case _DRM_CONSISTENT: + drm_pci_free(dev, map->size, map->handle, + map->offset); + break; } drm_free(map, sizeof(*map), DRM_MEM_MAPS); } @@ -658,6 +662,9 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) vma->vm_ops = &drm_vm_ops; break; case _DRM_SHM: + case _DRM_CONSISTENT: + /* Consistent memory is really like shared memory. It's only + * allocated in a different way. */ vma->vm_ops = &drm_vm_shm_ops; vma->vm_private_data = (void *)map; /* Don't let this area swap. Change when |