aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0929-drm-amdgpu-powerplay-Add-special-avfs-cases-for-some.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0929-drm-amdgpu-powerplay-Add-special-avfs-cases-for-some.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0929-drm-amdgpu-powerplay-Add-special-avfs-cases-for-some.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0929-drm-amdgpu-powerplay-Add-special-avfs-cases-for-some.patch b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0929-drm-amdgpu-powerplay-Add-special-avfs-cases-for-some.patch
new file mode 100644
index 00000000..454bc65b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0929-drm-amdgpu-powerplay-Add-special-avfs-cases-for-some.patch
@@ -0,0 +1,92 @@
+From 91735c7fbc688e63ee8af396d87c23e73fb9cfeb Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 6 Dec 2018 10:41:27 -0500
+Subject: [PATCH 0929/2940] drm/amdgpu/powerplay: Add special avfs cases for
+ some polaris asics (v3)
+
+Add special avfs handling for some polaris variants.
+
+v2: fix copy paste typo.
+v3: fix asic rid check
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ .../amd/powerplay/smumgr/polaris10_smumgr.c | 54 +++++++++++++++++++
+ 1 file changed, 54 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
+index d2b97aabd45a..52abca065764 100644
+--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
++++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
+@@ -1639,6 +1639,7 @@ static int polaris10_populate_avfs_parameters(struct pp_hwmgr *hwmgr)
+ {
+ struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
+ struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend);
++ struct amdgpu_device *adev = hwmgr->adev;
+
+ SMU74_Discrete_DpmTable *table = &(smu_data->smc_state_table);
+ int result = 0;
+@@ -1658,6 +1659,59 @@ static int polaris10_populate_avfs_parameters(struct pp_hwmgr *hwmgr)
+
+ result = atomctrl_get_avfs_information(hwmgr, &avfs_params);
+
++ if (0 == result) {
++ if (((adev->pdev->device == 0x67ef) &&
++ ((adev->pdev->revision == 0xe0) ||
++ (adev->pdev->revision == 0xe5))) ||
++ ((adev->pdev->device == 0x67ff) &&
++ ((adev->pdev->revision == 0xcf) ||
++ (adev->pdev->revision == 0xef) ||
++ (adev->pdev->revision == 0xff)))) {
++ avfs_params.ucEnableApplyAVFS_CKS_OFF_Voltage = 1;
++ if ((adev->pdev->device == 0x67ef && adev->pdev->revision == 0xe5) ||
++ (adev->pdev->device == 0x67ff && adev->pdev->revision == 0xef)) {
++ if ((avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a0 == 0xEA522DD3) &&
++ (avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a1 == 0x5645A) &&
++ (avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a2 == 0x33F9E) &&
++ (avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_m1 == 0xFFFFC5CC) &&
++ (avfs_params.usAVFSGB_FUSE_TABLE_CKSOFF_m2 == 0x1B1A) &&
++ (avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_b == 0xFFFFFCED)) {
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a0 = 0xF718F1D4;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a1 = 0x323FD;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a2 = 0x1E455;
++ avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_m1 = 0;
++ avfs_params.usAVFSGB_FUSE_TABLE_CKSOFF_m2 = 0;
++ avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_b = 0x23;
++ }
++ }
++ } else if (hwmgr->chip_id == CHIP_POLARIS12 && !hwmgr->is_kicker) {
++ avfs_params.ucEnableApplyAVFS_CKS_OFF_Voltage = 1;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a0 = 0xF6B024DD;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a1 = 0x3005E;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a2 = 0x18A5F;
++ avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_m1 = 0x315;
++ avfs_params.usAVFSGB_FUSE_TABLE_CKSOFF_m2 = 0xFED1;
++ avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_b = 0x3B;
++ } else if (((adev->pdev->device == 0x67df) &&
++ ((adev->pdev->revision == 0xe0) ||
++ (adev->pdev->revision == 0xe3) ||
++ (adev->pdev->revision == 0xe4) ||
++ (adev->pdev->revision == 0xe5) ||
++ (adev->pdev->revision == 0xe7) ||
++ (adev->pdev->revision == 0xef))) ||
++ ((adev->pdev->device == 0x6fdf) &&
++ ((adev->pdev->revision == 0xef) ||
++ (adev->pdev->revision == 0xff)))) {
++ avfs_params.ucEnableApplyAVFS_CKS_OFF_Voltage = 1;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a0 = 0xF843B66B;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a1 = 0x59CB5;
++ avfs_params.ulGB_VDROOP_TABLE_CKSOFF_a2 = 0xFFFF287F;
++ avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_m1 = 0;
++ avfs_params.usAVFSGB_FUSE_TABLE_CKSOFF_m2 = 0xFF23;
++ avfs_params.ulAVFSGB_FUSE_TABLE_CKSOFF_b = 0x58;
++ }
++ }
++
+ if (0 == result) {
+ table->BTCGB_VDROOP_TABLE[0].a0 = PP_HOST_TO_SMC_UL(avfs_params.ulGB_VDROOP_TABLE_CKSON_a0);
+ table->BTCGB_VDROOP_TABLE[0].a1 = PP_HOST_TO_SMC_UL(avfs_params.ulGB_VDROOP_TABLE_CKSON_a1);
+--
+2.17.1
+