search for: drm_map_type

Displaying 3 results from an estimated 3 matches for "drm_map_type".

2008 Mar 09
0
[PATCH 1/4] nouveau: add nouveau_addmap_{agp, fb, pci} functions
...====================================== --- drm.orig/shared-core/nouveau_mem.c +++ drm/shared-core/nouveau_mem.c @@ -515,6 +515,39 @@ int nouveau_mem_init(struct drm_device * return 0; } +static int nouveau_addmap(struct drm_device *dev, struct mem_block *block, + unsigned long offset, enum drm_map_type type) +{ + return drm_addmap(dev, block->start, block->size, type, 0, + &block->map); +} + +static int nouveau_addmap_pci(struct drm_device *dev, struct mem_block *block) +{ + return nouveau_addmap(dev, block, block->start, _DRM_SCATTER_GATHER); +} + +static int nouveau_addmap_f...
2008 Mar 09
0
[PATCH 2/4] nouveau: add nouveau_map_block function
...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) ret = nouveau_addmap_agp(dev, block); @@ -635,12 +647,10 @@ alloc_ok: return NULL; }...
2008 Mar 09
0
[PATCH 3/4] nouveau: move nouveau_map_block() call to nouveau_addmap()
...======================================================= --- drm.orig/shared-core/nouveau_mem.c +++ drm/shared-core/nouveau_mem.c @@ -532,8 +532,13 @@ static int nouveau_map_block(struct drm_ static int nouveau_addmap(struct drm_device *dev, struct mem_block *block, unsigned long offset, enum drm_map_type type) { - return drm_addmap(dev, block->start, block->size, type, 0, - &block->map); + int err; + + err = drm_addmap(dev, block->start, block->size, type, 0, &block->map); + if (err) + return err; + + return nouveau_map_block(dev, block); } static int nouveau_add...