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
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,15 @@ patternProperties:
switched with interrupts disabled. Setting the state takes a
spinlock and polls the acknowledgment atomically.

apple,sleep-wakeup-path:
type: boolean
description:
The consumer of this entry can keep its firmware running through a
system sleep and is then on the wakeup path. The OS keeps the entry,
and the power states it is a child of, on through system sleep while
its consumer is on the wakeup path, as apple,sleep-wakeup-path does
for a PMGR power state.

required:
- compatible
- reg
Expand Down
10 changes: 10 additions & 0 deletions arch/arm64/boot/dts/apple/t6000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@
reg-names = "report", "ane-dvfs";
};

/*
* The external DCPs' firmware runs through s2idle and a sleep given up, and the DCP puts
* itself on the wakeup path for it. With APPLE_USE_PMP this entry is dcpext1's power domain:
* keep it, and the dispext1 power states under it, on then. dispext0's and disp0's entries
* have that from apple,always-on.
*/
&pmp_report_dispext1 {
apple,sleep-wakeup-path;
};

#ifdef APPLE_USE_PMP
/*
* The video encoder, AVD, the JPEG codecs, the scaler and the ProRes codec
Expand Down
8 changes: 8 additions & 0 deletions drivers/pmdomain/apple/pmp-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -3718,6 +3718,14 @@ static int apple_pmp_report_entry_probe(struct platform_device *pdev)
ent->sleep_release = false;
}
}
/*
* A consumer whose firmware keeps running through a system sleep puts itself on the
* wakeup path, as a PMGR state's consumer does for apple,sleep-wakeup-path. Keep the
* entry on with it then, and with the entry its parent power states: powered off in the
* noirq phase, they would take the firmware's power while it runs.
*/
if (of_property_read_bool(node, "apple,sleep-wakeup-path"))
ent->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;

ent->genpd.power_on = apple_pmp_report_entry_power_on;
ent->genpd.power_off = apple_pmp_report_entry_power_off;
Expand Down