Commit graph

156 commits

Author SHA1 Message Date
Janne Grunau
22890f3ba1 experiments: Optimize bad apple video playback
Let ffmpeg rotate, align to stride and convert to RGBA.
Do not allocate a framebuffer for every frame.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-04-16 17:11:33 +09:00
Sasha Finkelstein
5681036b2e Add touchbar screen experiments
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
2023-04-15 17:23:36 +09:00
Hector Martin
06884b5613 experiments/cpu_pstate_latencies.py: Fix SoC configs
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 21:04:40 +09:00
Mario Hros
69012c0702 experiments/cpu_pstate_latencies.py: Extend for T6021
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:12 +09:00
Eileen Yoon
6ce14d8735 m1n1/ane: Initial commit
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:10:15 +09:00
Hector Martin
8be0596ae8 experiments/mtp.py: Fix DART stuff
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-03-15 13:54:35 +09:00
Asahi Lina
90f4957725 experiments/agx_xtest.py: Here be exploits!
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-03-06 15:15:17 +09:00
Janne Grunau
5f3bd50b4a experiments/dart_dump.py: Fix register dump after 183991ca19
Fixes: 183991ca19 ("m1n1.hw.dart: Hide all DART variants behind common interface")
Signed-off-by: Janne Grunau <j@jannau.net>
2023-02-02 09:50:56 +09:00
Janne Grunau
5631aaa74a experiments/scaler.py: Use unified DART implementation
Untested if that makes this work on M1 systems which use dart8020 for
the scaler.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-01-28 10:48:46 +09:00
Janne Grunau
68bba35263 experiments/aes.py: Simplify by using unified DART
Signed-off-by: Janne Grunau <j@jannau.net>
2023-01-28 10:48:46 +09:00
Hector Martin
46f2811351 m1n1.fw.dcp.iboot: Identify colorspace values
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-01-22 23:57:41 +09:00
Hector Martin
586157b8bf experiments/smc_watcher.py: new experiment
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-12-26 15:07:52 +09:00
Asahi Lina
1b9cb35104 experiments/agx_*.py: Autodetect FW version and GPU rev
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:17:10 +09:00
Asahi Lina
9e65bd527b experiments/agx_{parallel,renderframe}.py: Misc fixes
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:17:10 +09:00
Asahi Lina
808baf22df m1n1.agx: Initial T600x port
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:17:10 +09:00
Asahi Lina
e50be4bf0d experiments/agx_tlb.py: Misc tracing changes
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:15:55 +09:00
Asahi Lina
f92be5a076 experiments/agx_parallel.py: Uncomment some power-related tracers
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:15:55 +09:00
Asahi Lina
6a0008884d m1n1.agx: Add an initdata hook
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-12-04 13:15:55 +09:00
Janne Grunau
71baff4adc experiments/dcp.py: Set the display with surface swap
Needs testing on DP/HDMI outputs.

Signed-off-by: Janne Grunau <j@jannau.net>
2022-11-29 01:36:14 +09:00
Janne Grunau
98e8e48171 experiments/dcp.py: Add set_digital_out_mode call
Initializes the display if not already done by iboot/m1n1. Not expected
to change anything for disp0 but might be helful in bringing DP alt
mode for dispexp[0-7].

Signed-off-by: Janne Grunau <j@jannau.net>
2022-11-29 01:36:14 +09:00
Janne Grunau
053eb7bfda experiments/dcp.py: Handle external displays correctly
Pass disp0's comaptible string to DCPManager.
Fixes Mac Studio and M1 Macbook handling.

Signed-off-by: Janne Grunau <j@jannau.net>
2022-11-29 01:36:14 +09:00
Martin Povišer
de0c0323a5 experiments/mmio_sweep.py: Patch in AOP power-domains on t6000
The ADT lacks some of the info on AOP power domains on t6000, so fill
that in manually.

Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-11-04 12:36:49 +09:00
Martin Povišer
fc66046d76 experiments/aop.py: Extend AOP experiment, add tracer
The AOP uses an 'EPIC' protocol similar to the one other coprocessor
firmware is using but not in the exact same version. Add code for
tracing the AOP calls and extend the aop.py experiment with the client
side of it. Include description of audio calls and some other calls
related to sensor discovery.

Furthermore, in experiments/aop.py, do some AOP audio setup. Once that
is done we can start streaming samples from the internal microphones by
making what AOP considers power state adjustment calls. That is, we
adjust the power state of a 'hpai' device, first to a 'pw1 ' stage,
then to 'pwrd' stage.

So, to see microphone samples, enter the AOP experiment shell first:

  $ M1N1DEVICE=/dev/ttyACM0 experiments/aop.py

Within the shell, adjust the power state of 'hpai':

  >>> aop_set_audio_pstate('hpai', 'pw1 ')

At that point /arm-io/admac-aop-audio powers up. In parallel to the AOP
shell, we can start tools/admac_stream.py on the just powered-up ADMAC
instance:

  $ M1N1HEAP=0x10010000000 M1N1DEVICE=/dev/ttyACM1 tools/admac_stream.py \
        --node admac-aop-audio --channel 1 -v | xxd -g 4 -c 12 -e

