All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: Koba Ko <koba.ko@canonical.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH V2 1/1] drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
Date: Thu, 26 Aug 2021 14:37:13 +0530	[thread overview]
Message-ID: <b95b0e84-8fbc-bdd9-2079-a2dd84dff70f@amd.com> (raw)
In-Reply-To: <20210826013523.394705-2-koba.ko@canonical.com>



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;
> 

  reply	other threads:[~2021-08-26  9:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b95b0e84-8fbc-bdd9-2079-a2dd84dff70f@amd.com \
    --to=lijo.lazar@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=koba.ko@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.