Skip to contentSkip to conversation

drm/i915: re-add dropped dma_mask configuration

PATCH In review Ben Widawsky 2 participants 2 messages Jan 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: re-add dropped dma_mask configuration

I'm pretty sure without this, and with DMAR, things explode spectacularly. I got to this patch via bisecting broken i-g-t on my machine.

If I had wired ethernet, I would figure out exactly what's failing with netconsole. To be honest, nothing particularly stands out to me looking over the code as to why it should fail though. If someone is more inquisitive than I, I would be interested to know why we actually need this bit of code. Not sure if things are broken without DMAR.

Daniel noticed this was accidentally dropped after I rebased my branch, but figured it wasn't really needed. Seems it is.

Given that my patch:
commit 2ca466ae28f25e62090e4b57c90bcfee080a47a9

Author: Ben Widawsky <[email protected]>
Date:   Fri Jan 18 12:30:33 2013 -0800
    drm/i915: Needs_dmar, not

I'd suggest just squashing this into 2ca466ae28 since this was never intentional anyway.

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_gem_gtt.c +3 -0
index f8fb7e3..a0ba4a9 100644
@@ -721,6 +721,9 @@ int i915_gem_gtt_init(struct drm_device *dev)
 		return 0;
 	}
 
+	if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(40)))
+		pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(40));
+
 	dev_priv->mm.gtt = kzalloc(sizeof(*dev_priv->mm.gtt), GFP_KERNEL);
 	if (!dev_priv->mm.gtt)
 		return -ENOMEM;
Signature · 1 line
1.8.1.1
#1 lore raw
Quoted 18 lines · Ben Widawsky

I'm pretty sure without this, and with DMAR, things explode spectacularly. I got to this patch via bisecting broken i-g-t on my machine.

If I had wired ethernet, I would figure out exactly what's failing with netconsole. To be honest, nothing particularly stands out to me looking over the code as to why it should fail though. If someone is more inquisitive than I, I would be interested to know why we actually need this bit of code. Not sure if things are broken without DMAR.

Daniel noticed this was accidentally dropped after I rebased my branch, but figured it wasn't really needed. Seems it is.

Given that my patch:
commit 2ca466ae28f25e62090e4b57c90bcfee080a47a9

Author: Ben Widawsky <[email protected]>
Date:   Fri Jan 18 12:30:33 2013 -0800
Quoted 7 lines
    drm/i915: Needs_dmar, not

I'd suggest just squashing this into 2ca466ae28 since this was never intentional anyway.

Queued for -next, thanks for the patch. I'll beat on things a beat and then squash your patches around (and annoy our QA with an updated -testing, since the old one's stale already).
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch