diff options
| author | Hawking Zhang <[email protected]> | 2021-06-07 03:02:13 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-06-11 20:06:15 +0000 |
| commit | 8e6e054da6c72210966c82f7d3e7a3d014bd0b39 (patch) | |
| tree | 6b3403981fbbefdeeaf09cbd615e2f8e6a179cdd /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | drm/amdgpu: add helper function to query psp runtime db entry (v2) (diff) | |
| download | kernel-8e6e054da6c72210966c82f7d3e7a3d014bd0b39.tar.gz kernel-8e6e054da6c72210966c82f7d3e7a3d014bd0b39.zip | |
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: Hawking Zhang <[email protected]>
Reviewed-by: John Clements <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 0f219d4ccf01..284a2aa34795 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -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"); |
