[PATCH v2 1/2] drm/radeon: Use pci_dma_mapping_error()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



... instead of comparing with DMA_ERROR_CODE, which will only work on
powerpc/sparc/x86.

Signed-off-by: Aurelien Jarno <aurelien@xxxxxxxxxxx>
---
 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..4de3fb9 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux