aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-08-30 15:25:23 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-06 18:09:52 -0400
commit9f82d23846146990d475f6753be733e55788d88d (patch)
tree9e9763c3c85c3a1e15be7b123ddd63d5a20efaac /drivers
parent300387c0b57d75e5218e2881d6ad2720657a8bcf (diff)
drm/i915: overlay on gen2 can't address above 1G
So set the coherent dma mask accordingly. This dma mask is only used for physical objects, so it won't really matter allocation-wise. Now this never really surfaced because sane 32bit kernels only have 1G of lowmem. But some eager testers (distros?) still carry around the patch to adjust lowmem via a kconfig option. And the kernel seems to favour high allocations on boot-up, hence the overlay blowing up reliably. Because the patch is tiny and nicely shows how broken gen2 is it's imho worth to merge despite the fact that mucking around with the lowmem/ highmem division is (no longer) supported. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28318 Cc: stable@kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index a7ec93e62f81..7796f452ed1d 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -2082,6 +2082,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
2082 goto free_priv; 2082 goto free_priv;
2083 } 2083 }
2084 2084
2085 /* overlay on gen2 is broken and can't address above 1G */
2086 if (IS_GEN2(dev))
2087 dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(30));
2088
2085 dev_priv->regs = ioremap(base, size); 2089 dev_priv->regs = ioremap(base, size);
2086 if (!dev_priv->regs) { 2090 if (!dev_priv->regs) {
2087 DRM_ERROR("failed to map registers\n"); 2091 DRM_ERROR("failed to map registers\n");