Skip to content

Commit b3dc549

Browse files
Kobatwalexdeucher
authored andcommitted
drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
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. AMD provide a parameter to disable PICE_DPM. modprobe amdgpu ppfeaturemask=0xfff7bffb It's better to contorl PCIE_DPM in amd gpu driver, switch PCI_DPM by determining intel RKL platform for SMU7-based asics. Fixes: 1a31474 ("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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 50c6ded commit b3dc549

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#include <linux/pci.h>
2828
#include <linux/slab.h>
2929
#include <asm/div64.h>
30+
#if IS_ENABLED(CONFIG_X86_64)
31+
#include <asm/intel-family.h>
32+
#endif
3033
#include <drm/amdgpu_drm.h>
3134
#include "ppatomctrl.h"
3235
#include "atombios.h"
@@ -1733,6 +1736,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
17331736
return result;
17341737
}
17351738

1739+
static bool intel_core_rkl_chk(void)
1740+
{
1741+
#if IS_ENABLED(CONFIG_X86_64)
1742+
struct cpuinfo_x86 *c = &cpu_data(0);
1743+
1744+
return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
1745+
#else
1746+
return false;
1747+
#endif
1748+
}
1749+
17361750
static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
17371751
{
17381752
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -1758,7 +1772,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
17581772

17591773
data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
17601774
data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
1761-
data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true;
1775+
data->pcie_dpm_key_disabled =
1776+
intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
17621777
/* need to set voltage control types before EVV patching */
17631778
data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
17641779
data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;

0 commit comments

Comments
 (0)