mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-08 14:55:21 +02:00
drm/amdgpu: Fix pci state save during mode-1 reset
Cache the PCI state before bus master is disabled. The saved state is
later used for other cases like restoring config space after mode-2
reset.
Fixes: 5c03e5843e
("drm/amdgpu:add smu mode1/2 support for aldebaran")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f6f49dda49
commit
74fa02c4a5
|
@ -5220,11 +5220,14 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev)
|
|||
|
||||
dev_info(adev->dev, "GPU mode1 reset\n");
|
||||
|
||||
/* Cache the state before bus master disable. The saved config space
|
||||
* values are used in other cases like restore after mode-2 reset.
|
||||
*/
|
||||
amdgpu_device_cache_pci_state(adev->pdev);
|
||||
|
||||
/* disable BM */
|
||||
pci_clear_master(adev->pdev);
|
||||
|
||||
amdgpu_device_cache_pci_state(adev->pdev);
|
||||
|
||||
if (amdgpu_dpm_is_mode1_reset_supported(adev)) {
|
||||
dev_info(adev->dev, "GPU smu mode1 reset\n");
|
||||
ret = amdgpu_dpm_mode1_reset(adev);
|
||||
|
|
Loading…
Reference in New Issue
Block a user