diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2016-02-25 15:08:42 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-03-14 09:53:01 +1000 |
commit | c9ad08e3a528f763c83641f6e5adb0fa57bb5f4f (patch) | |
tree | a412df1a26a0f1d0f596bd9a17a179b21608080f /lib | |
parent | 7e1fd280fb8a0dea6bac5da033c58452a9ce409d (diff) | |
download | nouveau-c9ad08e3a528f763c83641f6e5adb0fa57bb5f4f.tar.gz |
instmem/gk20a: set DMA mask early
DMA mask is typically set in nouveau_ttm_init(), but this function is
called late during initialization and GK20A's instmem will have called
DMA functions before this happens.
Having a wrongly set DMA mask can result in the use of unneeded bounce
buffers. Set it early to avoid this.
Signed-off-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 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h index 3b3b46daa..c61bf8393 100644 --- a/lib/include/nvif/os.h +++ b/lib/include/nvif/os.h @@ -941,6 +941,8 @@ iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t size) /****************************************************************************** * DMA *****************************************************************************/ +#define DMA_BIT_MASK(a) (((a) == 64) ? ~0ULL : ((1ULL << (a)) - 1)) + static inline dma_addr_t dma_map_page(struct device *pdev, struct page *page, int offset, int length, unsigned flags) @@ -960,6 +962,12 @@ dma_unmap_page(struct device *pdev, dma_addr_t addr, int size, unsigned flags) { } +static inline int +dma_set_mask(struct device *dev, u64 mask) +{ + return 0; +} + /****************************************************************************** * PCI *****************************************************************************/ |