aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-07-17 14:02:44 -0400
committerChristian König <deathsimple@vodafone.de>2012-07-18 07:53:43 -0400
commitf312f0937855c962edd455b250ed16ada818b234 (patch)
tree424791af4a6301988dcf6c9e8cc118cd29a4206a /drivers
parent26fe45a0a76f165425f332a5aaa298f149f9db22 (diff)
drm/radeon: fix SS setup for DCPLL
Need to actually set the SS parameters rather than just 0. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index bbbeb98d4bb7..a4664e015a6f 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -457,22 +457,18 @@ static void atombios_crtc_program_ss(struct radeon_device *rdev,
457 switch (pll_id) { 457 switch (pll_id) {
458 case ATOM_PPLL1: 458 case ATOM_PPLL1:
459 args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P1PLL; 459 args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P1PLL;
460 args.v3.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
461 args.v3.usSpreadSpectrumStep = cpu_to_le16(ss->step);
462 break; 460 break;
463 case ATOM_PPLL2: 461 case ATOM_PPLL2:
464 args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P2PLL; 462 args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P2PLL;
465 args.v3.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
466 args.v3.usSpreadSpectrumStep = cpu_to_le16(ss->step);
467 break; 463 break;
468 case ATOM_DCPLL: 464 case ATOM_DCPLL:
469 args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_DCPLL; 465 args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_DCPLL;
470 args.v3.usSpreadSpectrumAmount = cpu_to_le16(0);
471 args.v3.usSpreadSpectrumStep = cpu_to_le16(0);
472 break; 466 break;
473 case ATOM_PPLL_INVALID: 467 case ATOM_PPLL_INVALID:
474 return; 468 return;
475 } 469 }
470 args.v3.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
471 args.v3.usSpreadSpectrumStep = cpu_to_le16(ss->step);
476 args.v3.ucEnable = enable; 472 args.v3.ucEnable = enable;
477 if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK) || ASIC_IS_DCE61(rdev)) 473 if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK) || ASIC_IS_DCE61(rdev))
478 args.v3.ucEnable = ATOM_DISABLE; 474 args.v3.ucEnable = ATOM_DISABLE;
@@ -482,22 +478,18 @@ static void atombios_crtc_program_ss(struct radeon_device *rdev,
482 switch (pll_id) { 478 switch (pll_id) {
483 case ATOM_PPLL1: 479 case ATOM_PPLL1:
484 args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_P1PLL; 480 args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_P1PLL;
485 args.v2.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
486 args.v2.usSpreadSpectrumStep = cpu_to_le16(ss->step);
487 break; 481 break;
488 case ATOM_PPLL2: 482 case ATOM_PPLL2:
489 args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_P2PLL; 483 args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_P2PLL;
490 args.v2.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
491 args.v2.usSpreadSpectrumStep = cpu_to_le16(ss->step);
492 break; 484 break;
493 case ATOM_DCPLL: 485 case ATOM_DCPLL:
494 args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_DCPLL; 486 args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_DCPLL;
495 args.v2.usSpreadSpectrumAmount = cpu_to_le16(0);
496 args.v2.usSpreadSpectrumStep = cpu_to_le16(0);
497 break; 487 break;
498 case ATOM_PPLL_INVALID: 488 case ATOM_PPLL_INVALID:
499 return; 489 return;
500 } 490 }
491 args.v2.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
492 args.v2.usSpreadSpectrumStep = cpu_to_le16(ss->step);
501 args.v2.ucEnable = enable; 493 args.v2.ucEnable = enable;
502 if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK) || ASIC_IS_DCE41(rdev)) 494 if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK) || ASIC_IS_DCE41(rdev))
503 args.v2.ucEnable = ATOM_DISABLE; 495 args.v2.ucEnable = ATOM_DISABLE;