summaryrefslogtreecommitdiff
path: root/bsd-core/drm_scatter.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core/drm_scatter.c')
-rw-r--r--bsd-core/drm_scatter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bsd-core/drm_scatter.c b/bsd-core/drm_scatter.c
index 550e6f88..7d47e605 100644
--- a/bsd-core/drm_scatter.c
+++ b/bsd-core/drm_scatter.c
@@ -40,9 +40,9 @@
void drm_sg_cleanup(drm_sg_mem_t *entry)
{
- free((void *)entry->handle, M_DRM);
- free(entry->busaddr, M_DRM);
- free(entry, M_DRM);
+ free((void *)entry->handle, DRM_MEM_PAGES);
+ free(entry->busaddr, DRM_MEM_PAGES);
+ free(entry, DRM_MEM_SGLISTS);
}
int drm_sg_alloc(struct drm_device * dev, struct drm_scatter_gather * request)
@@ -54,7 +54,7 @@ int drm_sg_alloc(struct drm_device * dev, struct drm_scatter_gather * request)
if (dev->sg)
return EINVAL;
- entry = malloc(sizeof(*entry), M_DRM, M_WAITOK | M_ZERO);
+ entry = malloc(sizeof(*entry), DRM_MEM_SGLISTS, M_WAITOK | M_ZERO);
if (!entry)
return ENOMEM;
@@ -63,14 +63,14 @@ int drm_sg_alloc(struct drm_device * dev, struct drm_scatter_gather * request)
entry->pages = pages;
- entry->busaddr = malloc(pages * sizeof(*entry->busaddr), M_DRM,
+ entry->busaddr = malloc(pages * sizeof(*entry->busaddr), DRM_MEM_PAGES,
M_WAITOK | M_ZERO);
if (!entry->busaddr) {
drm_sg_cleanup(entry);
return ENOMEM;
}
- entry->handle = (long)malloc(pages << PAGE_SHIFT, M_DRM,
+ entry->handle = (long)malloc(pages << PAGE_SHIFT, DRM_MEM_PAGES,
M_WAITOK | M_ZERO);
if (entry->handle == 0) {
drm_sg_cleanup(entry);