drm/amdgpu: disable ASPM for legacy products that don't support ASPM
Subsystems (2)
PATCH 1/1 drm/amdgpu: disable ASPM for legacy products that don't support ASPM
Active State Power Management (ASPM) feature is enabled since kernel 5.14. However there are some legacy products (WX3200 and RX640 are examples) that do not support ASPM. Use them as video/display output and system would hang during suspend/resume.
Add extra check to disable ASPM for old products that don't have ASPM support.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -0
@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,if (amdgpu_aspm ==-1 && !pcie_aspm_enabled (pdev)) amdgpu_aspm =0 ; +/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK )) supports_atomic = true;
Signature · 1 line
2.25.1
[Public]
Quoted 35 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 10:45
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; Limonciello, Mario <[email protected]>; Gong, Richard <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPMActive State Power Management (ASPM) feature is enabled since kernel 5.14.
However there are some legacy products (WX3200 and RX640 are examples) that
do not support ASPM. Use them as video/display output and system would hang
during suspend/resume.Add extra check to disable ASPM for old products that don't have ASPM support.
Signed-off-by Richard Gong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev · line 2019
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) amdgpu_aspm =0 ; +/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +
I think it's problematic to disable it for the entire driver. There might be multiple AMDGPUs in the system, and others may support ASPM.
Can it be done just as part of probe for Polaris?
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK ))
supports_atomic= true;
--
2.25.1
Quoted 27 lines · Mario
[Public]
Quoted 22 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 10:45
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; Limonciello, Mario <[email protected]>; Gong, Richard <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPMActive State Power Management (ASPM) feature is enabled since kernel 5.14.
However there are some legacy products (WX3200 and RX640 are examples) that
do not support ASPM. Use them as video/display output and system would hang
during suspend/resume.Add extra check to disable ASPM for old products that don't have ASPM support.
The patch description is incorrect. ASPM works just fine on these GPUs. It's more of an issue with whether the underlying platform supports ASPM or not. Rather than disabling a chip family, I would prefer to add a check for problematic platforms and disable ASPM on those platforms.
Alex
Quoted 32 lines
Quoted 13 lines
Signed-off-by Richard Gong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev · line 2019
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) amdgpu_aspm =0 ; +/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +I think it's problematic to disable it for the entire driver. There might be multiple AMDGPUs in the system, and others may support ASPM.
Can it be done just as part of probe for Polaris?
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK ))supports_atomic = true;--
2.25.1
Quoted 28 lines · Alex Deucher
Quoted 25 lines · Mario
[Public]
Quoted 20 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 10:45
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; Limonciello, Mario <[email protected]>; Gong, Richard <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPMActive State Power Management (ASPM) feature is enabled since kernel 5.14.
However there are some legacy products (WX3200 and RX640 are examples) that
do not support ASPM. Use them as video/display output and system would hang
during suspend/resume.
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Add extra check to disable ASPM for old products that don't have ASPM support.
The patch description is incorrect. ASPM works just fine on these GPUs. It's more of an issue with whether the underlying platform supports ASPM or not. Rather than disabling a chip family, I would prefer to add a check for problematic platforms and disable ASPM on those platforms.
For example, see intel_core_rkl_chk() in smu7_hwmgr.c. We disable PCIe DPM on RKL platforms due to compatibility issues with that particular platform.
Alex
Quoted 35 lines
Alex
Quoted 32 lines
Quoted 13 lines
Signed-off-by Richard Gong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev · line 2019
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) amdgpu_aspm =0 ; +/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +I think it's problematic to disable it for the entire driver. There might be multiple AMDGPUs in the system, and others may support ASPM.
Can it be done just as part of probe for Polaris?
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK ))supports_atomic = true;--
2.25.1
Hi Alex,
Quoted 26 lines · Alex Deucher
Quoted 24 lines · Mario
[Public]
Quoted 20 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 10:45
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; Limonciello, Mario <[email protected]>; Gong, Richard <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPMActive State Power Management (ASPM) feature is enabled since kernel 5.14.
However there are some legacy products (WX3200 and RX640 are examples) that
do not support ASPM. Use them as video/display output and system would hang
during suspend/resume.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Add extra check to disable ASPM for old products that don't have ASPM support.
The patch description is incorrect. ASPM works just fine on these GPUs. It's more of an issue with whether the underlying platform supports ASPM or not. Rather than disabling a chip family, I would prefer to add a check for problematic platforms and disable ASPM on those platforms.
I thought that initially.
But I found out that suspend/resume works just fine on the "problematic" platform (Dell Precision 3660, Intel ADL based) + AMD W6400 GFX card. With WX3200 or RX640, suspend/resume works only when ASPM was disabled. Both WX3200 and RX640 are from CHIP_POLARIS12 family.
This is why I take chip family approach.
Regards,
Richard
Quoted 32 lines
Alex
Quoted 30 lines
Quoted 12 lines
Signed-off-by Richard Gong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev · line 2019
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) amdgpu_aspm =0 ; +/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +I think it's problematic to disable it for the entire driver. There might be multiple AMDGPUs in the system, and others may support ASPM.
Can it be done just as part of probe for Polaris?
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK ))supports_atomic = true;--
2.25.1
Quoted 38 lines · Richard
Hi Alex,
Quoted 26 lines · Alex Deucher
Quoted 24 lines · Mario
[Public]
Quoted 20 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 10:45
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; Limonciello, Mario <[email protected]>; Gong, Richard <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPMActive State Power Management (ASPM) feature is enabled since kernel 5.14.
However there are some legacy products (WX3200 and RX640 are examples) that
do not support ASPM. Use them as video/display output and system would hang
during suspend/resume.Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Add extra check to disable ASPM for old products that don't have ASPM support.
The patch description is incorrect. ASPM works just fine on these GPUs. It's more of an issue with whether the underlying platform supports ASPM or not. Rather than disabling a chip family, I would prefer to add a check for problematic platforms and disable ASPM on those platforms.
Quoted 8 lines
I thought that initially.
But I found out that suspend/resume works just fine on the "problematic" platform (Dell Precision 3660, Intel ADL based) + AMD W6400 GFX card. With WX3200 or RX640, suspend/resume works only when ASPM was disabled. Both WX3200 and RX640 are from
CHIP_POLARIS12family.This is why I take chip family approach.
Sure, but you could put those polaris12 boards into a different system and they work just fine with ASPM enabled.
Alex
Quoted 37 lines
Regards,
Richard
Quoted 32 lines
Alex
Quoted 30 lines
Quoted 12 lines
Signed-off-by Richard Gong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev · line 2019
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) amdgpu_aspm =0 ; +/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +I think it's problematic to disable it for the entire driver. There might be multiple AMDGPUs in the system, and others may support ASPM.
Can it be done just as part of probe for Polaris?
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK ))supports_atomic = true;--
2.25.1
Quoted 43 lines · Mario
[Public]
Quoted 39 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 10:45
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; Limonciello, Mario <[email protected]>; Gong, Richard <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPMActive State Power Management (ASPM) feature is enabled since kernel 5.14.
However there are some legacy products (WX3200 and RX640 are examples) that
do not support ASPM. Use them as video/display output and system would hang
during suspend/resume.Add extra check to disable ASPM for old products that don't have ASPM support.
Signed-off-by Richard Gong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) amdgpu_aspm =0 ;
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev *pdev, · line 2018
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0+/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +I think it's problematic to disable it for the entire driver. There might be multiple AMDGPUs in the system, and others may support ASPM.
The "problem" are WX3200 and RX640, both are from the same POLARIS12 family.
Quoted 7 lines
Can it be done just as part of probe for Polaris?
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK ))
supports_atomic= true;
--
2.25.1
[Public]
Quoted 68 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 11:20
To: Limonciello, Mario <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPMQuoted 8 lines · Mario
[Public]
Quoted 4 lines
-----Original Message-----
From: Gong, Richard <[email protected]>
Sent: Friday, April 8, 2022 10:45
To: Deucher, Alexander <[email protected]>; Koenig,Christian
Quoted 3 lines
Quoted 3 lines
<[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected];linux-
Quoted 1 line
Quoted 1 line
[email protected]; Limonciello, Mario
Quoted 2 lines
Quoted 2 lines
Gong, Richard <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products thatdon't
Quoted 5 lines
Quoted 5 lines
support ASPM
Active State Power Management (ASPM) feature is enabled since kernel 5.14.
However there are some legacy products (WX3200 and RX640 areexamples)
Quoted 2 lines
Quoted 2 lines
that
do not support ASPM. Use them as video/display output and systemwould
Quoted 22 lines
Quoted 22 lines
hang
during suspend/resume.Add extra check to disable ASPM for old products that don't have ASPM support.
Signed-off-by Richard Gong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0@@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) amdgpu_aspm =0 ;Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int amdgpu_pci_probe(struct pci_dev *pdev, · line 2018
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0+/* disable ASPM for the legacy products that don't support ASPM */ +if ((flags &AMD_ASIC_MASK ) ==CHIP_POLARIS12 ) + amdgpu_aspm =0 ; +I think it's problematic to disable it for the entire driver. There might be
Quoted 6 lines
multiple
Quoted 1 line
AMDGPUs in the system, and others may support ASPM.
The "problem" are WX3200 and RX640, both are from the same POLARIS12 family.
Right but what if some other "working" cards are included in the system too? Then ASPM gets disabled for them too. It should only be disabled for the pci_dev corresponding to problematic GPUs in problematic situations.
Quoted 7 lines
Quoted 7 lines
Can it be done just as part of probe for Polaris?
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0if (amdgpu_virtual_display ||amdgpu_device_asic_has_dc_support (flags &AMD_ASIC_MASK ))
supports_atomic= true;
--
2.25.1