|
109 | 109 | #include "amdgpu_mca.h" |
110 | 110 | #include "amdgpu_ras.h" |
111 | 111 | #include "amdgpu_xcp.h" |
| 112 | +#include "amdgpu_seq64.h" |
| 113 | +#include "amdgpu_reg_state.h" |
112 | 114 |
|
113 | 115 | #define MAX_GPU_INSTANCE 64 |
114 | 116 |
|
@@ -468,6 +470,7 @@ struct amdgpu_fpriv { |
468 | 470 | struct amdgpu_vm vm; |
469 | 471 | struct amdgpu_bo_va *prt_va; |
470 | 472 | struct amdgpu_bo_va *csa_va; |
| 473 | + struct amdgpu_bo_va *seq64_va; |
471 | 474 | struct mutex bo_list_lock; |
472 | 475 | struct idr bo_list_handles; |
473 | 476 | struct amdgpu_ctx_mgr ctx_mgr; |
@@ -506,6 +509,31 @@ struct amdgpu_allowed_register_entry { |
506 | 509 | bool grbm_indexed; |
507 | 510 | }; |
508 | 511 |
|
| 512 | +/** |
| 513 | + * enum amd_reset_method - Methods for resetting AMD GPU devices |
| 514 | + * |
| 515 | + * @AMD_RESET_METHOD_NONE: The device will not be reset. |
| 516 | + * @AMD_RESET_LEGACY: Method reserved for SI, CIK and VI ASICs. |
| 517 | + * @AMD_RESET_MODE0: Reset the entire ASIC. Not currently available for the |
| 518 | + * any device. |
| 519 | + * @AMD_RESET_MODE1: Resets all IP blocks on the ASIC (SDMA, GFX, VCN, etc.) |
| 520 | + * individually. Suitable only for some discrete GPU, not |
| 521 | + * available for all ASICs. |
| 522 | + * @AMD_RESET_MODE2: Resets a lesser level of IPs compared to MODE1. Which IPs |
| 523 | + * are reset depends on the ASIC. Notably doesn't reset IPs |
| 524 | + * shared with the CPU on APUs or the memory controllers (so |
| 525 | + * VRAM is not lost). Not available on all ASICs. |
| 526 | + * @AMD_RESET_BACO: BACO (Bus Alive, Chip Off) method powers off and on the card |
| 527 | + * but without powering off the PCI bus. Suitable only for |
| 528 | + * discrete GPUs. |
| 529 | + * @AMD_RESET_PCI: Does a full bus reset using core Linux subsystem PCI reset |
| 530 | + * and does a secondary bus reset or FLR, depending on what the |
| 531 | + * underlying hardware supports. |
| 532 | + * |
| 533 | + * Methods available for AMD GPU driver for resetting the device. Not all |
| 534 | + * methods are suitable for every device. User can override the method using |
| 535 | + * module parameter `reset_method`. |
| 536 | + */ |
509 | 537 | enum amd_reset_method { |
510 | 538 | AMD_RESET_METHOD_NONE = -1, |
511 | 539 | AMD_RESET_METHOD_LEGACY = 0, |
@@ -585,6 +613,10 @@ struct amdgpu_asic_funcs { |
585 | 613 | const struct amdgpu_video_codecs **codecs); |
586 | 614 | /* encode "> 32bits" smn addressing */ |
587 | 615 | u64 (*encode_ext_smn_addressing)(int ext_id); |
| 616 | + |
| 617 | + ssize_t (*get_reg_state)(struct amdgpu_device *adev, |
| 618 | + enum amdgpu_reg_state reg_state, void *buf, |
| 619 | + size_t max_size); |
588 | 620 | }; |
589 | 621 |
|
590 | 622 | /* |
@@ -986,6 +1018,9 @@ struct amdgpu_device { |
986 | 1018 | /* GDS */ |
987 | 1019 | struct amdgpu_gds gds; |
988 | 1020 |
|
| 1021 | + /* for userq and VM fences */ |
| 1022 | + struct amdgpu_seq64 seq64; |
| 1023 | + |
989 | 1024 | /* KFD */ |
990 | 1025 | struct amdgpu_kfd_dev kfd; |
991 | 1026 |
|
|
0 commit comments