mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 05:12:59 +01: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 <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Asahi Lina <[email protected]> Signed-off-by: Daniel Almeida <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Reviewed-by: Janne Grunau <[email protected]> Reviewed-by: Daniel Almeida <[email protected]> Acked-by: David Airlie <[email protected]> Signed-off-by: Alice Ryhl <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Danilo Krummrich <[email protected]>
This commit is contained in:
1 parent
bdf6b22fd5
commit
9b836641d3
4 files changed
+17
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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