Commit e7165829 authored by Likun Gao's avatar Likun Gao Committed by Alex Deucher

drm/amdgpu/psp: set boot_time_tmr flag

Set boot_time_tmr flag for the ASIC which MP0 ip version
newer than 14.0.2
For runtime TMR:
     Init tmr and load tmr should did.
For boottime TMR:
     If do not support autoload, skip init TMR.
     If support autoload, excute init TMR but skip load tmr.

v2: rebase (Alex)
Signed-off-by: default avatarLikun Gao <Likun.Gao@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2fb4460f
......@@ -822,7 +822,7 @@ static int psp_tmr_init(struct psp_context *psp)
}
}
if (!psp->tmr_bo) {
if (!psp->tmr_bo && !psp->boot_time_tmr) {
pptr = amdgpu_sriov_vf(psp->adev) ? &tmr_buf : NULL;
ret = amdgpu_bo_create_kernel(psp->adev, tmr_size,
PSP_TMR_ALIGNMENT,
......@@ -2258,7 +2258,7 @@ static int psp_hw_start(struct psp_context *psp)
if (amdgpu_sriov_vf(adev) && amdgpu_in_reset(adev))
goto skip_pin_bo;
if (!psp->boot_time_tmr) {
if (!psp->boot_time_tmr || psp->autoload_supported) {
ret = psp_tmr_init(psp);
if (ret) {
dev_err(adev->dev, "PSP tmr init failed!\n");
......@@ -2278,10 +2278,12 @@ static int psp_hw_start(struct psp_context *psp)
return ret;
}
ret = psp_tmr_load(psp);
if (ret) {
dev_err(adev->dev, "PSP load tmr failed!\n");
return ret;
if (!psp->boot_time_tmr || !psp->autoload_supported) {
ret = psp_tmr_load(psp);
if (ret) {
dev_err(adev->dev, "PSP load tmr failed!\n");
return ret;
}
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment