Patch "drm/amdgpu: Check extended configuration space register when system uses large bar" has been added to the 6.6-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: Check extended configuration space register when system uses large bar

to the 6.6-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-check-extended-configuration-space-regist.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 6fe539a92b992cd0e6046ed47d14d939e12653dc
Author: Ma Jun <Jun.Ma2@xxxxxxx>
Date:   Mon Dec 18 11:32:06 2023 +0800

    drm/amdgpu: Check extended configuration space register when system uses large bar
    
    [ Upstream commit e372baeb3d336b20fd9463784c577fd8824497cd ]
    
    Some customer platforms do not enable mmconfig for various reasons,
    such as bios bug, and therefore cannot access the GPU extend configuration
    space through mmio.
    
    When the system enters the d3cold state and resumes, the amdgpu driver
    fails to resume because the extend configuration space registers of
    GPU can't be restored. At this point, Usually we only see some failure
    dmesg log printed by amdgpu driver, it is difficult to find the root
    cause.
    
    Therefor print a warnning message if the system can't access the
    extended configuration space register when using large bar.
    
    Signed-off-by: Ma Jun <Jun.Ma2@xxxxxxx>
    Reviewed-by: Christian König <christian.koenig@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Stable-dep-of: 099bffc7cadf ("drm/amdgpu: disable BAR resize on Dell G5 SE")
    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 2e739b80cfccf..f1db7c9deaec2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1116,6 +1116,10 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev))
 		return 0;
 
+	/* PCI_EXT_CAP_ID_VNDR extended capability is located at 0x100 */
+	if (!pci_find_ext_capability(adev->pdev, PCI_EXT_CAP_ID_VNDR))
+		DRM_WARN("System can't access extended configuration space,please check!!\n");
+
 	/* skip if the bios has already enabled large BAR */
 	if (adev->gmc.real_vram_size &&
 	    (pci_resource_len(adev->pdev, 0) >= adev->gmc.real_vram_size))




[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