Displaying 1 result from an estimated 1 matches for "drm_find_matching_map".
2008 Mar 09
0
[PATCH 2/4] nouveau: add nouveau_map_block function
...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_addmap(struct drm_device *dev, struct mem_block *block,
unsigned long offset, enum drm_map_type type)
{
@@ -619...