Skip to content

Commit 28ac750

Browse files
Grippy98igorpecovnik
authored andcommitted
Fix remoteproc DMA-BUF mapping helpers
1 parent a997655 commit 28ac750

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

patch/kernel/archive/k3-beagle-6.18/0001-remoteproc-add-dma-buf-attach-ioctl.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ index 8256721..1cf47df 100644
254254
+ goto out_unlock;
255255
+ }
256256
+
257-
+ sgt = dma_buf_map_attachment(attachment, DMA_BIDIRECTIONAL);
257+
+ sgt = dma_buf_map_attachment_unlocked(attachment, DMA_BIDIRECTIONAL);
258258
+ if (IS_ERR(sgt)) {
259259
+ ret = PTR_ERR(sgt);
260260
+ goto fail_detach;
@@ -285,7 +285,7 @@ index 8256721..1cf47df 100644
285285
+ return 0;
286286
+
287287
+fail_unmap:
288-
+ dma_buf_unmap_attachment(attachment, sgt, DMA_BIDIRECTIONAL);
288+
+ dma_buf_unmap_attachment_unlocked(attachment, sgt, DMA_BIDIRECTIONAL);
289289
+fail_detach:
290290
+ dma_buf_detach(dmabuf, attachment);
291291
+out_unlock:
@@ -298,8 +298,8 @@ index 8256721..1cf47df 100644
298298
+ struct rproc_dmabuf_entry *dmabuf_entry)
299299
+{
300300
+ if (dmabuf_entry->attachment && dmabuf_entry->sgt)
301-
+ dma_buf_unmap_attachment(dmabuf_entry->attachment,
302-
+ dmabuf_entry->sgt, DMA_BIDIRECTIONAL);
301+
+ dma_buf_unmap_attachment_unlocked(dmabuf_entry->attachment,
302+
+ dmabuf_entry->sgt, DMA_BIDIRECTIONAL);
303303
+ if (dmabuf_entry->dmabuf && dmabuf_entry->attachment)
304304
+ dma_buf_detach(dmabuf_entry->dmabuf, dmabuf_entry->attachment);
305305
+ list_del(&dmabuf_entry->node);

0 commit comments

Comments
 (0)