All of lore.kernel.org
 help / color / mirror / Atom feed
From: alexdeucher@gmail.com
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 16/16] drm/radeon: fix SS setup for DCPLL
Date: Tue, 17 Jul 2012 14:02:44 -0400	[thread overview]
Message-ID: <1342548164-1948-17-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <1342548164-1948-1-git-send-email-alexdeucher@gmail.com>

From: Alex Deucher <alexander.deucher@amd.com>

Need to actually set the SS parameters rather than just 0.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/atombios_crtc.c |   16 ++++------------
 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 bbbeb98..a4664e0 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,
 		switch (pll_id) {
 		case ATOM_PPLL1:
 			args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P1PLL;
-			args.v3.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
-			args.v3.usSpreadSpectrumStep = cpu_to_le16(ss->step);
 			break;
 		case ATOM_PPLL2:
 			args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_P2PLL;
-			args.v3.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
-			args.v3.usSpreadSpectrumStep = cpu_to_le16(ss->step);
 			break;
 		case ATOM_DCPLL:
 			args.v3.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V3_DCPLL;
-			args.v3.usSpreadSpectrumAmount = cpu_to_le16(0);
-			args.v3.usSpreadSpectrumStep = cpu_to_le16(0);
 			break;
 		case ATOM_PPLL_INVALID:
 			return;
 		}
+		args.v3.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
+		args.v3.usSpreadSpectrumStep = cpu_to_le16(ss->step);
 		args.v3.ucEnable = enable;
 		if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK) || ASIC_IS_DCE61(rdev))
 			args.v3.ucEnable = ATOM_DISABLE;
@@ -482,22 +478,18 @@ static void atombios_crtc_program_ss(struct radeon_device *rdev,
 		switch (pll_id) {
 		case ATOM_PPLL1:
 			args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_P1PLL;
-			args.v2.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
-			args.v2.usSpreadSpectrumStep = cpu_to_le16(ss->step);
 			break;
 		case ATOM_PPLL2:
 			args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_P2PLL;
-			args.v2.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
-			args.v2.usSpreadSpectrumStep = cpu_to_le16(ss->step);
 			break;
 		case ATOM_DCPLL:
 			args.v2.ucSpreadSpectrumType |= ATOM_PPLL_SS_TYPE_V2_DCPLL;
-			args.v2.usSpreadSpectrumAmount = cpu_to_le16(0);
-			args.v2.usSpreadSpectrumStep = cpu_to_le16(0);
 			break;
 		case ATOM_PPLL_INVALID:
 			return;
 		}
+		args.v2.usSpreadSpectrumAmount = cpu_to_le16(ss->amount);
+		args.v2.usSpreadSpectrumStep = cpu_to_le16(ss->step);
 		args.v2.ucEnable = enable;
 		if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK) || ASIC_IS_DCE41(rdev))
 			args.v2.ucEnable = ATOM_DISABLE;
-- 
1.7.7.5

      parent reply	other threads:[~2012-07-17 18:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 18:02 [PATCH 00/16] radeon drm-next patches alexdeucher
2012-07-17 18:02 ` [PATCH 01/16] drm/radeon: update ib_execute for SI (v2) alexdeucher
2012-07-17 18:02 ` [PATCH 02/16] drm/radeon: remove radeon_ring_index() alexdeucher
2012-07-17 18:02 ` [PATCH 03/16] drm/radeon: update rptr saving logic for memory buffers alexdeucher
2012-07-17 18:02 ` [PATCH 04/16] drm/radeon: add rptr save support for r1xx-r5xx alexdeucher
2012-07-17 18:02 ` [PATCH 05/16] drm/radeon: document radeon_device.c (v2) alexdeucher
2012-07-17 18:02 ` [PATCH 06/16] drm/radeon: document radeon_kms.c alexdeucher
2012-07-17 18:02 ` [PATCH 07/16] drm/radeon: document radeon_irq_kms.c alexdeucher
2012-07-17 18:02 ` [PATCH 08/16] drm/radeon: document radeon_asic.c alexdeucher
2012-07-17 18:02 ` [PATCH 09/16] drm/radeon: document radeon_fence.c (v2) alexdeucher
2012-07-17 18:02 ` [PATCH 10/16] drm/radeon: document radeon_ring.c (v4) alexdeucher
2012-07-17 18:02 ` [PATCH 11/16] drm/radeon: document non-VM functions in radeon_gart.c (v2) alexdeucher
2012-07-17 18:02 ` [PATCH 12/16] drm/radeon: document VM functions in radeon_gart.c (v3) alexdeucher
2012-07-17 18:02 ` [PATCH 13/16] drm/radeon: start to document the functions r100.c alexdeucher
2012-07-17 18:02 ` [PATCH 14/16] drm/radeon: start to document evergreen.c alexdeucher
2012-07-17 18:02 ` [PATCH 15/16] drm/radeon: fix up pll selection on DCE5/6 alexdeucher
2012-07-17 18:02 ` alexdeucher [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342548164-1948-17-git-send-email-alexdeucher@gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.