aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2013-04-08 21:43:53 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-18 03:43:14 -0400
commit3ed124b21e6bf388c63b182d9c2d766a6ca0e8be (patch)
tree6c0832e24dfb79f70dc107a584450b865275678c /drivers/gpu/drm/i915
parent3eb1c005c616f110ccec25540712ce7232d5d4bf (diff)
drm/i915: Rework PPGTT init code
This rework will help if future platforms choose to be a bit different. Should have no functional impact. v2: Don't move around the vtable setup (Daniel) v3: Squash in the disable-by-default patch. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index b4ba488e5c83..b13ba9d53b19 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -238,7 +238,11 @@ static int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
238 ppgtt->dev = dev; 238 ppgtt->dev = dev;
239 ppgtt->scratch_page_dma_addr = dev_priv->gtt.scratch_page_dma; 239 ppgtt->scratch_page_dma_addr = dev_priv->gtt.scratch_page_dma;
240 240
241 ret = gen6_ppgtt_init(ppgtt); 241 if (INTEL_INFO(dev)->gen < 8)
242 ret = gen6_ppgtt_init(ppgtt);
243 else
244 BUG();
245
242 if (ret) 246 if (ret)
243 kfree(ppgtt); 247 kfree(ppgtt);
244 else 248 else