[PATCH 7/7] radeon/PCIe: bugfix: use the correct index field.

From: Konrad Rzeszutek Wilk
Date: Mon Dec 06 2010 - 21:08:15 EST


We were using the wrong index field causing us to ignore
when DMA addresses were passed in.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
drivers/gpu/drm/radeon/radeon_gart.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index 8e89e01..4a5ac4b 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -183,9 +183,9 @@ 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[p] != DMA_ERROR_CODE) {
+ if (dma_addr[i] != DMA_ERROR_CODE) {
rdev->gart.ttm_alloced[p] = true;
- rdev->gart.pages_addr[p] = dma_addr[p];
+ rdev->gart.pages_addr[p] = dma_addr[i];
} else {
/* we need to support large memory configurations */
/* assume that unbind have already been call on the range */
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/