struct nouveau_subdev base;
u64 limit;
+ u8 dma_bits;
u32 pgt_bits;
u8 spg_shift;
u8 lpg_shift;
priv->base.create = nv04_vm_create;
priv->base.limit = NV04_PDMA_SIZE;
+ priv->base.dma_bits = 32;
priv->base.pgt_bits = 32 - 12;
priv->base.spg_shift = 12;
priv->base.lpg_shift = 12;
priv->base.create = nv04_vm_create;
priv->base.limit = NV41_GART_SIZE;
+ priv->base.dma_bits = 39;
priv->base.pgt_bits = 32 - 12;
priv->base.spg_shift = 12;
priv->base.lpg_shift = 12;
priv->base.create = nv04_vm_create;
priv->base.limit = NV44_GART_SIZE;
+ priv->base.dma_bits = 39;
priv->base.pgt_bits = 32 - 12;
priv->base.spg_shift = 12;
priv->base.lpg_shift = 12;
return ret;
priv->base.limit = 1ULL << 40;
+ priv->base.dma_bits = 40;
priv->base.pgt_bits = 29 - 12;
priv->base.spg_shift = 12;
priv->base.lpg_shift = 16;
return ret;
priv->base.limit = 1ULL << 40;
+ priv->base.dma_bits = 40;
priv->base.pgt_bits = 27 - 12;
priv->base.spg_shift = 12;
priv->base.lpg_shift = 17;
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)