Skip to content

Commit

Permalink
drm/amdgpu: fill the ucode bo during psp resume for SRIOV
Browse files Browse the repository at this point in the history
refill the ucode bo during psp resume for SRIOV, otherwise ucode load
will fail after VM hibernation and fb clean.

Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Victor Zhao authored and Alex Deucher committed Jan 9, 2025
1 parent 9814626 commit 85b7341
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3020,10 +3020,7 @@ static int psp_hw_init(struct amdgpu_ip_block *ip_block)
struct amdgpu_device *adev = ip_block->adev;

mutex_lock(&adev->firmware.mutex);
/*
* This sequence is just used on hw_init only once, no need on
* resume.
*/

ret = amdgpu_ucode_init_bo(adev);
if (ret)
goto failed;
Expand Down Expand Up @@ -3148,6 +3145,10 @@ static int psp_resume(struct amdgpu_ip_block *ip_block)

mutex_lock(&adev->firmware.mutex);

ret = amdgpu_ucode_init_bo(adev);
if (ret)
goto failed;

ret = psp_hw_start(psp);
if (ret)
goto failed;
Expand Down

0 comments on commit 85b7341

Please sign in to comment.