Displaying 4 results from an estimated 4 matches for "nouveau_addmap".
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 1/4] nouveau: add nouveau_addmap_{agp, fb, pci} functions
From: Pekka Enberg <penberg at cs.helsinki.fi>
This introduces memory type specific nouveau_addmap_{agp,fb,pci} functions as a
preparatory step to cleaning up nouveau_mem_alloc().
Signed-off-by: Pekka Enberg <penberg at cs.helsinki.fi>
---
shared-core/nouveau_mem.c | 50 ++++++++++++++++++++++++++++++++++------------
1 file changed, 37 insertions(+), 13 deletions(-)
Index: drm/shared-...
2008 Mar 09
0
[PATCH 2/4] nouveau: add nouveau_map_block function
..._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,9 +633,7 @@ alloc_ok:
if (flags&NOUVEAU_MEM_MAPPED)
{
- struct drm_map_list *entry;
int ret = 0;
- block->flags|=NOUVEAU_MEM_MAPPED;
if (type == NOUVEAU_MEM_AGP)...
2008 Mar 09
0
[PATCH 4/4] nouveau: clean up nouveau_mem_alloc function
...+++++++++++++++++++----------------
1 file changed, 117 insertions(+), 57 deletions(-)
Index: drm/shared-core/nouveau_mem.c
===================================================================
--- drm.orig/shared-core/nouveau_mem.c
+++ drm/shared-core/nouveau_mem.c
@@ -567,13 +567,91 @@ static int nouveau_addmap_agp(struct drm
return nouveau_addmap(dev, block, block->start, type);
}
+static struct mem_block *
+__nouveau_mem_alloc(struct drm_device *dev, int type, struct mem_block *heap,
+ uint64_t size, int alignment, int flags,
+ struct drm_file *file_priv)
+{
+ struct mem_block *block;...