Skip to content

Commit 6ff289d

Browse files
hoshinolinamarcan
authored andcommitted
drm/asahi: initdata,hw: Identify & set idle_off_standby_timer
Signed-off-by: Asahi Lina <lina@asahilina.net>
1 parent 2ce3cdb commit 6ff289d

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
@@ -270,8 +270,8 @@ pub(crate) struct HwConfig {
270270
/// HwDataShared3.table.
271271
pub(crate) shared3_tab: &'static [u32],
272272

273-
/// Globals.unk_hws2_0.
274-
pub(crate) unk_hws2_0: u32,
273+
/// Globals.idle_off_standby_timer.
274+
pub(crate) idle_off_standby_timer_default: u32,
275275
/// Globals.unk_hws2_4.
276276
pub(crate) unk_hws2_4: Option<[F32; 8]>,
277277
/// Globals.unk_hws2_24.
@@ -410,6 +410,8 @@ pub(crate) struct PwrConfig {
410410
pub(crate) fw_early_wake_timeout_ms: u32,
411411
/// Delay from the GPU becoming idle to powerdown
412412
pub(crate) idle_off_delay_ms: u32,
413+
/// Related to the above?
414+
pub(crate) idle_off_standby_timer: u32,
413415
/// Percent?
414416
pub(crate) perf_boost_ce_step: u32,
415417
/// Minimum utilization before performance state is increased in %.
@@ -604,6 +606,10 @@ impl PwrConfig {
604606
fender_idle_off_delay_ms: prop!("apple,fender-idle-off-delay-ms", 40),
605607
fw_early_wake_timeout_ms: prop!("apple,fw-early-wake-timeout-ms", 5),
606608
idle_off_delay_ms: prop!("apple,idle-off-delay-ms", 2),
609+
idle_off_standby_timer: prop!(
610+
"apple,idleoff-standby-timer",
611+
cfg.idle_off_standby_timer_default
612+
),
607613
perf_boost_ce_step: prop!("apple,perf-boost-ce-step", 25),
608614
perf_boost_min_util: prop!("apple,perf-boost-min-util", 100),
609615
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)