提交 8e6e054d 编写于 作者: H Hawking Zhang 提交者: Alex Deucher

drm/amdgpu: cache psp runtime boot_cfg_bitmask in sw_int

PSP runtime boot_cfg_bitmask carries various psp bl
feature bit mask that can be used by driver. Cache
it in sw_init for further usage.
Signed-off-by: NHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: NJohn Clements <john.clements@amd.com>
Reviewed-by: NLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 3d689ae4
......@@ -244,6 +244,7 @@ static int psp_sw_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct psp_context *psp = &adev->psp;
int ret;
struct psp_runtime_boot_cfg_entry boot_cfg_entry;
if (!amdgpu_sriov_vf(adev)) {
ret = psp_init_microcode(psp);
......@@ -259,6 +260,12 @@ static int psp_sw_init(void *handle)
}
}
memset(&boot_cfg_entry, 0, sizeof(boot_cfg_entry));
if (psp_get_runtime_db_entry(adev,
PSP_RUNTIME_ENTRY_TYPE_BOOT_CONFIG,
&boot_cfg_entry))
psp->boot_cfg_bitmask = boot_cfg_entry.boot_cfg_bitmask;
ret = psp_memory_training_init(psp);
if (ret) {
DRM_ERROR("Failed to initialize memory training!\n");
......
......@@ -379,6 +379,8 @@ struct psp_context
struct psp_securedisplay_context securedisplay_context;
struct mutex mutex;
struct psp_memory_training_context mem_train_ctx;
uint32_t boot_cfg_bitmask;
};
struct amdgpu_psp_funcs {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册