Skip to content

Commit

Permalink
drm/amdgpu: skip amdgpu_device_cache_pci_state under sriov
Browse files Browse the repository at this point in the history
Under sriov, host driver will save and restore vf pci cfg space during
reset. And during device init, under sriov, pci_restore_state happens after
fullaccess released, and it can have race condition with mmio protection
enable from host side leading to missing interrupts.

So skip amdgpu_device_cache_pci_state for sriov.

Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
Acked-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Victor Zhao authored and Alex Deucher committed Nov 4, 2024
1 parent 922f0e0 commit afe260d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -6451,6 +6451,9 @@ bool amdgpu_device_cache_pci_state(struct pci_dev *pdev)
struct amdgpu_device *adev = drm_to_adev(dev);
int r;

if (amdgpu_sriov_vf(adev))
return false;

r = pci_save_state(pdev);
if (!r) {
kfree(adev->pci_state);
Expand Down

0 comments on commit afe260d

Please sign in to comment.