diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-10-17 17:14:26 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-06 05:39:51 -0500 |
commit | 3230cfc34fca9d17c1628cf0e4ac25199592a69a (patch) | |
tree | 40685914703f0a709b2180d7cdf01e770fa5a4dc /drivers/gpu/drm/nouveau/nouveau_mem.c | |
parent | c52494f69538f6fe1a234972f024011b17a48329 (diff) |
drm/nouveau: enable the ttm dma pool when swiotlb is active V3
If the card is capable of more than 32-bit, then use the default
TTM page pool code which allocates from anywhere in the memory.
Note: If the 'ttm.no_dma' parameter is set, the override is ignored
and the default TTM pool is used.
V2 use pci_set_consistent_dma_mask
V3 Rebase on top of no memory account changes (where/when is my
delorean when i need it ?)
CC: Ben Skeggs <bskeggs@redhat.com>
CC: Francisco Jerez <currojerez@riseup.net>
CC: Dave Airlie <airlied@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 36bec4807701..37fcaa260e98 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
@@ -407,6 +407,12 @@ nouveau_mem_vram_init(struct drm_device *dev) | |||
407 | ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits)); | 407 | ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits)); |
408 | if (ret) | 408 | if (ret) |
409 | return ret; | 409 | return ret; |
410 | ret = pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits)); | ||
411 | if (ret) { | ||
412 | /* Reset to default value. */ | ||
413 | pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(32)); | ||
414 | } | ||
415 | |||
410 | 416 | ||
411 | ret = nouveau_ttm_global_init(dev_priv); | 417 | ret = nouveau_ttm_global_init(dev_priv); |
412 | if (ret) | 418 | if (ret) |