* drm/nouveau, drm/radeon: fix build failure on mips.

svn path=/dists/trunk/linux-2.6/; revision=17260
This commit is contained in:
Aurelien Jarno 2011-04-27 07:08:19 +00:00
parent 1fbbfcfce7
commit 1548dd4a77
4 changed files with 65 additions and 0 deletions

3
debian/changelog vendored
View File

@ -6,6 +6,9 @@ linux-2.6 (2.6.39~rc4-1~experimental.2) UNRELEASED; urgency=low
- Enable IWLWIFI_LEGACY as module
- Enable IWL4965 as module; it is no longer part of the iwlagn module
[ Aurelien Jarno ]
* drm/nouveau, drm/radeon: fix build failure on mips.
-- Ben Hutchings <ben@decadent.org.uk> Mon, 25 Apr 2011 02:08:20 +0100
linux-2.6 (2.6.39~rc4-1~experimental.1) experimental; urgency=low

View File

@ -0,0 +1,30 @@
From 2fbfe63a8f454c505d730636de3366a0e5ab0601 Mon Sep 17 00:00:00 2001
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Tue, 26 Apr 2011 23:00:20 +0200
Subject: [PATCH 2/2] drm/nouveau: Use pci_dma_mapping_error()
... instead of comparing with DMA_ERROR_CODE, which will only work on
powerpc/sparc/x86.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
drivers/gpu/drm/nouveau/nouveau_sgdma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
index 4bce801..b038de9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
@@ -42,7 +42,8 @@ nouveau_sgdma_populate(struct ttm_backend *be, unsigned long num_pages,
nvbe->nr_pages = 0;
while (num_pages--) {
- if (dma_addrs[nvbe->nr_pages] != DMA_ERROR_CODE) {
+ if (pci_dma_mapping_error(dev->pdev,
+ dma_addrs[nvbe->nr_pages])) {
nvbe->pages[nvbe->nr_pages] =
dma_addrs[nvbe->nr_pages];
nvbe->ttm_alloced[nvbe->nr_pages] = true;
--
1.7.2.3

View File

@ -0,0 +1,29 @@
From 1ab87fee280218acb5cca6ddbe81bd2367d8559f Mon Sep 17 00:00:00 2001
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Tue, 26 Apr 2011 21:14:40 +0200
Subject: [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error()
... instead of comparing with DMA_ERROR_CODE, which will only work on
powerpc/sparc/x86.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
drivers/gpu/drm/radeon/radeon_gart.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index 8a955bb..d96f5ea 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -183,7 +183,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
for (i = 0; i < pages; i++, p++) {
/* On TTM path, we only use the DMA API if TTM_PAGE_FLAG_DMA32
* is requested. */
- if (dma_addr[i] != DMA_ERROR_CODE) {
+ if (pci_dma_mapping_error(rdev->pdev, dma_addr[i])) {
rdev->gart.ttm_alloced[p] = true;
rdev->gart.pages_addr[p] = dma_addr[i];
} else {
--
1.7.2.3

View File

@ -0,0 +1,3 @@
+ bugfix/all/drm-nouveau-Use-pci_dma_mapping_error.patch
+ bugfix/all/drm-radeon-Use-pci_dma_mapping_error.patch