mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -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
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