Skip to content

Commit 85dfc1d

Browse files
Jingwen Chenalexdeucher
authored andcommitted
drm/amd/amdgpu: fix psp tmr bo pin count leak in SRIOV
[Why] psp tmr bo will be pinned during loading amdgpu and reset in SRIOV while only unpinned in unload amdgpu [How] add amdgpu_in_reset and sriov judgement to skip pin bo v2: fix wrong judgement Signed-off-by: Jingwen Chen <[email protected]> Reviewed-by: Horace Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 91e1601 commit 85dfc1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,12 +2017,16 @@ static int psp_hw_start(struct psp_context *psp)
20172017
return ret;
20182018
}
20192019

2020+
if (amdgpu_sriov_vf(adev) && amdgpu_in_reset(adev))
2021+
goto skip_pin_bo;
2022+
20202023
ret = psp_tmr_init(psp);
20212024
if (ret) {
20222025
DRM_ERROR("PSP tmr init failed!\n");
20232026
return ret;
20242027
}
20252028

2029+
skip_pin_bo:
20262030
/*
20272031
* For ASICs with DF Cstate management centralized
20282032
* to PMFW, TMR setup should be performed after PMFW

0 commit comments

Comments
 (0)