Message ID | 20220328131313.1422735-2-koba.ko@canonical.com |
---|---|
State | New |
Headers | show |
Series | UBUNTU: SAUCE: Revert drm/amd/pm: enable ASPM by default | expand |
On Mon, Mar 28, 2022 at 9:13 PM Koba Ko <koba.ko@canonical.com> wrote: > > BugLink: https://bugs.launchpad.net/bugs/1966680 > > This reverts commit 0064b0ce85bb86d8a6fa066323f6318956c2dd59. > > since the multiple adl SKUs with amdgpu polaris/gcn series have > suspend/resum issue, disable amdgpu's aspm before the real fix is landed. Is the "real fix" already in upstream or still under discussion? Kai-Heng > > Signed-off-by: Koba Ko <koba.ko@canonical.com> > --- > drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- > drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- > drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c > index fbcee5d7d6a11..3215c8f254a3a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/nv.c > +++ b/drivers/gpu/drm/amd/amdgpu/nv.c > @@ -583,7 +583,7 @@ static void nv_pcie_gen3_enable(struct amdgpu_device *adev) > > static void nv_program_aspm(struct amdgpu_device *adev) > { > - if (!amdgpu_aspm) > + if (amdgpu_aspm != 1) > return; > > if (!(adev->flags & AMD_IS_APU) && > diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c > index b7d350be80502..38bf8077a90dc 100644 > --- a/drivers/gpu/drm/amd/amdgpu/soc15.c > +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c > @@ -689,7 +689,7 @@ static void soc15_pcie_gen3_enable(struct amdgpu_device *adev) > > static void soc15_program_aspm(struct amdgpu_device *adev) > { > - if (!amdgpu_aspm) > + if (amdgpu_aspm != 1) > return; > > if (!(adev->flags & AMD_IS_APU) && > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c > index 748654bf5a085..5ed01b1aa7e85 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > @@ -1140,7 +1140,7 @@ static void vi_program_aspm(struct amdgpu_device *adev) > bool bL1SS = false; > bool bClkReqSupport = true; > > - if (!amdgpu_aspm) > + if (amdgpu_aspm != 1) > return; > > if (adev->flags & AMD_IS_APU || > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > index d285f3f644512..fce498625ee40 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > @@ -338,7 +338,7 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu, > if (smu->dc_controlled_by_gpio) > *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT); > > - if (amdgpu_aspm) > + if (amdgpu_aspm == 1) > *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT); > > return 0; > -- > 2.25.1 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
On Tue, Mar 29, 2022, 9:24 AM Kai-Heng Feng <kai.heng.feng@canonical.com> wrote: > On Mon, Mar 28, 2022 at 9:13 PM Koba Ko <koba.ko@canonical.com> wrote: > > > > BugLink: https://bugs.launchpad.net/bugs/1966680 > > > > This reverts commit 0064b0ce85bb86d8a6fa066323f6318956c2dd59. > > > > since the multiple adl SKUs with amdgpu polaris/gcn series have > > suspend/resum issue, disable amdgpu's aspm before the real fix is landed. > > Is the "real fix" already in upstream or still under discussion? > Discussing with AMD. Kai-Heng > > > > > Signed-off-by: Koba Ko <koba.ko@canonical.com> > > --- > > drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- > > drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- > > drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- > > drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +- > > 4 files changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c > b/drivers/gpu/drm/amd/amdgpu/nv.c > > index fbcee5d7d6a11..3215c8f254a3a 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/nv.c > > +++ b/drivers/gpu/drm/amd/amdgpu/nv.c > > @@ -583,7 +583,7 @@ static void nv_pcie_gen3_enable(struct amdgpu_device > *adev) > > > > static void nv_program_aspm(struct amdgpu_device *adev) > > { > > - if (!amdgpu_aspm) > > + if (amdgpu_aspm != 1) > > return; > > > > if (!(adev->flags & AMD_IS_APU) && > > diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c > b/drivers/gpu/drm/amd/amdgpu/soc15.c > > index b7d350be80502..38bf8077a90dc 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/soc15.c > > +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c > > @@ -689,7 +689,7 @@ static void soc15_pcie_gen3_enable(struct > amdgpu_device *adev) > > > > static void soc15_program_aspm(struct amdgpu_device *adev) > > { > > - if (!amdgpu_aspm) > > + if (amdgpu_aspm != 1) > > return; > > > > if (!(adev->flags & AMD_IS_APU) && > > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c > b/drivers/gpu/drm/amd/amdgpu/vi.c > > index 748654bf5a085..5ed01b1aa7e85 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > > @@ -1140,7 +1140,7 @@ static void vi_program_aspm(struct amdgpu_device > *adev) > > bool bL1SS = false; > > bool bClkReqSupport = true; > > > > - if (!amdgpu_aspm) > > + if (amdgpu_aspm != 1) > > return; > > > > if (adev->flags & AMD_IS_APU || > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > > index d285f3f644512..fce498625ee40 100644 > > --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > > @@ -338,7 +338,7 @@ sienna_cichlid_get_allowed_feature_mask(struct > smu_context *smu, > > if (smu->dc_controlled_by_gpio) > > *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT); > > > > - if (amdgpu_aspm) > > + if (amdgpu_aspm == 1) > > *(uint64_t *)feature_mask |= > FEATURE_MASK(FEATURE_DS_LCLK_BIT); > > > > return 0; > > -- > > 2.25.1 > > > > > > -- > > kernel-team mailing list > > kernel-team@lists.ubuntu.com > > https://lists.ubuntu.com/mailman/listinfo/kernel-team >
Hi Koba, On Tue, Mar 29, 2022 at 9:28 AM Koba Ko <koba.ko@canonical.com> wrote: > > > > On Tue, Mar 29, 2022, 9:24 AM Kai-Heng Feng <kai.heng.feng@canonical.com> wrote: >> >> On Mon, Mar 28, 2022 at 9:13 PM Koba Ko <koba.ko@canonical.com> wrote: >> > >> > BugLink: https://bugs.launchpad.net/bugs/1966680 >> > >> > This reverts commit 0064b0ce85bb86d8a6fa066323f6318956c2dd59. >> > >> > since the multiple adl SKUs with amdgpu polaris/gcn series have >> > suspend/resum issue, disable amdgpu's aspm before the real fix is landed. >> >> Is the "real fix" already in upstream or still under discussion? > > > Discussing with AMD. Thanks. Have you tried to disable ASPM on suspend path, and re-enable it on resume? There were many attempts to do that on PCI mailing list, maybe this is another case to persuade PCI maintainer to accept it. Kai-Heng > >> Kai-Heng >> >> > >> > Signed-off-by: Koba Ko <koba.ko@canonical.com> >> > --- >> > drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- >> > drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- >> > drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- >> > drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +- >> > 4 files changed, 4 insertions(+), 4 deletions(-) >> > >> > diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c >> > index fbcee5d7d6a11..3215c8f254a3a 100644 >> > --- a/drivers/gpu/drm/amd/amdgpu/nv.c >> > +++ b/drivers/gpu/drm/amd/amdgpu/nv.c >> > @@ -583,7 +583,7 @@ static void nv_pcie_gen3_enable(struct amdgpu_device *adev) >> > >> > static void nv_program_aspm(struct amdgpu_device *adev) >> > { >> > - if (!amdgpu_aspm) >> > + if (amdgpu_aspm != 1) >> > return; >> > >> > if (!(adev->flags & AMD_IS_APU) && >> > diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c >> > index b7d350be80502..38bf8077a90dc 100644 >> > --- a/drivers/gpu/drm/amd/amdgpu/soc15.c >> > +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c >> > @@ -689,7 +689,7 @@ static void soc15_pcie_gen3_enable(struct amdgpu_device *adev) >> > >> > static void soc15_program_aspm(struct amdgpu_device *adev) >> > { >> > - if (!amdgpu_aspm) >> > + if (amdgpu_aspm != 1) >> > return; >> > >> > if (!(adev->flags & AMD_IS_APU) && >> > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c >> > index 748654bf5a085..5ed01b1aa7e85 100644 >> > --- a/drivers/gpu/drm/amd/amdgpu/vi.c >> > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c >> > @@ -1140,7 +1140,7 @@ static void vi_program_aspm(struct amdgpu_device *adev) >> > bool bL1SS = false; >> > bool bClkReqSupport = true; >> > >> > - if (!amdgpu_aspm) >> > + if (amdgpu_aspm != 1) >> > return; >> > >> > if (adev->flags & AMD_IS_APU || >> > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c >> > index d285f3f644512..fce498625ee40 100644 >> > --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c >> > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c >> > @@ -338,7 +338,7 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu, >> > if (smu->dc_controlled_by_gpio) >> > *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT); >> > >> > - if (amdgpu_aspm) >> > + if (amdgpu_aspm == 1) >> > *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT); >> > >> > return 0; >> > -- >> > 2.25.1 >> > >> > >> > -- >> > kernel-team mailing list >> > kernel-team@lists.ubuntu.com >> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
On Tue, Mar 29, 2022 at 12:38:42PM +0800, Kai-Heng Feng wrote: > >> Is the "real fix" already in upstream or still under discussion? > > > > > > Discussing with AMD. > > Thanks. Have you tried to disable ASPM on suspend path, and re-enable > it on resume? > There were many attempts to do that on PCI mailing list, maybe this is > another case to persuade PCI maintainer to accept it. What's the status of this? Has the real fix already landed somewhere we can cherry-pick it?
On Thu, Apr 14, 2022 at 7:37 PM Paolo Pisati <paolo.pisati@canonical.com> wrote: > > On Tue, Mar 29, 2022 at 12:38:42PM +0800, Kai-Heng Feng wrote: > > >> Is the "real fix" already in upstream or still under discussion? > > > > > > > > > Discussing with AMD. > > > > Thanks. Have you tried to disable ASPM on suspend path, and re-enable > > it on resume? > > There were many attempts to do that on PCI mailing list, maybe this is > > another case to persuade PCI maintainer to accept it. > > What's the status of this? Has the real fix already landed somewhere we > can cherry-pick it? AMD guys sent another patch to disable ASPM on ADL platform but it's still under discussing. https://lore.kernel.org/dri-devel/20220408190502.4103670-1-richard.gong@amd.com/ > -- > bye, > p.
On 28.03.22 15:13, Koba Ko wrote: > BugLink: https://bugs.launchpad.net/bugs/1966680 > > This reverts commit 0064b0ce85bb86d8a6fa066323f6318956c2dd59. > > since the multiple adl SKUs with amdgpu polaris/gcn series have > suspend/resum issue, disable amdgpu's aspm before the real fix is landed. > > Signed-off-by: Koba Ko <koba.ko@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- > drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- > drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- > drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c > index fbcee5d7d6a11..3215c8f254a3a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/nv.c > +++ b/drivers/gpu/drm/amd/amdgpu/nv.c > @@ -583,7 +583,7 @@ static void nv_pcie_gen3_enable(struct amdgpu_device *adev) > > static void nv_program_aspm(struct amdgpu_device *adev) > { > - if (!amdgpu_aspm) > + if (amdgpu_aspm != 1) > return; > > if (!(adev->flags & AMD_IS_APU) && > diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c > index b7d350be80502..38bf8077a90dc 100644 > --- a/drivers/gpu/drm/amd/amdgpu/soc15.c > +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c > @@ -689,7 +689,7 @@ static void soc15_pcie_gen3_enable(struct amdgpu_device *adev) > > static void soc15_program_aspm(struct amdgpu_device *adev) > { > - if (!amdgpu_aspm) > + if (amdgpu_aspm != 1) > return; > > if (!(adev->flags & AMD_IS_APU) && > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c > index 748654bf5a085..5ed01b1aa7e85 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > @@ -1140,7 +1140,7 @@ static void vi_program_aspm(struct amdgpu_device *adev) > bool bL1SS = false; > bool bClkReqSupport = true; > > - if (!amdgpu_aspm) > + if (amdgpu_aspm != 1) > return; > > if (adev->flags & AMD_IS_APU || > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > index d285f3f644512..fce498625ee40 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > @@ -338,7 +338,7 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu, > if (smu->dc_controlled_by_gpio) > *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT); > > - if (amdgpu_aspm) > + if (amdgpu_aspm == 1) > *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT); > > return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index fbcee5d7d6a11..3215c8f254a3a 100644 --- a/drivers/gpu/drm/amd/amdgpu/nv.c +++ b/drivers/gpu/drm/amd/amdgpu/nv.c @@ -583,7 +583,7 @@ static void nv_pcie_gen3_enable(struct amdgpu_device *adev) static void nv_program_aspm(struct amdgpu_device *adev) { - if (!amdgpu_aspm) + if (amdgpu_aspm != 1) return; if (!(adev->flags & AMD_IS_APU) && diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index b7d350be80502..38bf8077a90dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -689,7 +689,7 @@ static void soc15_pcie_gen3_enable(struct amdgpu_device *adev) static void soc15_program_aspm(struct amdgpu_device *adev) { - if (!amdgpu_aspm) + if (amdgpu_aspm != 1) return; if (!(adev->flags & AMD_IS_APU) && diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index 748654bf5a085..5ed01b1aa7e85 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -1140,7 +1140,7 @@ static void vi_program_aspm(struct amdgpu_device *adev) bool bL1SS = false; bool bClkReqSupport = true; - if (!amdgpu_aspm) + if (amdgpu_aspm != 1) return; if (adev->flags & AMD_IS_APU || diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index d285f3f644512..fce498625ee40 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -338,7 +338,7 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu, if (smu->dc_controlled_by_gpio) *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT); - if (amdgpu_aspm) + if (amdgpu_aspm == 1) *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT); return 0;
BugLink: https://bugs.launchpad.net/bugs/1966680 This reverts commit 0064b0ce85bb86d8a6fa066323f6318956c2dd59. since the multiple adl SKUs with amdgpu polaris/gcn series have suspend/resum issue, disable amdgpu's aspm before the real fix is landed. Signed-off-by: Koba Ko <koba.ko@canonical.com> --- drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)