summaryrefslogtreecommitdiff
path: root/drivers/char/drm/ati_pcigart.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-03-29 00:23:07 +0300
committerDave Airlie <airlied@linux.ie>2008-03-30 00:57:57 +0300
commit6876b3bacaaa4c73fb8752b47c84b2b7fad5422a (patch)
treeb3f0a1795a3c0c66de99642ba0e1c233c872823c /drivers/char/drm/ati_pcigart.c
parent2b46278b6af0a4df43016f01a0741d8e0a76bfd4 (diff)
downloadlinux-6876b3bacaaa4c73fb8752b47c84b2b7fad5422a.tar.xz
drm: fix for non-coherent DMA PowerPC
This patch fixes bits of the DRM so to make the radeon DRI work on non-cache coherent PCI DMA variants of the PowerPC processors. It moves the few places that needs change to wrappers to that other architectures with similar issues can easily add their own changes to those wrappers, at least until we have more useful generic kernel API. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/ati_pcigart.c')
-rw-r--r--drivers/char/drm/ati_pcigart.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/drm/ati_pcigart.c b/drivers/char/drm/ati_pcigart.c
index 35d25d821c38..141f4dfa0a11 100644
--- a/drivers/char/drm/ati_pcigart.c
+++ b/drivers/char/drm/ati_pcigart.c
@@ -168,6 +168,12 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
}
}
+ if (gart_info->gart_table_location == DRM_ATI_GART_MAIN)
+ dma_sync_single_for_device(&dev->pdev->dev,
+ bus_address,
+ max_pages * sizeof(u32),
+ PCI_DMA_TODEVICE);
+
ret = 1;
#if defined(__i386__) || defined(__x86_64__)