drm/i915: Organize PPGTT init
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 3 Dec 2014 12:55:26 +0000 (04:55 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 17 Dec 2014 17:18:19 +0000 (18:18 +0100)
Let's be optimistic that for future platforms memory management doesn't change
that much and reuse gen8 function for PPGTT init.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c

index 75a29a3822089da48ecb37e179ce7b4050853ce1..82cb5666583f745983eef88bb2dc674a23f6ab3c 100644 (file)
@@ -1165,10 +1165,8 @@ static int __hw_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
 
        if (INTEL_INFO(dev)->gen < 8)
                return gen6_ppgtt_init(ppgtt);
-       else if (IS_GEN8(dev) || IS_GEN9(dev))
-               return gen8_ppgtt_init(ppgtt, dev_priv->gtt.base.total);
        else
-               BUG();
+               return gen8_ppgtt_init(ppgtt, dev_priv->gtt.base.total);
 }
 int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
 {