diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-01-06 21:19:16 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-01-06 23:11:23 -0500 |
commit | a572eaa3726968555451ba301ff8c61e90e8c278 (patch) | |
tree | 5f0a155b4e4e34ad98f07a742aad1bacf86702ed /drivers/gpu/drm/radeon/atombios_crtc.c | |
parent | f82b3ddc5fac044a28ab841bfd4ae48e2e43a21b (diff) |
drm/radeon/kms: DCE5 atom spread spectrum updates
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_crtc.c')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_crtc.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index b3e5e7549008..b0ab185b86f6 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -403,6 +403,7 @@ union atom_enable_ss { | |||
403 | ENABLE_LVDS_SS_PARAMETERS_V2 lvds_ss_2; | 403 | ENABLE_LVDS_SS_PARAMETERS_V2 lvds_ss_2; |
404 | ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION v1; | 404 | ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION v1; |
405 | ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2 v2; | 405 | ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2 v2; |
406 | ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3 v3; | ||
406 | }; | 407 | }; |
407 | 408 | ||
408 | static void atombios_crtc_program_ss(struct drm_crtc *crtc, | 409 | static void atombios_crtc_program_ss(struct drm_crtc *crtc, |
@@ -417,7 +418,30 @@ static void atombios_crtc_program_ss(struct drm_crtc *crtc, | |||
417 | 418 | ||
418 | memset(&args, 0, sizeof(args)); | 419 | memset(&args, 0, sizeof(args)); |
419 | 420 | ||
420 | if (ASIC_IS_DCE4(rdev)) { | 421 | if (ASIC_IS_DCE5(rdev)) { |
422 | args.v3.usSpreadSpectrumAmountFrac = 0; | ||
423 | args.v3.ucSpreadSpectrumType = ss->type; | ||
424 | switch (pll_id) { | ||
425 | case ATOM_PPLL1: | ||
426 | args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P1PLL; | ||
427 | args.v3.usSpreadSpectrumAmount = ss->amount; | ||
428 | args.v3.usSpreadSpectrumStep = ss->step; | ||
429 | break; | ||
430 | case ATOM_PPLL2: | ||
431 | args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P2PLL; | ||
432 | args.v3.usSpreadSpectrumAmount = ss->amount; | ||
433 | args.v3.usSpreadSpectrumStep = ss->step; | ||
434 | break; | ||
435 | case ATOM_DCPLL: | ||
436 | args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_DCPLL; | ||
437 | args.v3.usSpreadSpectrumAmount = 0; | ||
438 | args.v3.usSpreadSpectrumStep = 0; | ||
439 | break; | ||
440 | case ATOM_PPLL_INVALID: | ||
441 | return; | ||
442 | } | ||
443 | args.v2.ucEnable = enable; | ||
444 | } else if (ASIC_IS_DCE4(rdev)) { | ||
421 | args.v2.usSpreadSpectrumPercentage = cpu_to_le16(ss->percentage); | 445 | args.v2.usSpreadSpectrumPercentage = cpu_to_le16(ss->percentage); |
422 | args.v2.ucSpreadSpectrumType = ss->type; | 446 | args.v2.ucSpreadSpectrumType = ss->type; |
423 | switch (pll_id) { | 447 | switch (pll_id) { |