Displaying 2 results from an estimated 2 matches for "nouveau_map_block".
2008 Mar 09
0
[PATCH 3/4] nouveau: move nouveau_map_block() call to nouveau_addmap()
From: Pekka Enberg <penberg at cs.helsinki.fi>
Move nouveau_map_block() call from nouveau_mem_alloc() to nouveau_addmap() to
simplify error handling.
Signed-off-by: Pekka Enberg <penberg at cs.helsinki.fi>
---
shared-core/nouveau_mem.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: drm/shared-core/nouveau_mem.c
================...
2008 Mar 09
0
[PATCH 2/4] nouveau: add nouveau_map_block function
..._mem.c
===================================================================
--- drm.orig/shared-core/nouveau_mem.c
+++ drm/shared-core/nouveau_mem.c
@@ -515,6 +515,20 @@ int nouveau_mem_init(struct drm_device *
return 0;
}
+/* Returns zero on success; otherwise returns non-zero. */
+static int nouveau_map_block(struct drm_device *dev, struct mem_block *block)
+{
+ struct drm_map_list *entry;
+
+ entry = drm_find_matching_map(dev, block->map);
+ if (!entry)
+ return -EINVAL;
+
+ block->map_handle = entry->user_token;
+ block->flags |= NOUVEAU_MEM_MAPPED;
+ return 0;
+}
+
static int nouveau_ad...