aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
authorAlice Ryhl <aliceryhl@google.com>2026-04-27 10:54:51 +0000
committerDanilo Krummrich <dakr@kernel.org>2026-05-05 12:59:41 +0200
commit37f748ed0c19e007e7c5677f5d605d6b93841792 (patch)
tree23180680a4fec4c413733e7fe8ae975fa1724d4b /rust
parent0b715b1e382b3d2e15d71c03a23be5f4333e7894 (diff)
downloadlinux-next-history-37f748ed0c19e007e7c5677f5d605d6b93841792.tar.gz
drm/gpuvm: rust: add RUST_DRM_GPUVM option to Kconfig
Since Rust uses GPUVM via the kernel crate, which is built-in, the GPUVM module must also be built-in to use GPUVM from Rust. Adjust the Kconfig settings accordingly. Suggested-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260427-gpuvm-config-v1-1-8ece03771f8a@google.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust')
-rw-r--r--rust/helpers/drm_gpuvm.c4
-rw-r--r--rust/kernel/drm/gpuvm/mod.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/rust/helpers/drm_gpuvm.c b/rust/helpers/drm_gpuvm.c
index ca959d9a66f60..4130b63252138 100644
--- a/rust/helpers/drm_gpuvm.c
+++ b/rust/helpers/drm_gpuvm.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 or MIT
-#ifdef CONFIG_DRM_GPUVM
+#ifdef CONFIG_RUST_DRM_GPUVM
#include <drm/drm_gpuvm.h>
@@ -23,4 +23,4 @@ bool rust_helper_drm_gpuvm_is_extobj(struct drm_gpuvm *gpuvm,
return drm_gpuvm_is_extobj(gpuvm, obj);
}
-#endif // CONFIG_DRM_GPUVM
+#endif // CONFIG_RUST_DRM_GPUVM
diff --git a/rust/kernel/drm/gpuvm/mod.rs b/rust/kernel/drm/gpuvm/mod.rs
index dc755f2481437..ae58f6f667c1f 100644
--- a/rust/kernel/drm/gpuvm/mod.rs
+++ b/rust/kernel/drm/gpuvm/mod.rs
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR MIT
-#![cfg(CONFIG_DRM_GPUVM = "y")]
+#![cfg(CONFIG_RUST_DRM_GPUVM)]
//! DRM GPUVM in immediate mode
//!