summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-02 20:02:32 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-02 20:02:32 -0800
commitcbdbb4c1d22e26f9d5314fefe6f2c7e5ed7f6a0f (patch)
treebc5255afdf35de2541afa05a30a83b5d18818820 /drivers
parentf7d222ea2ac7aebf1ac06a76e7739ed17480fd38 (diff)
parent0366ebbf94cfafbdb1fd8c30da47a945294fe1a1 (diff)
downloadop-kernel-dev-cbdbb4c1d22e26f9d5314fefe6f2c7e5ed7f6a0f.zip
op-kernel-dev-cbdbb4c1d22e26f9d5314fefe6f2c7e5ed7f6a0f.tar.gz
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/i915: fix memory corruption with GM965 and >4GB RAM
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 17bd766..e33d9be 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1895,6 +1895,17 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (IS_GEN2(dev))
dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(30));
+ /* 965GM sometimes incorrectly writes to hardware status page (HWS)
+ * using 32bit addressing, overwriting memory if HWS is located
+ * above 4GB.
+ *
+ * The documentation also mentions an issue with undefined
+ * behaviour if any general state is accessed within a page above 4GB,
+ * which also needs to be handled carefully.
+ */
+ if (IS_BROADWATER(dev) || IS_CRESTLINE(dev))
+ dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(32));
+
mmio_bar = IS_GEN2(dev) ? 1 : 0;
dev_priv->regs = pci_iomap(dev->pdev, mmio_bar, 0);
if (!dev_priv->regs) {
OpenPOWER on IntegriCloud