@@ -84,7 +84,7 @@ static struct host1x_bo_mapping *tegra_bo_pin(struct device *dev, struct host1x_
84
84
goto free ;
85
85
}
86
86
87
- map -> sgt = dma_buf_map_attachment (map -> attach , direction );
87
+ map -> sgt = dma_buf_map_attachment_unlocked (map -> attach , direction );
88
88
if (IS_ERR (map -> sgt )) {
89
89
dma_buf_detach (buf , map -> attach );
90
90
err = PTR_ERR (map -> sgt );
@@ -160,7 +160,8 @@ static struct host1x_bo_mapping *tegra_bo_pin(struct device *dev, struct host1x_
160
160
static void tegra_bo_unpin (struct host1x_bo_mapping * map )
161
161
{
162
162
if (map -> attach ) {
163
- dma_buf_unmap_attachment (map -> attach , map -> sgt , map -> direction );
163
+ dma_buf_unmap_attachment_unlocked (map -> attach , map -> sgt ,
164
+ map -> direction );
164
165
dma_buf_detach (map -> attach -> dmabuf , map -> attach );
165
166
} else {
166
167
dma_unmap_sgtable (map -> dev , map -> sgt , map -> direction , 0 );
@@ -181,7 +182,7 @@ static void *tegra_bo_mmap(struct host1x_bo *bo)
181
182
if (obj -> vaddr ) {
182
183
return obj -> vaddr ;
183
184
} else if (obj -> gem .import_attach ) {
184
- ret = dma_buf_vmap (obj -> gem .import_attach -> dmabuf , & map );
185
+ ret = dma_buf_vmap_unlocked (obj -> gem .import_attach -> dmabuf , & map );
185
186
return ret ? NULL : map .vaddr ;
186
187
} else {
187
188
return vmap (obj -> pages , obj -> num_pages , VM_MAP ,
@@ -197,7 +198,7 @@ static void tegra_bo_munmap(struct host1x_bo *bo, void *addr)
197
198
if (obj -> vaddr )
198
199
return ;
199
200
else if (obj -> gem .import_attach )
200
- dma_buf_vunmap (obj -> gem .import_attach -> dmabuf , & map );
201
+ dma_buf_vunmap_unlocked (obj -> gem .import_attach -> dmabuf , & map );
201
202
else
202
203
vunmap (addr );
203
204
}
@@ -461,7 +462,7 @@ static struct tegra_bo *tegra_bo_import(struct drm_device *drm,
461
462
462
463
get_dma_buf (buf );
463
464
464
- bo -> sgt = dma_buf_map_attachment (attach , DMA_TO_DEVICE );
465
+ bo -> sgt = dma_buf_map_attachment_unlocked (attach , DMA_TO_DEVICE );
465
466
if (IS_ERR (bo -> sgt )) {
466
467
err = PTR_ERR (bo -> sgt );
467
468
goto detach ;
@@ -479,7 +480,7 @@ static struct tegra_bo *tegra_bo_import(struct drm_device *drm,
479
480
480
481
detach :
481
482
if (!IS_ERR_OR_NULL (bo -> sgt ))
482
- dma_buf_unmap_attachment (attach , bo -> sgt , DMA_TO_DEVICE );
483
+ dma_buf_unmap_attachment_unlocked (attach , bo -> sgt , DMA_TO_DEVICE );
483
484
484
485
dma_buf_detach (buf , attach );
485
486
dma_buf_put (buf );
@@ -508,8 +509,8 @@ void tegra_bo_free_object(struct drm_gem_object *gem)
508
509
tegra_bo_iommu_unmap (tegra , bo );
509
510
510
511
if (gem -> import_attach ) {
511
- dma_buf_unmap_attachment (gem -> import_attach , bo -> sgt ,
512
- DMA_TO_DEVICE );
512
+ dma_buf_unmap_attachment_unlocked (gem -> import_attach , bo -> sgt ,
513
+ DMA_TO_DEVICE );
513
514
drm_prime_gem_destroy (gem , NULL );
514
515
} else {
515
516
tegra_bo_free (gem -> dev , bo );
0 commit comments