Skip to content

Commit 8624ca3

Browse files
committed
drm/asahi: Adapt debug_flags module parameter
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 1e1c97c commit 8624ca3

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

drivers/gpu/drm/asahi/asahi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ kernel::module_platform_driver! {
3535
params: {
3636
debug_flags: u64 {
3737
default: 0,
38-
permissions: 0o644,
38+
// permissions: 0o644,
3939
description: "Debug flags",
4040
},
4141
fault_control: u32 {

drivers/gpu/drm/asahi/debug.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
#[allow(unused_imports)]
77
pub(crate) use super::{cls_dev_dbg, cls_pr_debug, debug, mod_dev_dbg, mod_pr_debug};
8+
use crate::module_parameters;
89
use core::sync::atomic::{AtomicU64, Ordering};
910

1011
static DEBUG_FLAGS: AtomicU64 = AtomicU64::new(0);
@@ -74,10 +75,7 @@ pub(crate) enum DebugFlags {
7475

7576
/// Update the cached global debug flags from the module parameter
7677
pub(crate) fn update_debug_flags() {
77-
let flags = {
78-
let lock = crate::THIS_MODULE.kernel_param_lock();
79-
*crate::debug_flags.read(&lock)
80-
};
78+
let flags = *module_parameters::debug_flags.get();
8179

8280
DEBUG_FLAGS.store(flags, Ordering::Relaxed);
8381
}

0 commit comments

Comments
 (0)