diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-06 16:49:28 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-11-04 17:17:05 +1000 |
commit | ccb192b6cbd087238a69f42fa051a02c497c4c98 (patch) | |
tree | c5271dcf1e578503956a39f7a4fc578646bf601d /lib | |
parent | c2f76cfd28289e45d6edce9b284c801d643ef5bc (diff) | |
download | nouveau-ccb192b6cbd087238a69f42fa051a02c497c4c98.tar.gz |
pci: set streaming DMA mask early
Some subdevices (i.e., fb/nv50.c and fb/gf100.c) map a scratch page using
dma_map_page() way before the TTM layer has had a chance to set the DMA
mask. This may prevent the driver from loading at all on platforms whose
system memory is not covered by the default DMA mask of 32-bit (i.e., when
all RAM is above 4 GB).
So set a preliminary DMA mask right after constructing the PCI device, and
base it on the .dma_bits member of the MMU subdevice, which is what the TTM
layer will base the DMA mask on as well.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/include/nvif/os.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h index c10c29f33..f9b13c0bf 100644 --- a/lib/include/nvif/os.h +++ b/lib/include/nvif/os.h @@ -971,6 +971,12 @@ dma_set_mask(struct device *dev, u64 mask) return 0; } +static inline int +dma_set_mask_and_coherent(struct device *dev, u64 mask) +{ + return 0; +} + /****************************************************************************** * PCI *****************************************************************************/ |