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
15 changes: 15 additions & 0 deletions drivers/soc/apple/t6030-j516s-pmp.dtso
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@
status = "disabled";
};

/*
* The GPU's request: AGX, soc-device record 4 in the ADT
* iop-pmp-nub. macOS 27.2 holds it while its GPU driver runs,
* withdraws it before GFX goes off for a sleep and makes it
* again once GFX is back. The gate links the GPU to it
* (apple,pmp-report-entry); the GPU driver makes it.
*/
pmp_report_agx: report@4 {
compatible = "apple,t6000-pmp-v2-report-entry";
reg = <0x4>;
label = "pmp-agx";
#power-domain-cells = <0>;
phandle = <0x103>;
};

pmp_report_ans: report@10 {
compatible = "apple,t6000-pmp-v2-report-entry";
reg = <0x10>;
Expand Down
15 changes: 15 additions & 0 deletions drivers/soc/apple/t6030-pmp.dtso
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@
status = "disabled";
};

/*
* The GPU's request: AGX, soc-device record 4 in the ADT
* iop-pmp-nub. macOS 27.2 holds it while its GPU driver runs,
* withdraws it before GFX goes off for a sleep and makes it
* again once GFX is back. The gate links the GPU to it
* (apple,pmp-report-entry); the GPU driver makes it.
*/
pmp_report_agx: report@4 {
compatible = "apple,t6000-pmp-v2-report-entry";
reg = <0x4>;
label = "pmp-agx";
#power-domain-cells = <0>;
phandle = <0x103>;
};

pmp_report_ans: report@10 {
compatible = "apple,t6000-pmp-v2-report-entry";
reg = <0x10>;
Expand Down
11 changes: 11 additions & 0 deletions tools/asahi/t6030-pmp-graph-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ def read_source(path):
source = read_source(extract.REPORT)
overlay = (ROOT / 'drivers/soc/apple/t6030-pmp.dtso').read_text()
entries = []
gpu_requests = []
for node in re.findall(r'report@[0-9a-f]+\s*\{(.*?)\n\s*\};', overlay, re.S):
reg = int(re.search(r'reg = <(0x[0-9a-f]+|[0-9]+)>', node)[1], 0)
# The GPU's AGX request (reg 4) is made by the GPU driver through
# apple_pmp_report_entry_request(), never by the PMP start: keep it out
# of the startup graph, and require it to stay out of the seed.
if 'label = "pmp-agx";' in node:
gpu_requests.append(node)
assert reg == 4
assert not any(p in node for p in ('apple,always-on;', 'apple,no-ack;',
'apple,defer-startup-ack;', 'apple,irq-safe;'))
continue
entries.append((reg, 'apple,always-on;' in node, 'apple,no-ack;' in node, 'apple,defer-startup-ack;' in node,
'apple,irq-safe;' in node))
assert len(entries) == 4
assert len(gpu_requests) == 1
entry_data = ',\n'.join('{%d, %d, %d, %d, %d}' % e for e in entries)
names = ['static int apple_pmp_report_record(', 'static int apple_pmp_report_bit(', 'static int apple_pmp_start_check_layout(',
'static int apple_pmp_start_describe(', 'static void apple_pmp_start_finish(',
Expand Down
Loading