mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-21 22:47:51 -04:00
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:
committed by
Danilo Krummrich
parent
0b715b1e38
commit
37f748ed0c
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
//!
|
||||
|
||||
Reference in New Issue
Block a user