Skip to content

Commit f802f66

Browse files
committed
drm/asahi: initdata,hw: Identify & set idle_off_standby_timer
Signed-off-by: Asahi Lina <[email protected]>
1 parent 0020825 commit f802f66

7 files changed

Lines changed: 14 additions & 8 deletions

File tree

drivers/gpu/drm/asahi/fw/initdata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ pub(crate) mod raw {
11211121
pub(crate) hws2: HwDataShared2,
11221122

11231123
#[ver(V >= V13_0B4)]
1124-
pub(crate) unk_hws2_0: u32,
1124+
pub(crate) idle_off_standby_timer: u32,
11251125

11261126
#[ver(V >= V13_0B4)]
11271127
pub(crate) unk_hws2_4: Array<0x8, F32>,

drivers/gpu/drm/asahi/hw/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ pub(crate) struct HwConfig {
273273
/// HwDataShared3.table.
274274
pub(crate) shared3_tab: &'static [u32],
275275

276-
/// Globals.unk_hws2_0.
277-
pub(crate) unk_hws2_0: u32,
276+
/// Globals.idle_off_standby_timer.
277+
pub(crate) idle_off_standby_timer_default: u32,
278278
/// Globals.unk_hws2_4.
279279
pub(crate) unk_hws2_4: Option<[F32; 8]>,
280280
/// Globals.unk_hws2_24.
@@ -413,6 +413,8 @@ pub(crate) struct PwrConfig {
413413
pub(crate) fw_early_wake_timeout_ms: u32,
414414
/// Delay from the GPU becoming idle to powerdown
415415
pub(crate) idle_off_delay_ms: u32,
416+
/// Related to the above?
417+
pub(crate) idle_off_standby_timer: u32,
416418
/// Percent?
417419
pub(crate) perf_boost_ce_step: u32,
418420
/// Minimum utilization before performance state is increased in %.
@@ -607,6 +609,10 @@ impl PwrConfig {
607609
fender_idle_off_delay_ms: prop!("apple,fender-idle-off-delay-ms", 40),
608610
fw_early_wake_timeout_ms: prop!("apple,fw-early-wake-timeout-ms", 5),
609611
idle_off_delay_ms: prop!("apple,idle-off-delay-ms", 2),
612+
idle_off_standby_timer: prop!(
613+
"apple,idleoff-standby-timer",
614+
cfg.idle_off_standby_timer_default
615+
),
610616
perf_boost_ce_step: prop!("apple,perf-boost-ce-step", 25),
611617
perf_boost_min_util: prop!("apple,perf-boost-min-util", 100),
612618
perf_filter_drop_threshold: prop!("apple,perf-filter-drop-threshold"),

drivers/gpu/drm/asahi/hw/t600x.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub(crate) const HWCONFIG_T6002: super::HwConfig = HwConfig {
9696
shared2_curves: None,
9797
shared3_unk: 0,
9898
shared3_tab: &[],
99-
unk_hws2_0: 0,
99+
idle_off_standby_timer_default: 0,
100100
unk_hws2_4: None,
101101
unk_hws2_24: 0,
102102
global_unk_54: 0xffff,

drivers/gpu/drm/asahi/hw/t602x.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub(crate) const HWCONFIG_T6022: super::HwConfig = HwConfig {
113113
shared3_tab: &[
114114
125, 125, 125, 125, 125, 125, 125, 125, 7500, 125, 125, 125, 125, 125, 125, 125,
115115
],
116-
unk_hws2_0: 700,
116+
idle_off_standby_timer_default: 700,
117117
unk_hws2_4: Some(f32!([1.0, 0.8, 0.2, 0.9, 0.1, 0.25, 0.5, 0.9])),
118118
unk_hws2_24: 6,
119119
global_unk_54: 4000,

drivers/gpu/drm/asahi/hw/t8103.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub(crate) const HWCONFIG: super::HwConfig = HwConfig {
5555
shared2_curves: None,
5656
shared3_unk: 0,
5757
shared3_tab: &[],
58-
unk_hws2_0: 0,
58+
idle_off_standby_timer_default: 0,
5959
unk_hws2_4: None,
6060
unk_hws2_24: 0,
6161
global_unk_54: 0xffff,

drivers/gpu/drm/asahi/hw/t8112.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub(crate) const HWCONFIG: super::HwConfig = HwConfig {
6666
10700, 10700, 10700, 10700, 10700, 6000, 1000, 1000, 1000, 10700, 10700, 10700, 10700,
6767
10700, 10700, 10700,
6868
],
69-
unk_hws2_0: 0,
69+
idle_off_standby_timer_default: 0,
7070
unk_hws2_4: None,
7171
unk_hws2_24: 0,
7272
global_unk_54: 0xffff,

drivers/gpu/drm/asahi/initdata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ impl<'a> InitDataBuilder::ver<'a> {
694694
hws2 <- Self::hw_shared2(cfg, dyncfg),
695695
hws3 <- Self::hw_shared3(cfg),
696696
#[ver(V >= V13_0B4)]
697-
unk_hws2_0: cfg.unk_hws2_0,
697+
idle_off_standby_timer: pwr.idle_off_standby_timer,
698698
#[ver(V >= V13_0B4)]
699699
unk_hws2_4: cfg.unk_hws2_4.map(Array::new).unwrap_or_default(),
700700
#[ver(V >= V13_0B4)]

0 commit comments

Comments
 (0)