diff options
author | T.J. Mercier <tjmercier@google.com> | 2024-05-02 20:16:05 +0000 |
---|---|---|
committer | Will McVicker <willmcvicker@google.com> | 2024-05-17 00:20:25 -0700 |
commit | 02929e46ba204289c1e1c3b9a04e9380703f1ef4 (patch) | |
tree | a6bc88f1e36f5c5db48011faa09221f1420246b8 | |
parent | 24cdbe21b744379eb90b1b6e19bc6eafb915a2ce (diff) | |
download | gpu-android-gs-raviole-mainline.tar.gz |
GKI: Adapt to upstream dma-buf locking changesandroid-gs-raviole-mainline
The dma-buf locking convention has changed upstream [1] and this driver
is generating warnings because it has not yet been updated to take the
necessary locks.
[1] https://lore.kernel.org/all/20221017172229.42269-1-dmitry.osipenko@collabora.com/
Change-Id: If2237ccc32d73255cb08b940e848e1c040f3079b
Signed-off-by: T.J. Mercier <tjmercier@google.com>
-rw-r--r-- | mali_kbase/mali_kbase_mem.c | 2 | ||||
-rw-r--r-- | mali_kbase/mali_kbase_mem_linux.c | 6 | ||||
-rw-r--r-- | mali_pixel/protected_memory_allocator.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/mali_kbase/mali_kbase_mem.c b/mali_kbase/mali_kbase_mem.c index a1aac30..d8eaa20 100644 --- a/mali_kbase/mali_kbase_mem.c +++ b/mali_kbase/mali_kbase_mem.c @@ -3137,7 +3137,7 @@ void kbase_mem_kref_free(struct kref *kref) WARN_ONCE(alloc->imported.umm.current_mapping_usage_count != 1, "WARNING: expected excatly 1 mapping, got %d", alloc->imported.umm.current_mapping_usage_count); - dma_buf_unmap_attachment( + dma_buf_unmap_attachment_unlocked( alloc->imported.umm.dma_attachment, alloc->imported.umm.sgt, DMA_BIDIRECTIONAL); diff --git a/mali_kbase/mali_kbase_mem_linux.c b/mali_kbase/mali_kbase_mem_linux.c index aea22e9..935e60a 100644 --- a/mali_kbase/mali_kbase_mem_linux.c +++ b/mali_kbase/mali_kbase_mem_linux.c @@ -1192,8 +1192,8 @@ static void kbase_mem_umm_unmap_attachment(struct kbase_context *kctx, { struct tagged_addr *pa = alloc->pages; - dma_buf_unmap_attachment(alloc->imported.umm.dma_attachment, - alloc->imported.umm.sgt, DMA_BIDIRECTIONAL); + dma_buf_unmap_attachment_unlocked(alloc->imported.umm.dma_attachment, + alloc->imported.umm.sgt, DMA_BIDIRECTIONAL); alloc->imported.umm.sgt = NULL; kbase_remove_dma_buf_usage(kctx, alloc); @@ -1226,7 +1226,7 @@ static int kbase_mem_umm_map_attachment(struct kbase_context *kctx, WARN_ON_ONCE(alloc->type != KBASE_MEM_TYPE_IMPORTED_UMM); WARN_ON_ONCE(alloc->imported.umm.sgt); - sgt = dma_buf_map_attachment(alloc->imported.umm.dma_attachment, + sgt = dma_buf_map_attachment_unlocked(alloc->imported.umm.dma_attachment, DMA_BIDIRECTIONAL); if (IS_ERR_OR_NULL(sgt)) return -EINVAL; diff --git a/mali_pixel/protected_memory_allocator.c b/mali_pixel/protected_memory_allocator.c index 25b5bde..2ca585e 100644 --- a/mali_pixel/protected_memory_allocator.c +++ b/mali_pixel/protected_memory_allocator.c @@ -411,7 +411,7 @@ static struct mali_pma_slab *mali_pma_slab_add( /* Map the DMA buffer into the attached device address space. */ dma_sg_table = - dma_buf_map_attachment(dma_attachment, DMA_BIDIRECTIONAL); + dma_buf_map_attachment_unlocked(dma_attachment, DMA_BIDIRECTIONAL); if (IS_ERR(dma_sg_table)) { dev_err(mali_pma_dev->dev, "Failed to map the DMA buffer\n"); goto out; @@ -450,7 +450,7 @@ static void mali_pma_slab_remove( /* Free the Mali protected memory slab allocation. */ if (slab->dma_sg_table) { - dma_buf_unmap_attachment( + dma_buf_unmap_attachment_unlocked( slab->dma_attachment, slab->dma_sg_table, DMA_BIDIRECTIONAL); } |