search for: nouveau_addmap_fb

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

2008 Mar 09
0
[PATCH 1/4] nouveau: add nouveau_addmap_{agp, fb, pci} functions
...num 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_fb(struct drm_device *dev, struct mem_block *block) +{ + struct drm_nouveau_private *dev_priv = dev->dev_private; + unsigned long offset = block->start + dev_priv->fb_phys; + + return nouveau_addmap(dev, block, offset, _DRM_SCATTER_GATHER); +} + +static int nouveau_addmap_agp(struct drm_devic...
2008 Mar 09
0
[PATCH 4/4] nouveau: clean up nouveau_mem_alloc function
...priv); + if (!block) + return NULL; + block->flags = 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...