Re: "Can not ioremap virtual address" (was Re: [git pull] drm)

From: Jesse Barnes
Date: Fri Feb 13 2009 - 14:04:21 EST


On Friday, February 13, 2009 9:28 am Diego Calleja wrote:
> On Lunes 09 Febrero 2009 09:30:57 Dave Airlie escribió:
> > Hi Linus,
> >
> > Please pull the 'drm-fixes' branch from
> > ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
> > drm-fixes
>
> A commit from this merge is causing an error in my machine:
>
> commit ab657db12d7020629f26f30d287558a8d0e32b41
> Author: Eric Anholt <eric@xxxxxxxxxx>
> Date: Fri Jan 23 12:57:47 2009 -0800
>
> drm/i915: Set up an MTRR covering the GTT at driver load.
>
>
> (found using bisection)
>
> The error:
> [ 20.270956] [drm] Initialized i915 1.6.0 20080730 on minor 0
> [ 20.289492] [drm:i915_initialize] *ERROR* can not ioremap virtual
> address for ring buffer
>
> And in Xorg.0.log: (II) intel(0): direct rendering: Failed
>
>
> But...excluding that printk, everything works OK, including "direct
> rendering: Yes"...
>
> There's a related thread here: http://lkml.org/lkml/2009/2/13/139

Does this prevent the message? We map it WC in GEM but not in
i915_initialize...

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 81f1cff..2d797ff 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -202,7 +202,7 @@ static int i915_initialize(struct drm_device * dev,
drm_i915
dev_priv->ring.map.flags = 0;
dev_priv->ring.map.mtrr = 0;

- drm_core_ioremap(&dev_priv->ring.map, dev);
+ drm_core_ioremap_wc(&dev_priv->ring.map, dev);

if (dev_priv->ring.map.handle == NULL) {
i915_dma_cleanup(dev);


--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/