Rust DRM build fix
Subsystems (4)
cover Rust DRM build fix
rust drm gem shmem doesn't builds due to an import error of ARef from types instead of sync.
This series fixes that and also makes CONFIG_RUST_DRM_GEM_SHMEM_HELPER dependent of RUST and making it selectable from menuconfig.
Mukesh Kumar Chaurasiya (IBM) (2):
rust/drm: import ARef from sync crate
drm: Make CONFIG_RUST_DRM_GEM_SHMEM_HELPER selectable from menuconfig
drivers/gpu/drm/Kconfig | 4 ++-- rust/kernel/drm/gem/shmem.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.53.0
PATCH 1/2 rust/drm: import ARef from sync crate
ARef is defined in sync and is getting used from types causing the build to fail.
Fix this by using ARef from sync crate.
--- rust/kernel/drm/gem/shmem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/drm/gem/shmem.rs +1 -1
@@ -19,8 +19,8 @@ }, error::to_result, prelude::*, + sync::aref::ARef, types::{ -ARef ,Opaque ,// }, // };
Signature · 1 line
2.53.0
PATCH 2/2 drm: Make CONFIG_RUST_DRM_GEM_SHMEM_HELPER selectable from menuconfig
In reply to Mukesh Kumar Chaurasiya (IBM)CONFIG_RUST_DRM_GEM_SHMEM_HELPER doesn't have a description leading to not show up as a selectable menu item in menuconfig. Along side it's not dependent on rust.
Fix this by making CONFIG_RUST_DRM_GEM_SHMEM_HELPER dependent on CONFIG_RUST and give it a description string so that it can be selected from menuconfig.
--- drivers/gpu/drm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/Kconfig +2 -2
@@ -269,8 +269,8 @@ config DRM_GEM_SHMEM_HELPER Choose this if you need the GEM shmem helper functions config RUST_DRM_GEM_SHMEM_HELPER - bool - depends on DRM && MMU + bool "Rust GEM shmem helper functions" + depends on DRM && MMU && RUST select DRM_GEM_SHMEM_HELPER help Choose this if you need the GEM shmem helper functions In Rust
Signature · 1 line
2.53.0
Thomas Zimmermann
maintainerHi
Am 26.04.26 um 10:22 schrieb Mukesh Kumar Chaurasiya (IBM):
Quoted 5 lines
rust drm gem shmem doesn't builds due to an import error of ARef from types instead of sync.
This series fixes that and also makes
CONFIG_RUST_DRM_GEM_SHMEM_HELPERdependent of RUST and making it selectable from menuconfig.
Memory managers are selected by drivers, not by users. You have to fix the driver rules instead.
Best regards
Thomas
Quoted 9 lines
Mukesh Kumar Chaurasiya (IBM) (2):
rust/drm: import ARef from sync crate
drm: MakeCONFIG_RUST_DRM_GEM_SHMEM_HELPERselectable from menuconfigdrivers/gpu/drm/Kconfig | 4 ++-- rust/kernel/drm/gem/shmem.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 6 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)