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>
GPU-VM representation providing helpers to manage a GPUs virtual
address space
+config RUST_DRM_GPUVM
+ bool
+ depends on DRM
+ select DRM_GPUVM
+ help
+ Choose this if you need GPUVM functions in Rust
+
config DRM_GPUSVM
tristate
depends on DRM
// SPDX-License-Identifier: GPL-2.0 or MIT
-#ifdef CONFIG_DRM_GPUVM
+#ifdef CONFIG_RUST_DRM_GPUVM
#include <drm/drm_gpuvm.h>
return drm_gpuvm_is_extobj(gpuvm, obj);
}
-#endif // CONFIG_DRM_GPUVM
+#endif // CONFIG_RUST_DRM_GPUVM
// SPDX-License-Identifier: GPL-2.0 OR MIT
-#![cfg(CONFIG_DRM_GPUVM = "y")]
+#![cfg(CONFIG_RUST_DRM_GPUVM)]
//! DRM GPUVM in immediate mode
//!