Returning back to the AOP shell, we can then set 'hpai' to 'pwrd' state
to kick off the streaming:

  >>> aop_set_audio_pstate('hpai', 'pwrd')

By that point, we should see samples coming out on the ADMAC end. The
samples are 32-bit floats packed in groups of three in a frame, e.g.

00000000: ba7ac6a7 ba32d3c3 baa17ae2  ..z...2..z..
0000000c: 38ccea5f b99c1a37 ba0c4bb1  _..87....K..
00000018: 39d2354f 3964b5ff 39b209fb  O5.9..d9...9
00000024: b96a1d1f 39c8503f 3958fc4f  ..j.?P.9O.X9
00000030: b6b1f5ff 39c72b8f 39bbe017  .....+.9...9
0000003c: 3a912de5 36dd4f7f 37f1147f  .-.:.O.6...7

This has been tested and will to some degree be specific to 2021 Macbook
Pro (t6000). Differences on other models TBD (at the very least the
number of microphones can be presumed different).

Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-11-04 12:36:49 +09:00
Martin Povišer
2bacc044e8 m1n1.fw.aop: Move bootargs helpers to new class AOPBase
The new class can possibly be shared between the m1n1 AOP tracer and
AOP client.

Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-11-04 12:36:49 +09:00
Martin Povišer
6ad59beb0c experiments/aop.py: Allocate oslog buffer on request
We need to allocate a buffer for the AOP on the OSLog endpoint for it to
fully boot. Copy in a modified version of the general OSLog endpoint
driver to do that.

Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-11-04 12:36:49 +09:00
Martin Povišer
f87d65a971 experiments/aop.py: Make _bootargs_span a property
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-11-04 12:36:49 +09:00
Martin Povišer
1d2a157fe8 m1n1.fw.aop: Split off ASCArgumentSection from experiments/aop.py
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-11-04 12:36:49 +09:00
Martin Povišer
79890a15d6 experiments/aop.py: Work around ADT inconsistencies
In t6000 ADT, the AOP SRAM base is specified *including* the bus offset
where the bus offset isn't expected, so our decoding of it includes the
bus offset twice. Patch it.

Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-11-04 12:36:49 +09:00
R
9a23d55b83 scaler: Can scale W larger
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
R
642f3af5e8 scaler: Basic scaling kinda works
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
R
fc6378a86a scaler: Imports from RE
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
R
8cea72dfab scaler: clarify flip/rotate
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
R
a10865bf11 scaler: Understand most basic of w/h
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
R
31c80bca04 scaler: work out flip/rotate
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
R
7559de8705 scaler: Can copy data without changing
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
R
784febab4c scaler: initial commit
Signed-off-by: R <rqou@berkeley.edu>
2022-11-04 12:32:23 +09:00
Asahi Lina
d1a3b8c7fa experiments/agx_dumpstructs.py: Dump microsequence
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Asahi Lina
0e8a522845 experiments/agx_renderframe.py: Rework based on the other demos
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-09-27 06:02:28 +09:00
Hector Martin
281784d48e experiments/dcpext_iboot.py: displayRequest() works now
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:32:35 +09:00
Hector Martin
270f864ae9 m1n1.fw.afk.epic: Implement system endpoint & debug enable
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-31 02:14:54 +09:00
Janne Grunau
5e6a6abcfb experiments/dcp.py: replace image loading with rainbow
A couple of p.memset32() are much faster than uploading an image over
the virtualized uart.
Avoids creating resolution dependent framebuffer data files.

Signed-off-by: Janne Grunau <j@jannau.net>
2022-08-30 22:32:30 +09:00
Janne Grunau
27439718e4 experiments/dcp.py: adapt update_notify_clients_dcp to macos 12.3 API
Signed-off-by: Janne Grunau <j@jannau.net>
2022-08-30 22:32:30 +09:00
Martin Povišer
7de6d56274 experiments/speaker_amp.py: Fix AUDIO_P power-domain index
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-08-30 22:29:41 +09:00
Hector Martin
692817f382 experiments/dcpext_iboot.py: Separate experiment for dcpext stuff
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-30 21:39:38 +09:00
Hector Martin
d0ba79fde2 m1n1.fw.dcp: Support multi-unit EPIC services, refactor, add stuff
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-08-30 21:38:45 +09:00
Asahi Lina
cfca18b83a experiments: Add misc AGX experiments
A lot of these are broken/out of date with the current code, but it's
good to have them committed...

Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 15:00:00 +09:00
Asahi Lina
2ce4db9d8d experiments/dcp_iboot.py: Fix p.display_shutdown() call
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 15:00:00 +09:00
Asahi Lina
ec3cc1bad3 experiments/agx_1tri.py: Updates for new structs
This is probably broken anyway, but worth keeping around for
reference...

Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:46:07 +09:00
Asahi Lina
eedaf2941a m1n1.setup: Always reset PMU boot error counters
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Hector Martin
c6e95657c3 experiments/mtp.py: Dump info
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 20:14:48 +09:00