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>
This commit is contained in:
Alice Ryhl
2026-04-27 10:54:51 +00:00
committed by Danilo Krummrich
parent 0b715b1e38
commit 37f748ed0c
3 changed files with 10 additions and 3 deletions

View File

@@ -218,6 +218,13 @@ config DRM_GPUVM
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

View File

@@ -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

View File

@@ -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
//!