diff options
Diffstat (limited to 'drivers/gpu/nvgpu/tegra')
-rw-r--r-- | drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c index c2f0321a..880ed0ed 100644 --- a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | |||
@@ -106,6 +106,7 @@ static void gk20a_tegra_secure_page_destroy(struct device *dev, | |||
106 | struct secure_page_buffer *secure_buffer) | 106 | struct secure_page_buffer *secure_buffer) |
107 | { | 107 | { |
108 | DEFINE_DMA_ATTRS(attrs); | 108 | DEFINE_DMA_ATTRS(attrs); |
109 | dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, __DMA_ATTR(attrs)); | ||
109 | dma_free_attrs(&tegra_vpr_dev, secure_buffer->size, | 110 | dma_free_attrs(&tegra_vpr_dev, secure_buffer->size, |
110 | (void *)(uintptr_t)secure_buffer->iova, | 111 | (void *)(uintptr_t)secure_buffer->iova, |
111 | secure_buffer->iova, __DMA_ATTR(attrs)); | 112 | secure_buffer->iova, __DMA_ATTR(attrs)); |
@@ -123,8 +124,9 @@ int gk20a_tegra_secure_page_alloc(struct device *dev) | |||
123 | if (g->is_fmodel) | 124 | if (g->is_fmodel) |
124 | return -EINVAL; | 125 | return -EINVAL; |
125 | 126 | ||
127 | dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, __DMA_ATTR(attrs)); | ||
126 | (void)dma_alloc_attrs(&tegra_vpr_dev, size, &iova, | 128 | (void)dma_alloc_attrs(&tegra_vpr_dev, size, &iova, |
127 | DMA_MEMORY_NOMAP, __DMA_ATTR(attrs)); | 129 | GFP_KERNEL, __DMA_ATTR(attrs)); |
128 | if (dma_mapping_error(&tegra_vpr_dev, iova)) | 130 | if (dma_mapping_error(&tegra_vpr_dev, iova)) |
129 | return -ENOMEM; | 131 | return -ENOMEM; |
130 | 132 | ||
@@ -142,6 +144,7 @@ static void gk20a_tegra_secure_destroy(struct gk20a *g, | |||
142 | 144 | ||
143 | if (desc->mem.priv.sgt) { | 145 | if (desc->mem.priv.sgt) { |
144 | phys_addr_t pa = sg_phys(desc->mem.priv.sgt->sgl); | 146 | phys_addr_t pa = sg_phys(desc->mem.priv.sgt->sgl); |
147 | dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, __DMA_ATTR(attrs)); | ||
145 | dma_free_attrs(&tegra_vpr_dev, desc->mem.size, | 148 | dma_free_attrs(&tegra_vpr_dev, desc->mem.size, |
146 | (void *)(uintptr_t)pa, | 149 | (void *)(uintptr_t)pa, |
147 | pa, __DMA_ATTR(attrs)); | 150 | pa, __DMA_ATTR(attrs)); |
@@ -164,8 +167,9 @@ int gk20a_tegra_secure_alloc(struct device *dev, | |||
164 | if (!platform->secure_alloc_ready) | 167 | if (!platform->secure_alloc_ready) |
165 | return -EINVAL; | 168 | return -EINVAL; |
166 | 169 | ||
170 | dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, __DMA_ATTR(attrs)); | ||
167 | (void)dma_alloc_attrs(&tegra_vpr_dev, size, &iova, | 171 | (void)dma_alloc_attrs(&tegra_vpr_dev, size, &iova, |
168 | DMA_MEMORY_NOMAP, __DMA_ATTR(attrs)); | 172 | GFP_KERNEL, __DMA_ATTR(attrs)); |
169 | if (dma_mapping_error(&tegra_vpr_dev, iova)) | 173 | if (dma_mapping_error(&tegra_vpr_dev, iova)) |
170 | return -ENOMEM; | 174 | return -ENOMEM; |
171 | 175 | ||