Commit b2f21b4d authored by Ben Widawsky's avatar Ben Widawsky Committed by Daniel Vetter

drm/i915: Use gtt shortform where possible

Just for compactness.
Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 80a74f7f
...@@ -846,34 +846,28 @@ int i915_gem_gtt_init(struct drm_device *dev) ...@@ -846,34 +846,28 @@ int i915_gem_gtt_init(struct drm_device *dev)
int ret; int ret;
if (INTEL_INFO(dev)->gen <= 5) { if (INTEL_INFO(dev)->gen <= 5) {
dev_priv->gtt.gtt_probe = i915_gmch_probe; gtt->gtt_probe = i915_gmch_probe;
dev_priv->gtt.gtt_remove = i915_gmch_remove; gtt->gtt_remove = i915_gmch_remove;
} else { } else {
dev_priv->gtt.gtt_probe = gen6_gmch_probe; gtt->gtt_probe = gen6_gmch_probe;
dev_priv->gtt.gtt_remove = gen6_gmch_remove; gtt->gtt_remove = gen6_gmch_remove;
if (IS_HASWELL(dev)) { if (IS_HASWELL(dev))
dev_priv->gtt.pte_encode = hsw_pte_encode; gtt->pte_encode = hsw_pte_encode;
} else if (IS_VALLEYVIEW(dev)) { else if (IS_VALLEYVIEW(dev))
dev_priv->gtt.pte_encode = byt_pte_encode; gtt->pte_encode = byt_pte_encode;
} else { else
dev_priv->gtt.pte_encode = gen6_pte_encode; gtt->pte_encode = gen6_pte_encode;
}
} }
ret = dev_priv->gtt.gtt_probe(dev, &dev_priv->gtt.total, ret = gtt->gtt_probe(dev, &gtt->total, &gtt->stolen_size,
&dev_priv->gtt.stolen_size, &gtt->mappable_base, &gtt->mappable_end);
&gtt->mappable_base,
&gtt->mappable_end);
if (ret) if (ret)
return ret; return ret;
/* GMADR is the PCI mmio aperture into the global GTT. */ /* GMADR is the PCI mmio aperture into the global GTT. */
DRM_INFO("Memory usable by graphics device = %zdM\n", DRM_INFO("Memory usable by graphics device = %zdM\n", gtt->total >> 20);
dev_priv->gtt.total >> 20); DRM_DEBUG_DRIVER("GMADR size = %ldM\n", gtt->mappable_end >> 20);
DRM_DEBUG_DRIVER("GMADR size = %ldM\n", DRM_DEBUG_DRIVER("GTT stolen size = %zdM\n", gtt->stolen_size >> 20);
dev_priv->gtt.mappable_end >> 20);
DRM_DEBUG_DRIVER("GTT stolen size = %zdM\n",
dev_priv->gtt.stolen_size >> 20);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment