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
21 changes: 12 additions & 9 deletions Documentation/accel/apple-ane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -884,15 +884,18 @@ descriptor (BAR ID, bit offset and width) adds one custom-BAR record with
selector 1, value type 0 and the first pool DSID, 36. The scratch form sends
none.

Each H16_EXEC copies inputs into the private input mappings and poisons the
output mapping. It then sends 0x002d with 0, keeps the request UUID pending
before publishing EXECUTE on channel 7, and treats the channel-7 reply as
transport acknowledgment only. Completion is a state-1 0x0300 report whose
UUID, program, process and procedure IDs all match. Then 0x002d with 1 and
a DMA read barrier precede the output copy. A state-2 report, a mismatched
ID, a malformed report or a timeout quarantines the session. Reports with
an unknown UUID never complete a request. Closing the file sends TERMINATE
then UNLOAD. Mappings stay until reboot.
Each H16_EXEC copies inputs into the private input mappings and does not
touch the output mapping. The surfaces are zeroed at H16_LOAD and belong to
one open file, so output bytes that the engine does not write keep the
value of that file's previous execute. H16_EXEC then sends 0x002d with 0,
keeps the request UUID pending before publishing EXECUTE on channel 7, and
treats the channel-7 reply as transport acknowledgment only. Completion is
a state-1 0x0300 report whose UUID, program, process and procedure IDs all
match. Then 0x002d with 1 and a DMA read barrier precede the output copy. A
state-2 report, a mismatched ID, a malformed report or a timeout
quarantines the session. Reports with an unknown UUID never complete a
request. Closing the file sends TERMINATE then UNLOAD. Mappings stay until
reboot.

One program lifetime per firmware boot is mandatory. On this firmware
family the first EXECUTE of a newly loaded program can write into the
Expand Down
6 changes: 1 addition & 5 deletions drivers/accel/ane/ane_h16_accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,12 +720,8 @@ static int ane_h16_exec_ioctl(struct drm_device *drm, void *data, struct drm_fil
locked = ktime_get_ns();
/* This program's shared surfaces are ours through the final copy-out. */
for (i = 0; i < args->count && !in_place; i++) {
void *cpu = p->surfaces[i]->cpu;

if (p->resources[i].permissions == 1)
ane_h16_user_copy(&user[i], cpu, false);
else
memset(cpu, 0xff, buffers[i].size);
ane_h16_user_copy(&user[i], p->surfaces[i]->cpu, false);
}
ane_h16_session_sync(a->session, p, true);
copied = ktime_get_ns();
Expand Down
Loading