From: jsg Date: Mon, 27 Sep 2021 05:05:57 +0000 (+0000) Subject: drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=65f11b9869bb94e3835c4758cf0c319fcdaec894;p=openbsd drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform From Koba Ko 45bd9dd1bee8aedc4cbd409b1ba7f9b4f941eea6 in linux 5.10.y/5.10.69 b3dc549986eb7b38eba4a144e979dc93f386751f in mainline linux --- diff --git a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c index ea46abe9160..0d57c163a01 100644 --- a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +++ b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c @@ -27,6 +27,9 @@ #include #include #include +#if IS_ENABLED(CONFIG_X86_64) && defined(__linux__) +#include +#endif #include #include "ppatomctrl.h" #include "atombios.h" @@ -1606,6 +1609,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr) return result; } +static bool intel_core_rkl_chk(void) +{ +#if IS_ENABLED(CONFIG_X86_64) + struct cpu_info *ci = curcpu(); + + return (ci->ci_family == 6 && ci->ci_model == 0xa7); +#else + return false; +#endif +} + static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr) { struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); @@ -1629,7 +1643,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;