diff options
author | Likun Gao <Likun.Gao@amd.com> | 2022-05-05 15:45:06 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-05-10 17:53:10 -0400 |
commit | dfc53681de592d31a6de894c9b9afb14634ec6aa (patch) | |
tree | 78029c8e7a5760014bafc7b212dfcc5e84330842 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | |
parent | 8424f2ccb3c0dd43369288a47d15c980136c3bd5 (diff) | |
download | lwn-dfc53681de592d31a6de894c9b9afb14634ec6aa.tar.gz lwn-dfc53681de592d31a6de894c9b9afb14634ec6aa.zip |
drm/amdgpu: add sysfs to shows psp vbflash status
Add new sysfs interface to shows the status of psp vbflash status.
V2: rename the sysfs interface, and set more return value.
(0: not start; 1: in progress; MBX115 value when vbflash finish)
V3: warning fixes
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h index db7b7dbb9c93..e431f4994931 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h @@ -130,6 +130,7 @@ struct psp_funcs int (*load_usbc_pd_fw)(struct psp_context *psp, uint64_t fw_pri_mc_addr); int (*read_usbc_pd_fw)(struct psp_context *psp, uint32_t *fw_ver); int (*update_spirom)(struct psp_context *psp, uint64_t fw_pri_mc_addr); + int (*vbflash_stat)(struct psp_context *psp); }; #define AMDGPU_XGMI_MAX_CONNECTED_NODES 64 @@ -375,6 +376,7 @@ struct psp_context char *vbflash_tmp_buf; size_t vbflash_image_size; + bool vbflash_done; }; struct amdgpu_psp_funcs { @@ -425,6 +427,10 @@ struct amdgpu_psp_funcs { ((psp)->funcs->update_spirom ? \ (psp)->funcs->update_spirom((psp), fw_pri_mc_addr) : -EINVAL) +#define psp_vbflash_status(psp) \ + ((psp)->funcs->vbflash_stat ? \ + (psp)->funcs->vbflash_stat((psp)) : -EINVAL) + extern const struct amd_ip_funcs psp_ip_funcs; extern const struct amdgpu_ip_block_version psp_v3_1_ip_block; |