mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 09:02:21 -04:00
rust: helpers: Add bindings/wrappers for dma_resv_lock
This is just for basic usage in the DRM shmem abstractions for implied locking, not intended as a full DMA Reservation abstraction yet. Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Asahi Lina <lina+kernel@asahilina.net> Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Janne Grunau <j@jannau.net> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Acked-by: David Airlie <airlied@gmail.com> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260320-gpuvm-rust-v5-2-76fd44f17a87@google.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
committed by
Danilo Krummrich
parent
bdf6b22fd5
commit
9b836641d3
@@ -7534,6 +7534,7 @@ F: include/linux/*fence.h
|
||||
F: include/linux/dma-buf.h
|
||||
F: include/linux/dma-buf/
|
||||
F: include/linux/dma-resv.h
|
||||
F: rust/helpers/dma-resv.c
|
||||
K: \bdma_(?:buf|fence|resv)\b
|
||||
|
||||
DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <linux/device/faux.h>
|
||||
#include <linux/dma-direction.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dma-resv.h>
|
||||
#include <linux/errname.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/fdtable.h>
|
||||
|
||||
14
rust/helpers/dma-resv.c
Normal file
14
rust/helpers/dma-resv.c
Normal file
@@ -0,0 +1,14 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include <linux/dma-resv.h>
|
||||
|
||||
__rust_helper
|
||||
int rust_helper_dma_resv_lock(struct dma_resv *obj, struct ww_acquire_ctx *ctx)
|
||||
{
|
||||
return dma_resv_lock(obj, ctx);
|
||||
}
|
||||
|
||||
__rust_helper void rust_helper_dma_resv_unlock(struct dma_resv *obj)
|
||||
{
|
||||
dma_resv_unlock(obj);
|
||||
}
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "cred.c"
|
||||
#include "device.c"
|
||||
#include "dma.c"
|
||||
#include "dma-resv.c"
|
||||
#include "drm.c"
|
||||
#include "err.c"
|
||||
#include "irq.c"
|
||||
|
||||
Reference in New Issue
Block a user