aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-10-26 15:27:45 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-10-27 13:59:24 -0400
commit71451bdfc2f7bc67cf0b7a5d51bc1489aaa55701 (patch)
treea3aca04cbee110e65853f5df9f4dd83deb0a10ee
parent7dc86ef5ac91642dfc3eb93ee0f0458e702a343e (diff)
drm/amdgpu/si_dpm: workaround for SI kickers
Consolidate existing quirks. Fixes stability issues on some kickers. Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/si_dpm.c59
1 files changed, 43 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index ee77e9cb55b1..d6f85b1a0b93 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -3477,6 +3477,49 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev,
3477 int i; 3477 int i;
3478 struct si_dpm_quirk *p = si_dpm_quirk_list; 3478 struct si_dpm_quirk *p = si_dpm_quirk_list;
3479 3479
3480 /* limit all SI kickers */
3481 if (adev->asic_type == CHIP_PITCAIRN) {
3482 if ((adev->pdev->revision == 0x81) ||
3483 (adev->pdev->device == 0x6810) ||
3484 (adev->pdev->device == 0x6811) ||
3485 (adev->pdev->device == 0x6816) ||
3486 (adev->pdev->device == 0x6817) ||
3487 (adev->pdev->device == 0x6806))
3488 max_mclk = 120000;
3489 } else if (adev->asic_type == CHIP_VERDE) {
3490 if ((adev->pdev->revision == 0x81) ||
3491 (adev->pdev->revision == 0x83) ||
3492 (adev->pdev->revision == 0x87) ||
3493 (adev->pdev->device == 0x6820) ||
3494 (adev->pdev->device == 0x6821) ||
3495 (adev->pdev->device == 0x6822) ||
3496 (adev->pdev->device == 0x6823) ||
3497 (adev->pdev->device == 0x682A) ||
3498 (adev->pdev->device == 0x682B)) {
3499 max_sclk = 75000;
3500 max_mclk = 80000;
3501 }
3502 } else if (adev->asic_type == CHIP_OLAND) {
3503 if ((adev->pdev->revision == 0xC7) ||
3504 (adev->pdev->revision == 0x80) ||
3505 (adev->pdev->revision == 0x81) ||
3506 (adev->pdev->revision == 0x83) ||
3507 (adev->pdev->device == 0x6604) ||
3508 (adev->pdev->device == 0x6605)) {
3509 max_sclk = 75000;
3510 max_mclk = 80000;
3511 }
3512 } else if (adev->asic_type == CHIP_HAINAN) {
3513 if ((adev->pdev->revision == 0x81) ||
3514 (adev->pdev->revision == 0x83) ||
3515 (adev->pdev->revision == 0xC3) ||
3516 (adev->pdev->device == 0x6664) ||
3517 (adev->pdev->device == 0x6665) ||
3518 (adev->pdev->device == 0x6667)) {
3519 max_sclk = 75000;
3520 max_mclk = 80000;
3521 }
3522 }
3480 /* Apply dpm quirks */ 3523 /* Apply dpm quirks */
3481 while (p && p->chip_device != 0) { 3524 while (p && p->chip_device != 0) {
3482 if (adev->pdev->vendor == p->chip_vendor && 3525 if (adev->pdev->vendor == p->chip_vendor &&
@@ -3489,22 +3532,6 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev,
3489 } 3532 }
3490 ++p; 3533 ++p;
3491 } 3534 }
3492 /* limit mclk on all R7 370 parts for stability */
3493 if (adev->pdev->device == 0x6811 &&
3494 adev->pdev->revision == 0x81)
3495 max_mclk = 120000;
3496 /* limit sclk/mclk on Jet parts for stability */
3497 if (adev->pdev->device == 0x6665 &&
3498 adev->pdev->revision == 0xc3) {
3499 max_sclk = 75000;
3500 max_mclk = 80000;
3501 }
3502 /* Limit clocks for some HD8600 parts */
3503 if (adev->pdev->device == 0x6660 &&
3504 adev->pdev->revision == 0x83) {
3505 max_sclk = 75000;
3506 max_mclk = 80000;
3507 }
3508 3535
3509 if (rps->vce_active) { 3536 if (rps->vce_active) {
3510 rps->evclk = adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].evclk; 3537 rps->evclk = adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].evclk;