diff options
author | Likun Gao <Likun.Gao@amd.com> | 2023-08-10 15:16:05 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-02-14 17:16:12 -0500 |
commit | a78791c2b29ed2ea0f064ba84ce3c25bdd04c80c (patch) | |
tree | 81e3d9925c97e282760c2554ce59d9c2771a1db5 | |
parent | f19cb916151d929db70e2ddc5929d713c1aff97e (diff) |
drm/amdgpu: support psp ip block for psp v14
Support PSP ip block for psp v14.
Add psp ip block for psp v14_0_2 and v14_0_3.
v2: sqaush in 14.0.3 firmware fix (Alex)
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>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/psp_v14_0.c | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index c09aac91889b..7e12c7b70418 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -38,6 +38,7 @@ #include "psp_v12_0.h" #include "psp_v13_0.h" #include "psp_v13_0_4.h" +#include "psp_v14_0.h" #include "amdgpu_ras.h" #include "amdgpu_securedisplay.h" @@ -224,6 +225,11 @@ static int psp_early_init(void *handle) psp_v13_0_4_set_psp_funcs(psp); psp->autoload_supported = true; break; + case IP_VERSION(14, 0, 2): + case IP_VERSION(14, 0, 3): + psp_v14_0_set_psp_funcs(psp); + psp->autoload_supported = true; + break; default: return -EINVAL; } @@ -3959,3 +3965,11 @@ const struct amdgpu_ip_block_version psp_v13_0_4_ip_block = { .rev = 4, .funcs = &psp_ip_funcs, }; + +const struct amdgpu_ip_block_version psp_v14_0_ip_block = { + .type = AMD_IP_BLOCK_TYPE_PSP, + .major = 14, + .minor = 0, + .rev = 0, + .funcs = &psp_ip_funcs, +}; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h index 47ffaa796264..c24b1d7462ee 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h @@ -463,6 +463,7 @@ extern const struct amdgpu_ip_block_version psp_v11_0_8_ip_block; extern const struct amdgpu_ip_block_version psp_v12_0_ip_block; extern const struct amdgpu_ip_block_version psp_v13_0_ip_block; extern const struct amdgpu_ip_block_version psp_v13_0_4_ip_block; +extern const struct amdgpu_ip_block_version psp_v14_0_ip_block; extern int psp_wait_for(struct psp_context *psp, uint32_t reg_index, uint32_t field_val, uint32_t mask, bool check_changed); diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v14_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v14_0.c index 998758a1b209..78a95f8f370b 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v14_0.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v14_0.c @@ -32,6 +32,7 @@ #include "mp/mp_14_0_2_sh_mask.h" MODULE_FIRMWARE("amdgpu/psp_14_0_2_sos.bin"); +MODULE_FIRMWARE("amdgpu/psp_14_0_3_sos.bin"); /* For large FW files the time to complete can be very long */ #define USBC_PD_POLLING_LIMIT_S 240 @@ -61,6 +62,7 @@ static int psp_v14_0_init_microcode(struct psp_context *psp) switch (amdgpu_ip_version(adev, MP0_HWIP, 0)) { case IP_VERSION(14, 0, 2): + case IP_VERSION(14, 0, 3): err = psp_init_sos_microcode(psp, ucode_prefix); if (err) return err; |