nouveau: don't call pci_dma_supported
Just try to set a 64-bit DMA mask first and retry with the smaller dma_mask if dma_set_mask failed. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: David Airlie <airlied@linux.ie> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Thierry Reding <treding@nvidia.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e806f75d52
commit
0dcc4a59d5
@ -353,8 +353,7 @@ nouveau_ttm_init(struct nouveau_drm *drm)
|
||||
|
||||
bits = nvxx_mmu(&drm->device)->dma_bits;
|
||||
if (nvxx_device(&drm->device)->func->pci) {
|
||||
if (drm->agp.bridge ||
|
||||
!dma_supported(dev->dev, DMA_BIT_MASK(bits)))
|
||||
if (drm->agp.bridge)
|
||||
bits = 32;
|
||||
} else if (device->func->tegra) {
|
||||
struct nvkm_device_tegra *tegra = device->func->tegra(device);
|
||||
@ -369,6 +368,10 @@ nouveau_ttm_init(struct nouveau_drm *drm)
|
||||
}
|
||||
|
||||
ret = dma_set_mask(dev->dev, DMA_BIT_MASK(bits));
|
||||
if (ret && bits != 32) {
|
||||
bits = 32;
|
||||
ret = dma_set_mask(dev->dev, DMA_BIT_MASK(bits));
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user