From 6088e45a68abb554f8cef3699096e4a7b6085fde Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Fri, 11 Nov 2011 19:15:18 -0500 Subject: [PATCH] RADEON help debug https://bugs.freedesktop.org/show_bug.cgi?id=42373 --- arch/x86/kernel/pci-nommu.c | 2 +- drivers/gpu/drm/radeon/radeon_device.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index 3af4af8..a4b3d31 100644 --- a/arch/x86/kernel/pci-nommu.c +++ b/arch/x86/kernel/pci-nommu.c @@ -17,7 +17,7 @@ check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) { if (hwdev && !dma_capable(hwdev, bus, size)) { if (*hwdev->dma_mask >= DMA_BIT_MASK(32)) - printk(KERN_ERR + dev_printk(KERN_ERR, hwdev, "nommu_%s: overflow %Lx+%zu of device mask %Lx\n", name, (long long)bus, size, (long long)*hwdev->dma_mask); diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index c33bc91..56606d6 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -762,11 +762,17 @@ int radeon_device_init(struct radeon_device *rdev, rdev->need_dma32 = true; dma_bits = rdev->need_dma32 ? 32 : 40; +DRM_INFO("dma bits %d\n", dma_bits); r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits)); if (r) { rdev->need_dma32 = true; printk(KERN_WARNING "radeon: No suitable DMA available.\n"); } + r = pci_set_consistent_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits)); + if (r) { + pci_set_consistent_dma_mask(rdev->pdev, DMA_BIT_MASK(32)); + printk(KERN_WARNING "radeon: No coherent DMA available.\n"); + } /* Registers mapping */ /* TODO: block userspace mapping of io register */ -- 1.7.6.4