diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-08-08 16:37:55 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-08-08 16:37:55 +1000 |
commit | 05633ca3708f48cfbbb77518da4e791d7e1613c2 (patch) | |
tree | 3a9a660bedc37a7056c0089790efc942c05e7e1c /shared-core/nouveau_dma.c | |
parent | 40f21563564332786ca2b9ffc7d7ba9c7e6f7f1a (diff) |
nouveau: Always allocate drm's push buffer in VRAM
Fixes #11868
Diffstat (limited to 'shared-core/nouveau_dma.c')
-rw-r--r-- | shared-core/nouveau_dma.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/shared-core/nouveau_dma.c b/shared-core/nouveau_dma.c index ce5b6299..ab502e6a 100644 --- a/shared-core/nouveau_dma.c +++ b/shared-core/nouveau_dma.c @@ -37,13 +37,22 @@ nouveau_dma_channel_init(struct drm_device *dev) struct drm_nouveau_private *dev_priv = dev->dev_private; struct nouveau_drm_channel *dchan = &dev_priv->channel; struct nouveau_gpuobj *gpuobj = NULL; + struct mem_block *pushbuf; int grclass, ret, i; DRM_DEBUG("\n"); + pushbuf = nouveau_mem_alloc(dev, 0, 0x8000, + NOUVEAU_MEM_FB | NOUVEAU_MEM_MAPPED, + (struct drm_file *)-2); + if (!pushbuf) { + DRM_ERROR("Failed to allocate DMA push buffer\n"); + return -ENOMEM; + } + /* Allocate channel */ ret = nouveau_fifo_alloc(dev, &dchan->chan, (struct drm_file *)-2, - NvDmaFB, NvDmaTT); + pushbuf, NvDmaFB, NvDmaTT); if (ret) { DRM_ERROR("Error allocating GPU channel: %d\n", ret); return ret; |