dri-devel Archive on 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>, Chen Jie <chenj@lemote.com>
Subject: [PATCH] drm/radeon/kms: set DMA mask properly on newer PCI asics
Date: Wed,  5 Oct 2011 10:02:57 -0400	[thread overview]
Message-ID: <1317823377-1919-1-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <CADnq5_N6HkR=9HHDJa7OH1UDEA_Kzr=WoMgbHjjmDwax_mRWow@mail.gmail.com>

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

If a card wasn't PCIE, we always set the DMA mask to 32 bits.
This is only applies to the old rage128/r1xx gart block on
early radeon asics (~r1xx-r4xx).  Newer PCI and IGP cards
can handle 40 bits just fine.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Chen Jie <chenj@lemote.com>
---
 drivers/gpu/drm/radeon/radeon_device.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index b51e157..2c3429d 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -750,14 +750,15 @@ int radeon_device_init(struct radeon_device *rdev,
 
 	/* set DMA mask + need_dma32 flags.
 	 * PCIE - can handle 40-bits.
-	 * IGP - can handle 40-bits (in theory)
+	 * IGP - can handle 40-bits
 	 * AGP - generally dma32 is safest
-	 * PCI - only dma32
+	 * PCI - dma32 for legacy pci gart, 40 bits on newer asics
 	 */
 	rdev->need_dma32 = false;
 	if (rdev->flags & RADEON_IS_AGP)
 		rdev->need_dma32 = true;
-	if (rdev->flags & RADEON_IS_PCI)
+	if ((rdev->flags & RADEON_IS_PCI) &&
+	    (rdev->family < CHIP_RS400))
 		rdev->need_dma32 = true;
 
 	dma_bits = rdev->need_dma32 ? 32 : 40;
-- 
1.7.1.1

  reply	other threads:[~2011-10-05 14:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29  9:17 Re:[mipsel+rs780e]Occasionally "GPU lockup" after resuming from suspend Chen Jie
2011-10-05  9:41 ` Michel Dänzer
2011-10-05 13:54   ` Alex Deucher
2011-10-05 14:02     ` alexdeucher [this message]
2011-10-18  8:23       ` [PATCH] drm/radeon/kms: set DMA mask properly on newer PCI asics Chen Jie
2011-11-08  7:33 ` [mipsel+rs780e]Occasionally "GPU lockup" after resuming from suspend Chen Jie
2011-11-08 15:14   ` Jerome Glisse

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=1317823377-1919-1-git-send-email-alexdeucher@gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=chenj@lemote.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox