1 1.3 riastrad /* $NetBSD: amdgpu_psp.h,v 1.3 2021/12/19 12:21:29 riastradh Exp $ */ 2 1.1 riastrad 3 1.1 riastrad /* 4 1.1 riastrad * Copyright 2016 Advanced Micro Devices, Inc. 5 1.1 riastrad * 6 1.1 riastrad * Permission is hereby granted, free of charge, to any person obtaining a 7 1.1 riastrad * copy of this software and associated documentation files (the "Software"), 8 1.1 riastrad * to deal in the Software without restriction, including without limitation 9 1.1 riastrad * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 1.1 riastrad * and/or sell copies of the Software, and to permit persons to whom the 11 1.1 riastrad * Software is furnished to do so, subject to the following conditions: 12 1.1 riastrad * 13 1.1 riastrad * The above copyright notice and this permission notice shall be included in 14 1.1 riastrad * all copies or substantial portions of the Software. 15 1.1 riastrad * 16 1.1 riastrad * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 1.1 riastrad * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 1.1 riastrad * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 1.1 riastrad * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 1.1 riastrad * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 1.1 riastrad * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 1.1 riastrad * OTHER DEALINGS IN THE SOFTWARE. 23 1.1 riastrad * 24 1.1 riastrad * Author: Huang Rui 25 1.1 riastrad * 26 1.1 riastrad */ 27 1.1 riastrad #ifndef __AMDGPU_PSP_H__ 28 1.1 riastrad #define __AMDGPU_PSP_H__ 29 1.1 riastrad 30 1.1 riastrad #include "amdgpu.h" 31 1.1 riastrad #include "psp_gfx_if.h" 32 1.1 riastrad #include "ta_xgmi_if.h" 33 1.1 riastrad #include "ta_ras_if.h" 34 1.1 riastrad 35 1.1 riastrad #define PSP_FENCE_BUFFER_SIZE 0x1000 36 1.1 riastrad #define PSP_CMD_BUFFER_SIZE 0x1000 37 1.1 riastrad #define PSP_XGMI_SHARED_MEM_SIZE 0x4000 38 1.1 riastrad #define PSP_RAS_SHARED_MEM_SIZE 0x4000 39 1.1 riastrad #define PSP_1_MEG 0x100000 40 1.1 riastrad #define PSP_TMR_SIZE 0x400000 41 1.1 riastrad #define PSP_HDCP_SHARED_MEM_SIZE 0x4000 42 1.1 riastrad #define PSP_DTM_SHARED_MEM_SIZE 0x4000 43 1.1 riastrad #define PSP_SHARED_MEM_SIZE 0x4000 44 1.1 riastrad 45 1.1 riastrad struct psp_context; 46 1.1 riastrad struct psp_xgmi_node_info; 47 1.1 riastrad struct psp_xgmi_topology_info; 48 1.1 riastrad 49 1.1 riastrad enum psp_bootloader_cmd { 50 1.1 riastrad PSP_BL__LOAD_SYSDRV = 0x10000, 51 1.1 riastrad PSP_BL__LOAD_SOSDRV = 0x20000, 52 1.1 riastrad PSP_BL__LOAD_KEY_DATABASE = 0x80000, 53 1.1 riastrad PSP_BL__DRAM_LONG_TRAIN = 0x100000, 54 1.1 riastrad PSP_BL__DRAM_SHORT_TRAIN = 0x200000, 55 1.1 riastrad }; 56 1.1 riastrad 57 1.1 riastrad enum psp_ring_type 58 1.1 riastrad { 59 1.1 riastrad PSP_RING_TYPE__INVALID = 0, 60 1.1 riastrad /* 61 1.1 riastrad * These values map to the way the PSP kernel identifies the 62 1.1 riastrad * rings. 63 1.1 riastrad */ 64 1.1 riastrad PSP_RING_TYPE__UM = 1, /* User mode ring (formerly called RBI) */ 65 1.1 riastrad PSP_RING_TYPE__KM = 2 /* Kernel mode ring (formerly called GPCOM) */ 66 1.1 riastrad }; 67 1.1 riastrad 68 1.1 riastrad struct psp_ring 69 1.1 riastrad { 70 1.1 riastrad enum psp_ring_type ring_type; 71 1.1 riastrad struct psp_gfx_rb_frame *ring_mem; 72 1.1 riastrad uint64_t ring_mem_mc_addr; 73 1.1 riastrad void *ring_mem_handle; 74 1.1 riastrad uint32_t ring_size; 75 1.1 riastrad }; 76 1.1 riastrad 77 1.1 riastrad /* More registers may will be supported */ 78 1.1 riastrad enum psp_reg_prog_id { 79 1.1 riastrad PSP_REG_IH_RB_CNTL = 0, /* register IH_RB_CNTL */ 80 1.1 riastrad PSP_REG_IH_RB_CNTL_RING1 = 1, /* register IH_RB_CNTL_RING1 */ 81 1.1 riastrad PSP_REG_IH_RB_CNTL_RING2 = 2, /* register IH_RB_CNTL_RING2 */ 82 1.1 riastrad PSP_REG_LAST 83 1.1 riastrad }; 84 1.1 riastrad 85 1.1 riastrad struct psp_funcs 86 1.1 riastrad { 87 1.1 riastrad int (*init_microcode)(struct psp_context *psp); 88 1.1 riastrad int (*bootloader_load_kdb)(struct psp_context *psp); 89 1.1 riastrad int (*bootloader_load_sysdrv)(struct psp_context *psp); 90 1.1 riastrad int (*bootloader_load_sos)(struct psp_context *psp); 91 1.1 riastrad int (*ring_init)(struct psp_context *psp, enum psp_ring_type ring_type); 92 1.1 riastrad int (*ring_create)(struct psp_context *psp, 93 1.1 riastrad enum psp_ring_type ring_type); 94 1.1 riastrad int (*ring_stop)(struct psp_context *psp, 95 1.1 riastrad enum psp_ring_type ring_type); 96 1.1 riastrad int (*ring_destroy)(struct psp_context *psp, 97 1.1 riastrad enum psp_ring_type ring_type); 98 1.1 riastrad bool (*compare_sram_data)(struct psp_context *psp, 99 1.1 riastrad struct amdgpu_firmware_info *ucode, 100 1.1 riastrad enum AMDGPU_UCODE_ID ucode_type); 101 1.1 riastrad bool (*smu_reload_quirk)(struct psp_context *psp); 102 1.1 riastrad int (*mode1_reset)(struct psp_context *psp); 103 1.1 riastrad int (*xgmi_get_node_id)(struct psp_context *psp, uint64_t *node_id); 104 1.1 riastrad int (*xgmi_get_hive_id)(struct psp_context *psp, uint64_t *hive_id); 105 1.1 riastrad int (*xgmi_get_topology_info)(struct psp_context *psp, int number_devices, 106 1.1 riastrad struct psp_xgmi_topology_info *topology); 107 1.1 riastrad int (*xgmi_set_topology_info)(struct psp_context *psp, int number_devices, 108 1.1 riastrad struct psp_xgmi_topology_info *topology); 109 1.1 riastrad bool (*support_vmr_ring)(struct psp_context *psp); 110 1.1 riastrad int (*ras_trigger_error)(struct psp_context *psp, 111 1.1 riastrad struct ta_ras_trigger_error_input *info); 112 1.1 riastrad int (*ras_cure_posion)(struct psp_context *psp, uint64_t *mode_ptr); 113 1.1 riastrad int (*rlc_autoload_start)(struct psp_context *psp); 114 1.1 riastrad int (*mem_training_init)(struct psp_context *psp); 115 1.1 riastrad void (*mem_training_fini)(struct psp_context *psp); 116 1.1 riastrad int (*mem_training)(struct psp_context *psp, uint32_t ops); 117 1.1 riastrad uint32_t (*ring_get_wptr)(struct psp_context *psp); 118 1.1 riastrad void (*ring_set_wptr)(struct psp_context *psp, uint32_t value); 119 1.1 riastrad }; 120 1.1 riastrad 121 1.1 riastrad #define AMDGPU_XGMI_MAX_CONNECTED_NODES 64 122 1.1 riastrad struct psp_xgmi_node_info { 123 1.1 riastrad uint64_t node_id; 124 1.1 riastrad uint8_t num_hops; 125 1.1 riastrad uint8_t is_sharing_enabled; 126 1.1 riastrad enum ta_xgmi_assigned_sdma_engine sdma_engine; 127 1.1 riastrad }; 128 1.1 riastrad 129 1.1 riastrad struct psp_xgmi_topology_info { 130 1.1 riastrad uint32_t num_nodes; 131 1.1 riastrad struct psp_xgmi_node_info nodes[AMDGPU_XGMI_MAX_CONNECTED_NODES]; 132 1.1 riastrad }; 133 1.1 riastrad 134 1.1 riastrad struct psp_asd_context { 135 1.1 riastrad bool asd_initialized; 136 1.1 riastrad uint32_t session_id; 137 1.1 riastrad }; 138 1.1 riastrad 139 1.1 riastrad struct psp_xgmi_context { 140 1.1 riastrad uint8_t initialized; 141 1.1 riastrad uint32_t session_id; 142 1.1 riastrad struct amdgpu_bo *xgmi_shared_bo; 143 1.1 riastrad uint64_t xgmi_shared_mc_addr; 144 1.1 riastrad void *xgmi_shared_buf; 145 1.1 riastrad struct psp_xgmi_topology_info top_info; 146 1.1 riastrad }; 147 1.1 riastrad 148 1.1 riastrad struct psp_ras_context { 149 1.1 riastrad /*ras fw*/ 150 1.1 riastrad bool ras_initialized; 151 1.1 riastrad uint32_t session_id; 152 1.1 riastrad struct amdgpu_bo *ras_shared_bo; 153 1.1 riastrad uint64_t ras_shared_mc_addr; 154 1.1 riastrad void *ras_shared_buf; 155 1.1 riastrad struct amdgpu_ras *ras; 156 1.1 riastrad }; 157 1.1 riastrad 158 1.1 riastrad struct psp_hdcp_context { 159 1.1 riastrad bool hdcp_initialized; 160 1.1 riastrad uint32_t session_id; 161 1.1 riastrad struct amdgpu_bo *hdcp_shared_bo; 162 1.1 riastrad uint64_t hdcp_shared_mc_addr; 163 1.1 riastrad void *hdcp_shared_buf; 164 1.1 riastrad }; 165 1.1 riastrad 166 1.1 riastrad struct psp_dtm_context { 167 1.1 riastrad bool dtm_initialized; 168 1.1 riastrad uint32_t session_id; 169 1.1 riastrad struct amdgpu_bo *dtm_shared_bo; 170 1.1 riastrad uint64_t dtm_shared_mc_addr; 171 1.1 riastrad void *dtm_shared_buf; 172 1.1 riastrad }; 173 1.1 riastrad 174 1.1 riastrad #define MEM_TRAIN_SYSTEM_SIGNATURE 0x54534942 175 1.1 riastrad #define GDDR6_MEM_TRAINING_DATA_SIZE_IN_BYTES 0x1000 176 1.1 riastrad #define GDDR6_MEM_TRAINING_OFFSET 0x8000 177 1.1 riastrad /*Define the VRAM size that will be encroached by BIST training.*/ 178 1.1 riastrad #define GDDR6_MEM_TRAINING_ENCROACHED_SIZE 0x2000000 179 1.1 riastrad 180 1.1 riastrad enum psp_memory_training_init_flag { 181 1.1 riastrad PSP_MEM_TRAIN_NOT_SUPPORT = 0x0, 182 1.1 riastrad PSP_MEM_TRAIN_SUPPORT = 0x1, 183 1.1 riastrad PSP_MEM_TRAIN_INIT_FAILED = 0x2, 184 1.1 riastrad PSP_MEM_TRAIN_RESERVE_SUCCESS = 0x4, 185 1.1 riastrad PSP_MEM_TRAIN_INIT_SUCCESS = 0x8, 186 1.1 riastrad }; 187 1.1 riastrad 188 1.1 riastrad enum psp_memory_training_ops { 189 1.1 riastrad PSP_MEM_TRAIN_SEND_LONG_MSG = 0x1, 190 1.1 riastrad PSP_MEM_TRAIN_SAVE = 0x2, 191 1.1 riastrad PSP_MEM_TRAIN_RESTORE = 0x4, 192 1.1 riastrad PSP_MEM_TRAIN_SEND_SHORT_MSG = 0x8, 193 1.1 riastrad PSP_MEM_TRAIN_COLD_BOOT = PSP_MEM_TRAIN_SEND_LONG_MSG, 194 1.1 riastrad PSP_MEM_TRAIN_RESUME = PSP_MEM_TRAIN_SEND_SHORT_MSG, 195 1.1 riastrad }; 196 1.1 riastrad 197 1.1 riastrad struct psp_memory_training_context { 198 1.1 riastrad /*training data size*/ 199 1.1 riastrad u64 train_data_size; 200 1.1 riastrad /* 201 1.1 riastrad * sys_cache 202 1.1 riastrad * cpu virtual address 203 1.1 riastrad * system memory buffer that used to store the training data. 204 1.1 riastrad */ 205 1.1 riastrad void *sys_cache; 206 1.1 riastrad 207 1.1 riastrad /*vram offset of the p2c training data*/ 208 1.1 riastrad u64 p2c_train_data_offset; 209 1.1 riastrad 210 1.1 riastrad /*vram offset of the c2p training data*/ 211 1.1 riastrad u64 c2p_train_data_offset; 212 1.1 riastrad struct amdgpu_bo *c2p_bo; 213 1.1 riastrad 214 1.1 riastrad enum psp_memory_training_init_flag init; 215 1.1 riastrad u32 training_cnt; 216 1.1 riastrad }; 217 1.1 riastrad 218 1.1 riastrad struct psp_context 219 1.1 riastrad { 220 1.1 riastrad struct amdgpu_device *adev; 221 1.1 riastrad struct psp_ring km_ring; 222 1.1 riastrad struct psp_gfx_cmd_resp *cmd; 223 1.1 riastrad 224 1.1 riastrad const struct psp_funcs *funcs; 225 1.1 riastrad 226 1.1 riastrad /* firmware buffer */ 227 1.1 riastrad struct amdgpu_bo *fw_pri_bo; 228 1.1 riastrad uint64_t fw_pri_mc_addr; 229 1.1 riastrad void *fw_pri_buf; 230 1.1 riastrad 231 1.1 riastrad /* sos firmware */ 232 1.1 riastrad const struct firmware *sos_fw; 233 1.1 riastrad uint32_t sos_fw_version; 234 1.1 riastrad uint32_t sos_feature_version; 235 1.1 riastrad uint32_t sys_bin_size; 236 1.1 riastrad uint32_t sos_bin_size; 237 1.1 riastrad uint32_t toc_bin_size; 238 1.1 riastrad uint32_t kdb_bin_size; 239 1.3 riastrad const uint8_t *sys_start_addr; 240 1.3 riastrad const uint8_t *sos_start_addr; 241 1.3 riastrad const uint8_t *toc_start_addr; 242 1.3 riastrad const uint8_t *kdb_start_addr; 243 1.1 riastrad 244 1.1 riastrad /* tmr buffer */ 245 1.1 riastrad struct amdgpu_bo *tmr_bo; 246 1.1 riastrad uint64_t tmr_mc_addr; 247 1.1 riastrad 248 1.1 riastrad /* asd firmware */ 249 1.1 riastrad const struct firmware *asd_fw; 250 1.1 riastrad uint32_t asd_fw_version; 251 1.1 riastrad uint32_t asd_feature_version; 252 1.1 riastrad uint32_t asd_ucode_size; 253 1.3 riastrad const uint8_t *asd_start_addr; 254 1.1 riastrad 255 1.1 riastrad /* fence buffer */ 256 1.1 riastrad struct amdgpu_bo *fence_buf_bo; 257 1.1 riastrad uint64_t fence_buf_mc_addr; 258 1.1 riastrad void *fence_buf; 259 1.1 riastrad 260 1.1 riastrad /* cmd buffer */ 261 1.1 riastrad struct amdgpu_bo *cmd_buf_bo; 262 1.1 riastrad uint64_t cmd_buf_mc_addr; 263 1.1 riastrad struct psp_gfx_cmd_resp *cmd_buf_mem; 264 1.1 riastrad 265 1.1 riastrad /* fence value associated with cmd buffer */ 266 1.1 riastrad atomic_t fence_value; 267 1.1 riastrad /* flag to mark whether gfx fw autoload is supported or not */ 268 1.1 riastrad bool autoload_supported; 269 1.1 riastrad 270 1.1 riastrad /* xgmi ta firmware and buffer */ 271 1.1 riastrad const struct firmware *ta_fw; 272 1.1 riastrad uint32_t ta_fw_version; 273 1.1 riastrad uint32_t ta_xgmi_ucode_version; 274 1.1 riastrad uint32_t ta_xgmi_ucode_size; 275 1.3 riastrad const uint8_t *ta_xgmi_start_addr; 276 1.1 riastrad uint32_t ta_ras_ucode_version; 277 1.1 riastrad uint32_t ta_ras_ucode_size; 278 1.3 riastrad const uint8_t *ta_ras_start_addr; 279 1.1 riastrad 280 1.1 riastrad uint32_t ta_hdcp_ucode_version; 281 1.1 riastrad uint32_t ta_hdcp_ucode_size; 282 1.3 riastrad const uint8_t *ta_hdcp_start_addr; 283 1.1 riastrad 284 1.1 riastrad uint32_t ta_dtm_ucode_version; 285 1.1 riastrad uint32_t ta_dtm_ucode_size; 286 1.3 riastrad const uint8_t *ta_dtm_start_addr; 287 1.1 riastrad 288 1.1 riastrad struct psp_asd_context asd_context; 289 1.1 riastrad struct psp_xgmi_context xgmi_context; 290 1.1 riastrad struct psp_ras_context ras; 291 1.1 riastrad struct psp_hdcp_context hdcp_context; 292 1.1 riastrad struct psp_dtm_context dtm_context; 293 1.1 riastrad struct mutex mutex; 294 1.1 riastrad struct psp_memory_training_context mem_train_ctx; 295 1.1 riastrad }; 296 1.1 riastrad 297 1.1 riastrad struct amdgpu_psp_funcs { 298 1.1 riastrad bool (*check_fw_loading_status)(struct amdgpu_device *adev, 299 1.1 riastrad enum AMDGPU_UCODE_ID); 300 1.1 riastrad }; 301 1.1 riastrad 302 1.1 riastrad 303 1.1 riastrad #define psp_ring_init(psp, type) (psp)->funcs->ring_init((psp), (type)) 304 1.1 riastrad #define psp_ring_create(psp, type) (psp)->funcs->ring_create((psp), (type)) 305 1.1 riastrad #define psp_ring_stop(psp, type) (psp)->funcs->ring_stop((psp), (type)) 306 1.1 riastrad #define psp_ring_destroy(psp, type) ((psp)->funcs->ring_destroy((psp), (type))) 307 1.1 riastrad #define psp_compare_sram_data(psp, ucode, type) \ 308 1.1 riastrad (psp)->funcs->compare_sram_data((psp), (ucode), (type)) 309 1.1 riastrad #define psp_init_microcode(psp) \ 310 1.1 riastrad ((psp)->funcs->init_microcode ? (psp)->funcs->init_microcode((psp)) : 0) 311 1.1 riastrad #define psp_bootloader_load_kdb(psp) \ 312 1.1 riastrad ((psp)->funcs->bootloader_load_kdb ? (psp)->funcs->bootloader_load_kdb((psp)) : 0) 313 1.1 riastrad #define psp_bootloader_load_sysdrv(psp) \ 314 1.1 riastrad ((psp)->funcs->bootloader_load_sysdrv ? (psp)->funcs->bootloader_load_sysdrv((psp)) : 0) 315 1.1 riastrad #define psp_bootloader_load_sos(psp) \ 316 1.1 riastrad ((psp)->funcs->bootloader_load_sos ? (psp)->funcs->bootloader_load_sos((psp)) : 0) 317 1.1 riastrad #define psp_smu_reload_quirk(psp) \ 318 1.1 riastrad ((psp)->funcs->smu_reload_quirk ? (psp)->funcs->smu_reload_quirk((psp)) : false) 319 1.1 riastrad #define psp_support_vmr_ring(psp) \ 320 1.1 riastrad ((psp)->funcs->support_vmr_ring ? (psp)->funcs->support_vmr_ring((psp)) : false) 321 1.1 riastrad #define psp_mode1_reset(psp) \ 322 1.1 riastrad ((psp)->funcs->mode1_reset ? (psp)->funcs->mode1_reset((psp)) : false) 323 1.1 riastrad #define psp_xgmi_get_node_id(psp, node_id) \ 324 1.1 riastrad ((psp)->funcs->xgmi_get_node_id ? (psp)->funcs->xgmi_get_node_id((psp), (node_id)) : -EINVAL) 325 1.1 riastrad #define psp_xgmi_get_hive_id(psp, hive_id) \ 326 1.1 riastrad ((psp)->funcs->xgmi_get_hive_id ? (psp)->funcs->xgmi_get_hive_id((psp), (hive_id)) : -EINVAL) 327 1.1 riastrad #define psp_xgmi_get_topology_info(psp, num_device, topology) \ 328 1.1 riastrad ((psp)->funcs->xgmi_get_topology_info ? \ 329 1.1 riastrad (psp)->funcs->xgmi_get_topology_info((psp), (num_device), (topology)) : -EINVAL) 330 1.1 riastrad #define psp_xgmi_set_topology_info(psp, num_device, topology) \ 331 1.1 riastrad ((psp)->funcs->xgmi_set_topology_info ? \ 332 1.1 riastrad (psp)->funcs->xgmi_set_topology_info((psp), (num_device), (topology)) : -EINVAL) 333 1.1 riastrad #define psp_rlc_autoload(psp) \ 334 1.1 riastrad ((psp)->funcs->rlc_autoload_start ? (psp)->funcs->rlc_autoload_start((psp)) : 0) 335 1.1 riastrad #define psp_mem_training_init(psp) \ 336 1.1 riastrad ((psp)->funcs->mem_training_init ? (psp)->funcs->mem_training_init((psp)) : 0) 337 1.1 riastrad #define psp_mem_training_fini(psp) \ 338 1.1 riastrad ((psp)->funcs->mem_training_fini ? (psp)->funcs->mem_training_fini((psp)) : 0) 339 1.1 riastrad #define psp_mem_training(psp, ops) \ 340 1.1 riastrad ((psp)->funcs->mem_training ? (psp)->funcs->mem_training((psp), (ops)) : 0) 341 1.1 riastrad 342 1.1 riastrad #define amdgpu_psp_check_fw_loading_status(adev, i) (adev)->firmware.funcs->check_fw_loading_status((adev), (i)) 343 1.1 riastrad 344 1.1 riastrad #define psp_ras_trigger_error(psp, info) \ 345 1.1 riastrad ((psp)->funcs->ras_trigger_error ? \ 346 1.1 riastrad (psp)->funcs->ras_trigger_error((psp), (info)) : -EINVAL) 347 1.1 riastrad #define psp_ras_cure_posion(psp, addr) \ 348 1.1 riastrad ((psp)->funcs->ras_cure_posion ? \ 349 1.1 riastrad (psp)->funcs->ras_cure_posion(psp, (addr)) : -EINVAL) 350 1.1 riastrad 351 1.1 riastrad #define psp_ring_get_wptr(psp) (psp)->funcs->ring_get_wptr((psp)) 352 1.1 riastrad #define psp_ring_set_wptr(psp, value) (psp)->funcs->ring_set_wptr((psp), (value)) 353 1.1 riastrad 354 1.1 riastrad extern const struct amd_ip_funcs psp_ip_funcs; 355 1.1 riastrad 356 1.1 riastrad extern const struct amdgpu_ip_block_version psp_v3_1_ip_block; 357 1.1 riastrad extern int psp_wait_for(struct psp_context *psp, uint32_t reg_index, 358 1.1 riastrad uint32_t field_val, uint32_t mask, bool check_changed); 359 1.1 riastrad 360 1.1 riastrad extern const struct amdgpu_ip_block_version psp_v10_0_ip_block; 361 1.1 riastrad extern const struct amdgpu_ip_block_version psp_v12_0_ip_block; 362 1.1 riastrad 363 1.1 riastrad int psp_gpu_reset(struct amdgpu_device *adev); 364 1.1 riastrad int psp_update_vcn_sram(struct amdgpu_device *adev, int inst_idx, 365 1.1 riastrad uint64_t cmd_gpu_addr, int cmd_size); 366 1.1 riastrad 367 1.1 riastrad int psp_xgmi_invoke(struct psp_context *psp, uint32_t ta_cmd_id); 368 1.1 riastrad 369 1.1 riastrad int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id); 370 1.1 riastrad int psp_ras_enable_features(struct psp_context *psp, 371 1.1 riastrad union ta_ras_cmd_input *info, bool enable); 372 1.1 riastrad int psp_hdcp_invoke(struct psp_context *psp, uint32_t ta_cmd_id); 373 1.1 riastrad int psp_dtm_invoke(struct psp_context *psp, uint32_t ta_cmd_id); 374 1.1 riastrad 375 1.1 riastrad int psp_rlc_autoload_start(struct psp_context *psp); 376 1.1 riastrad 377 1.1 riastrad extern const struct amdgpu_ip_block_version psp_v11_0_ip_block; 378 1.1 riastrad int psp_reg_program(struct psp_context *psp, enum psp_reg_prog_id reg, 379 1.1 riastrad uint32_t value); 380 1.1 riastrad int psp_ring_cmd_submit(struct psp_context *psp, 381 1.1 riastrad uint64_t cmd_buf_mc_addr, 382 1.1 riastrad uint64_t fence_mc_addr, 383 1.1 riastrad int index); 384 1.1 riastrad #endif 385