Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/dep_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! #46,#1), which the resolver used to refuse as unmodeled bits.
use core::fmt::Write;
use core::sync::atomic::{AtomicI64, AtomicU64, Ordering};
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

use crate::g18::fw::submission::SubmissionError;

Expand Down Expand Up @@ -89,16 +89,10 @@ unsafe extern "C" fn stats_set(_: *const core::ffi::c_char, _: *const bindings::
static STATS_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(stats_set), get: Some(stats_get), free: None,
};
#[link_section = "__param"]
#[used]
static STATS_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_render_dep_stats"
} else { c"aurora.g17p_render_dep_stats" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&STATS_OPS), perm: 0o400, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
STATS_PARAM,
"g17p_render_dep_stats",
ops: core::ptr::from_ref(&STATS_OPS),
perm: 0o400,
arg: core::ptr::null_mut(),
);
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/dvfs_parity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! A change takes effect at the next submission or completion service.
use core::fmt::{self, Write};
use core::sync::atomic::{AtomicU32, AtomicU64, Ordering};
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

use crate::g18::compat::g17p::{self as policy, Config};

Expand Down Expand Up @@ -110,16 +110,10 @@ unsafe extern "C" fn parity_get(buf: *mut core::ffi::c_char,
static PARITY_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(parity_set), get: Some(parity_get), free: None,
};
#[link_section = "__param"]
#[used]
static PARITY_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_dvfs_parity"
} else { c"aurora.g17p_dvfs_parity" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&PARITY_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
PARITY_PARAM,
"g17p_dvfs_parity",
ops: core::ptr::from_ref(&PARITY_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! Reading returns up to 24 records from the cursor and advances it.
use core::fmt::{self, Write};
use core::sync::atomic::{AtomicPtr, AtomicU32, AtomicU64, AtomicUsize, Ordering};
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

pub(crate) const OPT_BASE: u32 = 1 << 0;
pub(crate) const OPT_MAILBOX: u32 = 1 << 1;
Expand Down Expand Up @@ -357,16 +357,10 @@ unsafe extern "C" fn e2e_get(buf: *mut core::ffi::c_char, _: *const bindings::ke
static E2E_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(e2e_set), get: Some(e2e_get), free: None,
};
#[link_section = "__param"]
#[used]
static E2E_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_e2e"
} else { c"aurora.g17p_e2e" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&E2E_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
E2E_PARAM,
"g17p_e2e",
ops: core::ptr::from_ref(&E2E_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/gem_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! `*_created` / `*_freed` totals show allocation churn.
use core::fmt::Write;
use core::sync::atomic::{AtomicU64, Ordering};
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

static USER_OBJECTS: AtomicU64 = AtomicU64::new(0);
static USER_BYTES: AtomicU64 = AtomicU64::new(0);
Expand Down Expand Up @@ -76,16 +76,10 @@ unsafe extern "C" fn stats_set(_: *const core::ffi::c_char, _: *const bindings::
static STATS_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(stats_set), get: Some(stats_get), free: None,
};
#[link_section = "__param"]
#[used]
static STATS_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"gem_stats"
} else { c"aurora.gem_stats" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&STATS_OPS), perm: 0o400, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
STATS_PARAM,
"gem_stats",
ops: core::ptr::from_ref(&STATS_OPS),
perm: 0o400,
arg: core::ptr::null_mut(),
);
102 changes: 36 additions & 66 deletions drivers/gpu/drm/asahi/g18/compat/host_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
//! each policy at `g17p_feed_perf_pct` percent of that policy's maximum.
use core::fmt::{self, Write};
use core::sync::atomic::{AtomicBool, AtomicPtr, AtomicU32, AtomicU64, Ordering};
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

pub(crate) const EARLY_PUBLISH: u32 = 1 << 0;
pub(crate) const FEED_PERF: u32 = 1 << 1;
Expand Down Expand Up @@ -713,68 +713,38 @@ static PCT_P_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
static PCT_E_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(pct_e_set), get: Some(pct_e_get), free: None,
};
#[link_section = "__param"]
#[used]
static MASK_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_host_path"
} else { c"aurora.g17p_host_path" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&MASK_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
#[link_section = "__param"]
#[used]
static PCT_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_feed_perf_pct"
} else { c"aurora.g17p_feed_perf_pct" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&PCT_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
#[link_section = "__param"]
#[used]
static DEPTH_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_early_depth"
} else { c"aurora.g17p_early_depth" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&DEPTH_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
#[link_section = "__param"]
#[used]
static PCT_P_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_feed_perf_pct_p"
} else { c"aurora.g17p_feed_perf_pct_p" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&PCT_P_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
#[link_section = "__param"]
#[used]
static PCT_E_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_feed_perf_pct_e"
} else { c"aurora.g17p_feed_perf_pct_e" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&PCT_E_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
MASK_PARAM,
"g17p_host_path",
ops: core::ptr::from_ref(&MASK_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
crate::g18::params::g18_kernel_param!(
PCT_PARAM,
"g17p_feed_perf_pct",
ops: core::ptr::from_ref(&PCT_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
crate::g18::params::g18_kernel_param!(
DEPTH_PARAM,
"g17p_early_depth",
ops: core::ptr::from_ref(&DEPTH_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
crate::g18::params::g18_kernel_param!(
PCT_P_PARAM,
"g17p_feed_perf_pct_p",
ops: core::ptr::from_ref(&PCT_P_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
crate::g18::params::g18_kernel_param!(
PCT_E_PARAM,
"g17p_feed_perf_pct_e",
ops: core::ptr::from_ref(&PCT_E_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/mem_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
//! Boot-only `g17p_gem_huge` (asahi.rs) is reported here too.
use core::fmt::{self, Write};
use core::sync::atomic::{AtomicU32, AtomicU64, Ordering};
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

pub(crate) const ASYNC_CLOSED_DRAIN: u32 = 1 << 0;
pub(crate) const MEM_STATS: u32 = 1 << 1;
Expand Down Expand Up @@ -221,16 +221,10 @@ unsafe extern "C" fn mask_get(buf: *mut core::ffi::c_char, _: *const bindings::k
static MASK_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(mask_set), get: Some(mask_get), free: None,
};
#[link_section = "__param"]
#[used]
static MASK_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_mem_path"
} else { c"aurora.g17p_mem_path" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&MASK_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
MASK_PARAM,
"g17p_mem_path",
ops: core::ptr::from_ref(&MASK_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/queue_slots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! or submit says which pool ran out.
use core::fmt::Write;
use core::sync::atomic::{AtomicU32, AtomicU64, Ordering};
use kernel::{bindings, module_param::KernelParam, prelude::*};
use kernel::{bindings, prelude::*};

use crate::g18::compat::g17p::{self as g17_channel, QID_COUNT};

Expand Down Expand Up @@ -173,16 +173,10 @@ unsafe extern "C" fn slots_set(_: *const core::ffi::c_char, _: *const bindings::
static SLOTS_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(slots_set), get: Some(slots_get), free: None,
};
#[link_section = "__param"]
#[used]
static SLOTS_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_queue_slots"
} else { c"aurora.g17p_queue_slots" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&SLOTS_OPS), perm: 0o400, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
SLOTS_PARAM,
"g17p_queue_slots",
ops: core::ptr::from_ref(&SLOTS_OPS),
perm: 0o400,
arg: core::ptr::null_mut(),
);
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/recovery_isolation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
use core::fmt::{self, Write};
use core::sync::atomic::{AtomicU32, AtomicU64, Ordering};
#[cfg(not(test))]
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

pub(crate) const INNOCENT: u32 = 1 << 0;
pub(crate) const ADMISSION_WAIT: u32 = 1 << 1;
Expand Down Expand Up @@ -629,16 +629,10 @@ static MASK_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(mask_set), get: Some(mask_get), free: None,
};
#[cfg(not(test))]
#[link_section = "__param"]
#[used]
static MASK_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_recovery_isolation"
} else { c"aurora.g17p_recovery_isolation" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&MASK_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
MASK_PARAM,
"g17p_recovery_isolation",
ops: core::ptr::from_ref(&MASK_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
22 changes: 8 additions & 14 deletions drivers/gpu/drm/asahi/g18/compat/recovery_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
//! logged (rate-limited) and counted, independent of the mask.
use core::fmt::{self, Write};
use core::sync::atomic::{AtomicU32, AtomicU64, Ordering};
use kernel::{bindings, module_param::KernelParam};
use kernel::bindings;

pub(crate) const RECLAIM_DRAINED: u32 = 1 << 0;
pub(crate) const CONTROL_TRACE: u32 = 1 << 1;
Expand Down Expand Up @@ -384,16 +384,10 @@ unsafe extern "C" fn mask_get(buf: *mut core::ffi::c_char, _: *const bindings::k
static MASK_OPS: bindings::kernel_param_ops = bindings::kernel_param_ops {
flags: 0, set: Some(mask_set), get: Some(mask_get), free: None,
};
#[link_section = "__param"]
#[used]
static MASK_PARAM: KernelParam = KernelParam::new(bindings::kernel_param {
name: kernel::str::as_char_ptr_in_const_context(if cfg!(MODULE) {
c"g17p_recovery_path"
} else { c"aurora.g17p_recovery_path" }),
#[cfg(MODULE)]
mod_: unsafe { core::ptr::from_ref(&bindings::__this_module).cast_mut() },
#[cfg(not(MODULE))]
mod_: core::ptr::null_mut(),
ops: core::ptr::from_ref(&MASK_OPS), perm: 0o600, level: -1, flags: 0,
__bindgen_anon_1: bindings::kernel_param__bindgen_ty_1 { arg: core::ptr::null_mut() },
});
crate::g18::params::g18_kernel_param!(
MASK_PARAM,
"g17p_recovery_path",
ops: core::ptr::from_ref(&MASK_OPS),
perm: 0o600,
arg: core::ptr::null_mut(),
);
Loading
Loading