Skip to content

Commit 50f0ddc

Browse files
committed
media: tegra-vde: Prepare to dynamic dma-buf locking specification
Prepare Tegra video decoder driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a26ee3b commit 50f0ddc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void tegra_vde_release_entry(struct tegra_vde_cache_entry *entry)
3838
if (entry->vde->domain)
3939
tegra_vde_iommu_unmap(entry->vde, entry->iova);
4040

41-
dma_buf_unmap_attachment(entry->a, entry->sgt, entry->dma_dir);
41+
dma_buf_unmap_attachment_unlocked(entry->a, entry->sgt, entry->dma_dir);
4242
dma_buf_detach(dmabuf, entry->a);
4343
dma_buf_put(dmabuf);
4444

@@ -102,7 +102,7 @@ int tegra_vde_dmabuf_cache_map(struct tegra_vde *vde,
102102
goto err_unlock;
103103
}
104104

105-
sgt = dma_buf_map_attachment(attachment, dma_dir);
105+
sgt = dma_buf_map_attachment_unlocked(attachment, dma_dir);
106106
if (IS_ERR(sgt)) {
107107
dev_err(dev, "Failed to get dmabufs sg_table\n");
108108
err = PTR_ERR(sgt);
@@ -152,7 +152,7 @@ int tegra_vde_dmabuf_cache_map(struct tegra_vde *vde,
152152
err_free:
153153
kfree(entry);
154154
err_unmap:
155-
dma_buf_unmap_attachment(attachment, sgt, dma_dir);
155+
dma_buf_unmap_attachment_unlocked(attachment, sgt, dma_dir);
156156
err_detach:
157157
dma_buf_detach(dmabuf, attachment);
158158
err_unlock:

0 commit comments

Comments
 (0)