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>, stable@vger.kernel.org
Subject: [PATCH 1/2] drm/radeon: fix bank tiling parameters on evergreen
Date: Tue, 31 Jul 2012 11:07:09 -0400	[thread overview]
Message-ID: <1343747230-18097-1-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <CADnq5_NDLw30NhwCsDfr5ZDvYFAwo2g-971MFxF+HbZfcd3MjA@mail.gmail.com>

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

Handle the 16 bank case.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/radeon/evergreen.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 30f5c31..475984a 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2005,10 +2005,18 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
 	if (rdev->flags & RADEON_IS_IGP)
 		rdev->config.evergreen.tile_config |= 1 << 4;
 	else {
-		if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT)
-			rdev->config.evergreen.tile_config |= 1 << 4;
-		else
+		switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) {
+		case 0: /* four banks */
 			rdev->config.evergreen.tile_config |= 0 << 4;
+			break;
+		case 1: /* eight banks */
+			rdev->config.evergreen.tile_config |= 1 << 4;
+			break;
+		case 2: /* sixteen banks */
+		default:
+			rdev->config.evergreen.tile_config |= 2 << 4;
+			break;
+		}
 	}
 	rdev->config.evergreen.tile_config |= 0 << 8;
 	rdev->config.evergreen.tile_config |=
-- 
1.7.7.5

  reply	other threads:[~2012-07-31 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 11:48 [PATCH 1/2] drm/radeon: fix fence related segfault in CS Christian König
2012-07-31 11:48 ` [PATCH 2/2] drm/radeon: fix bank tiling parameters on SI Christian König
2012-07-31 14:02   ` Alex Deucher
2012-07-31 14:21     ` Christian König
2012-07-31 14:42       ` Alex Deucher
2012-07-31 15:07         ` alexdeucher [this message]
2012-07-31 15:07           ` [PATCH 2/2] drm/radeon: fix bank tiling parameters on cayman alexdeucher
2012-07-31 15:21         ` [PATCH 2/2] drm/radeon: fix bank tiling parameters on SI Christian König
2012-07-31 14:47 ` [PATCH 1/2] drm/radeon: fix fence related segfault in CS Michel Dänzer
2012-07-31 15:05   ` Christian König

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=1343747230-18097-1-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 \
    --cc=stable@vger.kernel.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.