diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-09-26 08:37:51 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 07:13:16 +0400 |
commit | dc73b45ad456b173610a211c588d003f7ea77957 (patch) | |
tree | 41523a117f091c0b38ea642298f30d29869f6ae3 /drivers/gpu/drm/nouveau/nouveau_ttm.c | |
parent | c0abf5c9fa1db7188bd6b8b580614a377dbc7080 (diff) | |
download | linux-dc73b45ad456b173610a211c588d003f7ea77957.tar.xz |
drm/nouveau: store supported dma mask in vmmgr
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_ttm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index d2fc121ff861..9be9cb58e19b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -340,14 +340,10 @@ nouveau_ttm_init(struct nouveau_drm *drm) u32 bits; int ret; - if (nv_device(drm->device)->card_type >= NV_50) { - if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(40))) - bits = 40; - else - bits = 32; - } else { + bits = nouveau_vmmgr(drm->device)->dma_bits; + if ( drm->agp.stat == ENABLED || + !pci_dma_supported(dev->pdev, DMA_BIT_MASK(bits))) bits = 32; - } ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(bits)); if (ret) |