Commit c8b2e21
committed
accel/amdxdna: add DRAM work buffer support for AIE4 devices
NPU firmware requires a host-allocated DRAM work buffer before any
hardware contexts can be created. Allocate a 4 MB (power-of-2
aligned) buffer during device init via the common
amdxdna_alloc_msg_buffer() helper and attach it to firmware after
mailbox init. The firmware releases the buffer internally during its
suspend sequence, so no explicit detach is needed from the driver.
Add the attach_work_buffer mailbox message, using GENMASK/FIELD_PREP
for PASID register encoding.
Signed-off-by: Nishad Saraf <nishads@amd.com>1 parent ee8ea3e commit c8b2e21
File tree
4 files changed
+99
-2
lines changed- drivers/accel/amdxdna
4 files changed
+99
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
49 | 66 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
237 | 273 | | |
238 | 274 | | |
239 | 275 | | |
| |||
247 | 283 | | |
248 | 284 | | |
249 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
250 | 294 | | |
251 | 295 | | |
| 296 | + | |
| 297 | + | |
252 | 298 | | |
253 | 299 | | |
254 | 300 | | |
| |||
459 | 505 | | |
460 | 506 | | |
461 | 507 | | |
| 508 | + | |
462 | 509 | | |
463 | 510 | | |
464 | 511 | | |
| |||
474 | 521 | | |
475 | 522 | | |
476 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
477 | 528 | | |
478 | 529 | | |
479 | 530 | | |
480 | | - | |
| 531 | + | |
481 | 532 | | |
482 | 533 | | |
483 | 534 | | |
484 | 535 | | |
485 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
486 | 541 | | |
487 | 542 | | |
488 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
0 commit comments