search for: nouveau_mem_pci

Displaying 2 results from an estimated 2 matches for "nouveau_mem_pci".

2008 Mar 09
0
[PATCH 4/4] nouveau: clean up nouveau_mem_alloc function
...lags = type; + + /* + * Does the block need mapping? + */ + if (!(flags & NOUVEAU_MEM_MAPPED)) + return block; + + switch (type) { + case NOUVEAU_MEM_AGP: + err = nouveau_addmap_agp(dev, block); + break; + case NOUVEAU_MEM_FB: + err = nouveau_addmap_fb(dev, block); + break; + case NOUVEAU_MEM_PCI: + err = nouveau_addmap_pci(dev, block); + break; + default: + err = -EINVAL; + break; + }; + if (err) + goto error; + + return block; +error: + nouveau_mem_free_block(block); + return NULL; +} + +static struct mem_block * +nouveau_mem_alloc_pci(struct drm_device *dev, uint64_t size, int...
2008 Mar 09
0
[PATCH 1/4] nouveau: add nouveau_addmap_{agp, fb, pci} functions
...e == NOUVEAU_MEM_AGP) + ret = nouveau_addmap_agp(dev, block); else if (type == NOUVEAU_MEM_FB) - ret = drm_addmap(dev, block->start + dev_priv->fb_phys, - block->size, _DRM_FRAME_BUFFER, - 0, &block->map); + ret = nouveau_addmap_fb(dev, block); else if (type == NOUVEAU_MEM_PCI) - ret = drm_addmap(dev, block->start, block->size, - _DRM_SCATTER_GATHER, 0, &block->map); + ret = nouveau_addmap_pci(dev, block); if (ret) { nouveau_mem_free_block(block);