* [PATCH V2 0/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
@ 2021-08-26 1:35 Koba Ko
2021-08-26 1:35 ` [PATCH V2 1/1] " Koba Ko
0 siblings, 1 reply; 9+ messages in thread
From: Koba Ko @ 2021-08-26 1:35 UTC (permalink / raw)
To: amd-gfx
AMD polaris GPUs have an issue about audio noise on RKL platform,
they provide a commit to fix but for SMU7-based GPU still
need another module parameter,
modprobe amdgpu ppfeaturemask=0xfff7bffb
to avoid the module parameter, switch PCI_DPM by determining
intel platform in amd drm driver is a better way.
V2: Determine RKL by using intel core type&model.
Koba Ko (1):
drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 1:35 [PATCH V2 0/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform Koba Ko
@ 2021-08-26 1:35 ` Koba Ko
2021-08-26 9:07 ` Lazar, Lijo
2021-08-26 13:22 ` Alex Deucher
0 siblings, 2 replies; 9+ messages in thread
From: Koba Ko @ 2021-08-26 1:35 UTC (permalink / raw)
To: amd-gfx
AMD polaris GPUs have an issue about audio noise on RKL platform,
they provide a commit to fix but for SMU7-based GPU still
need another module parameter,
modprobe amdgpu ppfeaturemask=0xfff7bffb
to avoid the module parameter, switch PCI_DPM by determining
intel platform in amd drm driver is a better way.
Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
Ref: https://lists.freedesktop.org/archives/amd-gfx/2021-August/067413.html
Signed-off-by: Koba Ko <koba.ko@canonical.com>
---
.../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
index 0541bfc81c1b..6ce2a2046457 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
@@ -27,6 +27,7 @@
#include <linux/pci.h>
#include <linux/slab.h>
#include <asm/div64.h>
+#include <asm/intel-family.h>
#include <drm/amdgpu_drm.h>
#include "ppatomctrl.h"
#include "atombios.h"
@@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
return result;
}
+static bool intel_core_rkl_chk(void)
+{
+#ifdef CONFIG_X86_64
+ struct cpuinfo_x86 *c = &cpu_data(0);
+
+ return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
+#else
+ return false;
+#endif
+}
+
static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
{
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
- data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
+ data->pcie_dpm_key_disabled =
+ intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
/* need to set voltage control types before EVV patching */
data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 1:35 ` [PATCH V2 1/1] " Koba Ko
@ 2021-08-26 9:07 ` Lazar, Lijo
2021-08-26 9:34 ` Koba Ko
2021-08-26 13:22 ` Alex Deucher
1 sibling, 1 reply; 9+ messages in thread
From: Lazar, Lijo @ 2021-08-26 9:07 UTC (permalink / raw)
To: Koba Ko, amd-gfx
On 8/26/2021 7:05 AM, Koba Ko wrote:
> AMD polaris GPUs have an issue about audio noise on RKL platform,
> they provide a commit to fix but for SMU7-based GPU still
> need another module parameter,
>
> modprobe amdgpu ppfeaturemask=0xfff7bffb
>
> to avoid the module parameter, switch PCI_DPM by determining
> intel platform in amd drm driver is a better way.
>
> Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
> Ref: https://lists.freedesktop.org/archives/amd-gfx/2021-August/067413.html
> Signed-off-by: Koba Ko <koba.ko@canonical.com>
> ---
> .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> index 0541bfc81c1b..6ce2a2046457 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> @@ -27,6 +27,7 @@
> #include <linux/pci.h>
> #include <linux/slab.h>
> #include <asm/div64.h> > +#include <asm/intel-family.h>
Maybe, include conditionally for X86_64.
> #include <drm/amdgpu_drm.h>
> #include "ppatomctrl.h"
> #include "atombios.h"
> @@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
> return result;
> }
>
> +static bool intel_core_rkl_chk(void)
> +{
> +#ifdef CONFIG_X86_64
Better to use IS_ENABLED() here.
Apart from that, looks fine to me.
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Thanks,
Lijo
> + struct cpuinfo_x86 *c = &cpu_data(0);
> +
> + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
> +#else
> + return false;
> +#endif
> +}
> +
> static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> {
> struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> @@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
>
> data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
> data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
> - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
> + data->pcie_dpm_key_disabled =
> + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
> /* need to set voltage control types before EVV patching */
> data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
> data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 9:07 ` Lazar, Lijo
@ 2021-08-26 9:34 ` Koba Ko
2021-08-26 9:54 ` Koba Ko
0 siblings, 1 reply; 9+ messages in thread
From: Koba Ko @ 2021-08-26 9:34 UTC (permalink / raw)
To: Lazar, Lijo; +Cc: amd-gfx list
On Thu, Aug 26, 2021 at 5:07 PM Lazar, Lijo <lijo.lazar@amd.com> wrote:
>
>
>
> On 8/26/2021 7:05 AM, Koba Ko wrote:
> > AMD polaris GPUs have an issue about audio noise on RKL platform,
> > they provide a commit to fix but for SMU7-based GPU still
> > need another module parameter,
> >
> > modprobe amdgpu ppfeaturemask=0xfff7bffb
> >
> > to avoid the module parameter, switch PCI_DPM by determining
> > intel platform in amd drm driver is a better way.
> >
> > Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
> > Ref: https://lists.freedesktop.org/archives/amd-gfx/2021-August/067413.html
> > Signed-off-by: Koba Ko <koba.ko@canonical.com>
> > ---
> > .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
> > 1 file changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > index 0541bfc81c1b..6ce2a2046457 100644
> > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > @@ -27,6 +27,7 @@
> > #include <linux/pci.h>
> > #include <linux/slab.h>
> > #include <asm/div64.h> > +#include <asm/intel-family.h>
>
> Maybe, include conditionally for X86_64.
>
> > #include <drm/amdgpu_drm.h>
> > #include "ppatomctrl.h"
> > #include "atombios.h"
> > @@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
> > return result;
> > }
> >
> > +static bool intel_core_rkl_chk(void)
> > +{
> > +#ifdef CONFIG_X86_64
>
> Better to use IS_ENABLED() here.
>
> Apart from that, looks fine to me.
>
> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Thanks for the comments.
I will send v3.
>
> Thanks,
> Lijo
>
> > + struct cpuinfo_x86 *c = &cpu_data(0);
> > +
> > + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
> > +#else
> > + return false;
> > +#endif
> > +}
> > +
> > static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> > {
> > struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> > @@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> >
> > data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
> > data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
> > - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
> > + data->pcie_dpm_key_disabled =
> > + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
> > /* need to set voltage control types before EVV patching */
> > data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
> > data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 9:34 ` Koba Ko
@ 2021-08-26 9:54 ` Koba Ko
2021-08-26 10:03 ` Lazar, Lijo
0 siblings, 1 reply; 9+ messages in thread
From: Koba Ko @ 2021-08-26 9:54 UTC (permalink / raw)
To: Lazar, Lijo; +Cc: amd-gfx list
On Thu, Aug 26, 2021 at 5:34 PM Koba Ko <koba.ko@canonical.com> wrote:
>
> On Thu, Aug 26, 2021 at 5:07 PM Lazar, Lijo <lijo.lazar@amd.com> wrote:
> >
> >
> >
> > On 8/26/2021 7:05 AM, Koba Ko wrote:
> > > AMD polaris GPUs have an issue about audio noise on RKL platform,
> > > they provide a commit to fix but for SMU7-based GPU still
> > > need another module parameter,
> > >
> > > modprobe amdgpu ppfeaturemask=0xfff7bffb
> > >
> > > to avoid the module parameter, switch PCI_DPM by determining
> > > intel platform in amd drm driver is a better way.
> > >
> > > Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
> > > Ref: https://lists.freedesktop.org/archives/amd-gfx/2021-August/067413.html
> > > Signed-off-by: Koba Ko <koba.ko@canonical.com>
> > > ---
> > > .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
> > > 1 file changed, 14 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > > index 0541bfc81c1b..6ce2a2046457 100644
> > > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > > @@ -27,6 +27,7 @@
> > > #include <linux/pci.h>
> > > #include <linux/slab.h>
> > > #include <asm/div64.h> > +#include <asm/intel-family.h>
> >
> > Maybe, include conditionally for X86_64.
> >
> > > #include <drm/amdgpu_drm.h>
> > > #include "ppatomctrl.h"
> > > #include "atombios.h"
> > > @@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
> > > return result;
> > > }
> > >
> > > +static bool intel_core_rkl_chk(void)
> > > +{
> > > +#ifdef CONFIG_X86_64
> >
> > Better to use IS_ENABLED() here.
> >
> > Apart from that, looks fine to me.
> >
> > Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
>
> Thanks for the comments.
> I will send v3.
Should I nack v2 after sending v3?
Thanks
> >
> > Thanks,
> > Lijo
> >
> > > + struct cpuinfo_x86 *c = &cpu_data(0);
> > > +
> > > + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
> > > +#else
> > > + return false;
> > > +#endif
> > > +}
> > > +
> > > static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> > > {
> > > struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> > > @@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> > >
> > > data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
> > > data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
> > > - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
> > > + data->pcie_dpm_key_disabled =
> > > + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
> > > /* need to set voltage control types before EVV patching */
> > > data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
> > > data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
> > >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 9:54 ` Koba Ko
@ 2021-08-26 10:03 ` Lazar, Lijo
0 siblings, 0 replies; 9+ messages in thread
From: Lazar, Lijo @ 2021-08-26 10:03 UTC (permalink / raw)
To: Koba Ko; +Cc: amd-gfx list
On 8/26/2021 3:24 PM, Koba Ko wrote:
> On Thu, Aug 26, 2021 at 5:34 PM Koba Ko <koba.ko@canonical.com> wrote:
>>
>> On Thu, Aug 26, 2021 at 5:07 PM Lazar, Lijo <lijo.lazar@amd.com> wrote:
>>>
>>>
>>>
>>> On 8/26/2021 7:05 AM, Koba Ko wrote:
>>>> AMD polaris GPUs have an issue about audio noise on RKL platform,
>>>> they provide a commit to fix but for SMU7-based GPU still
>>>> need another module parameter,
>>>>
>>>> modprobe amdgpu ppfeaturemask=0xfff7bffb
>>>>
>>>> to avoid the module parameter, switch PCI_DPM by determining
>>>> intel platform in amd drm driver is a better way.
>>>>
>>>> Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
>>>> Ref: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Farchives%2Famd-gfx%2F2021-August%2F067413.html&data=04%7C01%7Clijo.lazar%40amd.com%7C86f18ece04774ed787e408d9687784a3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637655684803425194%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6dRblodTvF5XDlRDFtYwVDv6Go2eAd9R9q%2B8hfy6lsY%3D&reserved=0
>>>> Signed-off-by: Koba Ko <koba.ko@canonical.com>
>>>> ---
>>>> .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
>>>> 1 file changed, 14 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
>>>> index 0541bfc81c1b..6ce2a2046457 100644
>>>> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
>>>> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
>>>> @@ -27,6 +27,7 @@
>>>> #include <linux/pci.h>
>>>> #include <linux/slab.h>
>>>> #include <asm/div64.h> > +#include <asm/intel-family.h>
>>>
>>> Maybe, include conditionally for X86_64.
>>>
>>>> #include <drm/amdgpu_drm.h>
>>>> #include "ppatomctrl.h"
>>>> #include "atombios.h"
>>>> @@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
>>>> return result;
>>>> }
>>>>
>>>> +static bool intel_core_rkl_chk(void)
>>>> +{
>>>> +#ifdef CONFIG_X86_64
>>>
>>> Better to use IS_ENABLED() here.
>>>
>>> Apart from that, looks fine to me.
>>>
>>> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
>>
>> Thanks for the comments.
>> I will send v3.
>
> Should I nack v2 after sending v3?
> Thanks
v3 supersedes v2.
My comments are not major that I want to see the patch again after fixing :)
You may fix it before submitting or send a v3 so that others take a look
as well.
Thanks,
Lijo
>>>
>>> Thanks,
>>> Lijo
>>>
>>>> + struct cpuinfo_x86 *c = &cpu_data(0);
>>>> +
>>>> + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
>>>> +#else
>>>> + return false;
>>>> +#endif
>>>> +}
>>>> +
>>>> static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
>>>> {
>>>> struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
>>>> @@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
>>>>
>>>> data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
>>>> data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
>>>> - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
>>>> + data->pcie_dpm_key_disabled =
>>>> + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
>>>> /* need to set voltage control types before EVV patching */
>>>> data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
>>>> data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
>>>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 1:35 ` [PATCH V2 1/1] " Koba Ko
2021-08-26 9:07 ` Lazar, Lijo
@ 2021-08-26 13:22 ` Alex Deucher
2021-08-26 13:43 ` Koba Ko
1 sibling, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2021-08-26 13:22 UTC (permalink / raw)
To: Koba Ko; +Cc: amd-gfx list
On Wed, Aug 25, 2021 at 9:55 PM Koba Ko <koba.ko@canonical.com> wrote:
>
> AMD polaris GPUs have an issue about audio noise on RKL platform,
> they provide a commit to fix but for SMU7-based GPU still
> need another module parameter,
For future readers, it might be better to provide a bit more detail in
the patch description. Something like:
"Due to high latency in PCIE gen switching on RKL platforms, disable
PCIE gen switching on polaris
GPUs to avoid HDMI/DP audio issues."
Alex
>
> modprobe amdgpu ppfeaturemask=0xfff7bffb
>
> to avoid the module parameter, switch PCI_DPM by determining
> intel platform in amd drm driver is a better way.
>
> Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
> Ref: https://lists.freedesktop.org/archives/amd-gfx/2021-August/067413.html
> Signed-off-by: Koba Ko <koba.ko@canonical.com>
> ---
> .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> index 0541bfc81c1b..6ce2a2046457 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> @@ -27,6 +27,7 @@
> #include <linux/pci.h>
> #include <linux/slab.h>
> #include <asm/div64.h>
> +#include <asm/intel-family.h>
> #include <drm/amdgpu_drm.h>
> #include "ppatomctrl.h"
> #include "atombios.h"
> @@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
> return result;
> }
>
> +static bool intel_core_rkl_chk(void)
> +{
> +#ifdef CONFIG_X86_64
> + struct cpuinfo_x86 *c = &cpu_data(0);
> +
> + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
> +#else
> + return false;
> +#endif
> +}
> +
> static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> {
> struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> @@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
>
> data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
> data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
> - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
> + data->pcie_dpm_key_disabled =
> + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
> /* need to set voltage control types before EVV patching */
> data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
> data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 13:22 ` Alex Deucher
@ 2021-08-26 13:43 ` Koba Ko
2021-08-26 13:49 ` Alex Deucher
0 siblings, 1 reply; 9+ messages in thread
From: Koba Ko @ 2021-08-26 13:43 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx list
On Thu, Aug 26, 2021, 9:22 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> On Wed, Aug 25, 2021 at 9:55 PM Koba Ko <koba.ko@canonical.com> wrote:
> >
> > AMD polaris GPUs have an issue about audio noise on RKL platform,
> > they provide a commit to fix but for SMU7-based GPU still
> > need another module parameter,
>
> For future readers, it might be better to provide a bit more detail in
> the patch description. Something like:
>
> "Due to high latency in PCIE gen switching on RKL platforms, disable
> PCIE gen switching on polaris
> GPUs to avoid HDMI/DP audio issues."
>
> Alex
hi Alex,
because I'm not the issue owner and don't know the details, could you
please provide a full description?
I would like to add in the comment.
>
> >
> > modprobe amdgpu ppfeaturemask=0xfff7bffb
> >
> > to avoid the module parameter, switch PCI_DPM by determining
> > intel platform in amd drm driver is a better way.
> >
> > Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
> > Ref: https://lists.freedesktop.org/archives/amd-gfx/2021-August/067413.html
> > Signed-off-by: Koba Ko <koba.ko@canonical.com>
> > ---
> > .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
> > 1 file changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > index 0541bfc81c1b..6ce2a2046457 100644
> > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > @@ -27,6 +27,7 @@
> > #include <linux/pci.h>
> > #include <linux/slab.h>
> > #include <asm/div64.h>
> > +#include <asm/intel-family.h>
> > #include <drm/amdgpu_drm.h>
> > #include "ppatomctrl.h"
> > #include "atombios.h"
> > @@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
> > return result;
> > }
> >
> > +static bool intel_core_rkl_chk(void)
> > +{
> > +#ifdef CONFIG_X86_64
> > + struct cpuinfo_x86 *c = &cpu_data(0);
> > +
> > + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
> > +#else
> > + return false;
> > +#endif
> > +}
> > +
> > static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> > {
> > struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> > @@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> >
> > data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
> > data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
> > - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
> > + data->pcie_dpm_key_disabled =
> > + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
> > /* need to set voltage control types before EVV patching */
> > data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
> > data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
2021-08-26 13:43 ` Koba Ko
@ 2021-08-26 13:49 ` Alex Deucher
0 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2021-08-26 13:49 UTC (permalink / raw)
To: Koba Ko; +Cc: amd-gfx list
On Thu, Aug 26, 2021 at 9:43 AM Koba Ko <koba.ko@canonical.com> wrote:
>
> On Thu, Aug 26, 2021, 9:22 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > On Wed, Aug 25, 2021 at 9:55 PM Koba Ko <koba.ko@canonical.com> wrote:
> > >
> > > AMD polaris GPUs have an issue about audio noise on RKL platform,
> > > they provide a commit to fix but for SMU7-based GPU still
> > > need another module parameter,
> >
> > For future readers, it might be better to provide a bit more detail in
> > the patch description. Something like:
> >
> > "Due to high latency in PCIE gen switching on RKL platforms, disable
> > PCIE gen switching on polaris
> > GPUs to avoid HDMI/DP audio issues."
> >
> > Alex
>
> hi Alex,
> because I'm not the issue owner and don't know the details, could you
> please provide a full description?
> I would like to add in the comment.
How about this:
Due to high latency in PCIE clock switching on RKL platforms,
switching the PCIE clock dynamically at runtime can lead to HDMI/DP
audio problems. On newer asics this is handled in the SMU firmware.
For SMU7-based asics, disable PCIE clock switching to avoid the issue.
Alex
>
> >
> > >
> > > modprobe amdgpu ppfeaturemask=0xfff7bffb
> > >
> > > to avoid the module parameter, switch PCI_DPM by determining
> > > intel platform in amd drm driver is a better way.
> > >
> > > Fixes: 1a31474cdb48 ("drm/amd/pm: workaround for audio noise issue")
> > > Ref: https://lists.freedesktop.org/archives/amd-gfx/2021-August/067413.html
> > > Signed-off-by: Koba Ko <koba.ko@canonical.com>
> > > ---
> > > .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 15 ++++++++++++++-
> > > 1 file changed, 14 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > > index 0541bfc81c1b..6ce2a2046457 100644
> > > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> > > @@ -27,6 +27,7 @@
> > > #include <linux/pci.h>
> > > #include <linux/slab.h>
> > > #include <asm/div64.h>
> > > +#include <asm/intel-family.h>
> > > #include <drm/amdgpu_drm.h>
> > > #include "ppatomctrl.h"
> > > #include "atombios.h"
> > > @@ -1733,6 +1734,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
> > > return result;
> > > }
> > >
> > > +static bool intel_core_rkl_chk(void)
> > > +{
> > > +#ifdef CONFIG_X86_64
> > > + struct cpuinfo_x86 *c = &cpu_data(0);
> > > +
> > > + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
> > > +#else
> > > + return false;
> > > +#endif
> > > +}
> > > +
> > > static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> > > {
> > > struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> > > @@ -1758,7 +1770,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
> > >
> > > data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
> > > data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
> > > - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
> > > + data->pcie_dpm_key_disabled =
> > > + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
> > > /* need to set voltage control types before EVV patching */
> > > data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
> > > data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
> > > --
> > > 2.25.1
> > >
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-08-26 13:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 1:35 [PATCH V2 0/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform Koba Ko
2021-08-26 1:35 ` [PATCH V2 1/1] " Koba Ko
2021-08-26 9:07 ` Lazar, Lijo
2021-08-26 9:34 ` Koba Ko
2021-08-26 9:54 ` Koba Ko
2021-08-26 10:03 ` Lazar, Lijo
2021-08-26 13:22 ` Alex Deucher
2021-08-26 13:43 ` Koba Ko
2021-08-26 13:49 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.