aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-06-27 19:30:23 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-01 05:28:01 -0400
commit911bdf0ae6405db3313c6e5798cf08640fdd0714 (patch)
tree0e0e782830027c6211680392d397e042e9134b12 /drivers/gpu
parent5c3fe8b03ea6eb61617edb390d51c08609a495f7 (diff)
drm/i915: Move gtt_mtrr to i915_gtt
for file in `ls drivers/gpu/drm/i915/*.c` ; do sed -i "s/mm.gtt_mtrr/gtt.mtrr/" $file; done Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c8
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index adb319b53ecd..0e2214236083 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1558,8 +1558,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1558 goto out_rmmap; 1558 goto out_rmmap;
1559 } 1559 }
1560 1560
1561 dev_priv->mm.gtt_mtrr = arch_phys_wc_add(dev_priv->gtt.mappable_base, 1561 dev_priv->gtt.mtrr = arch_phys_wc_add(dev_priv->gtt.mappable_base,
1562 aperture_size); 1562 aperture_size);
1563 1563
1564 /* The i915 workqueue is primarily used for batched retirement of 1564 /* The i915 workqueue is primarily used for batched retirement of
1565 * requests (and thus managing bo) once the task has been completed 1565 * requests (and thus managing bo) once the task has been completed
@@ -1667,7 +1667,7 @@ out_gem_unload:
1667 intel_teardown_mchbar(dev); 1667 intel_teardown_mchbar(dev);
1668 destroy_workqueue(dev_priv->wq); 1668 destroy_workqueue(dev_priv->wq);
1669out_mtrrfree: 1669out_mtrrfree:
1670 arch_phys_wc_del(dev_priv->mm.gtt_mtrr); 1670 arch_phys_wc_del(dev_priv->gtt.mtrr);
1671 io_mapping_free(dev_priv->gtt.mappable); 1671 io_mapping_free(dev_priv->gtt.mappable);
1672 dev_priv->gtt.gtt_remove(dev); 1672 dev_priv->gtt.gtt_remove(dev);
1673out_rmmap: 1673out_rmmap:
@@ -1705,7 +1705,7 @@ int i915_driver_unload(struct drm_device *dev)
1705 cancel_delayed_work_sync(&dev_priv->mm.retire_work); 1705 cancel_delayed_work_sync(&dev_priv->mm.retire_work);
1706 1706
1707 io_mapping_free(dev_priv->gtt.mappable); 1707 io_mapping_free(dev_priv->gtt.mappable);
1708 arch_phys_wc_del(dev_priv->mm.gtt_mtrr); 1708 arch_phys_wc_del(dev_priv->gtt.mtrr);
1709 1709
1710 acpi_video_unregister(); 1710 acpi_video_unregister();
1711 1711
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d1db73a5ba0c..da07f6f28854 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -470,6 +470,8 @@ struct i915_gtt {
470 struct page *page; 470 struct page *page;
471 } scratch; 471 } scratch;
472 472
473 int mtrr;
474
473 /* global gtt ops */ 475 /* global gtt ops */
474 int (*gtt_probe)(struct drm_device *dev, size_t *gtt_total, 476 int (*gtt_probe)(struct drm_device *dev, size_t *gtt_total,
475 size_t *stolen, phys_addr_t *mappable_base, 477 size_t *stolen, phys_addr_t *mappable_base,
@@ -834,8 +836,6 @@ struct i915_gem_mm {
834 /** Usable portion of the GTT for GEM */ 836 /** Usable portion of the GTT for GEM */
835 unsigned long stolen_base; /* limited to low memory (32-bit) */ 837 unsigned long stolen_base; /* limited to low memory (32-bit) */
836 838
837 int gtt_mtrr;
838
839 /** PPGTT used for aliasing the PPGTT with the GTT */ 839 /** PPGTT used for aliasing the PPGTT with the GTT */
840 struct i915_hw_ppgtt *aliasing_ppgtt; 840 struct i915_hw_ppgtt *aliasing_ppgtt;
841 841