Patch "drm/amdgpu: Fix pci state save during mode-1 reset" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amdgpu: Fix pci state save during mode-1 reset

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amdgpu-fix-pci-state-save-during-mode-1-reset.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d1ddb510daca824910a44ced97da567fbbe52317
Author: Lijo Lazar <lijo.lazar@xxxxxxx>
Date:   Tue Jun 18 14:04:38 2024 +0530

    drm/amdgpu: Fix pci state save during mode-1 reset
    
    [ Upstream commit 74fa02c4a5ea1ade5156a6ce494d3ea83881c2d8 ]
    
    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: 5c03e5843e6b ("drm/amdgpu:add smu mode1/2 support for aldebaran")
    Signed-off-by: Lijo Lazar <lijo.lazar@xxxxxxx>
    Reviewed-by: Feifei Xu <Feifei.Xu@xxxxxxx>
    Reviewed-by: Hawking Zhang <Hawking.Zhang@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 941d6e379b8a6..eb8af023326ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5121,11 +5121,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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux