All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 22/34] drm/i915: Move gtt_mtrr to i915_gtt
Date: Sat, 25 May 2013 12:26:56 -0700	[thread overview]
Message-ID: <1369510028-3343-23-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1369510028-3343-1-git-send-email-ben@bwidawsk.net>

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>
---
 drivers/gpu/drm/i915/i915_dma.c | 18 +++++++++---------
 drivers/gpu/drm/i915/i915_drv.h |  4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 9745fe0..c823e1c 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1402,7 +1402,7 @@ static void
 i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
 		unsigned long size)
 {
-	dev_priv->mm.gtt_mtrr = -1;
+	dev_priv->gtt.mtrr = -1;
 
 #if defined(CONFIG_X86_PAT)
 	if (cpu_has_pat)
@@ -1414,8 +1414,8 @@ i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
 	 * generation Core chips because WC PAT gets overridden by a UC
 	 * MTRR if present.  Even if a UC MTRR isn't present.
 	 */
-	dev_priv->mm.gtt_mtrr = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
-	if (dev_priv->mm.gtt_mtrr < 0) {
+	dev_priv->gtt.mtrr = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
+	if (dev_priv->gtt.mtrr < 0) {
 		DRM_INFO("MTRR allocation failed.  Graphics "
 			 "performance may suffer.\n");
 	}
@@ -1685,11 +1685,11 @@ out_gem_unload:
 	intel_teardown_mchbar(dev);
 	destroy_workqueue(dev_priv->wq);
 out_mtrrfree:
-	if (dev_priv->mm.gtt_mtrr >= 0) {
-		mtrr_del(dev_priv->mm.gtt_mtrr,
+	if (dev_priv->gtt.mtrr >= 0) {
+		mtrr_del(dev_priv->gtt.mtrr,
 			 dev_priv->gtt.mappable_base,
 			 aperture_size);
-		dev_priv->mm.gtt_mtrr = -1;
+		dev_priv->gtt.mtrr = -1;
 	}
 	io_mapping_free(dev_priv->gtt.mappable);
 	dev_priv->gtt.gtt_remove(dev);
@@ -1725,11 +1725,11 @@ int i915_driver_unload(struct drm_device *dev)
 	cancel_delayed_work_sync(&dev_priv->mm.retire_work);
 
 	io_mapping_free(dev_priv->gtt.mappable);
-	if (dev_priv->mm.gtt_mtrr >= 0) {
-		mtrr_del(dev_priv->mm.gtt_mtrr,
+	if (dev_priv->gtt.mtrr >= 0) {
+		mtrr_del(dev_priv->gtt.mtrr,
 			 dev_priv->gtt.mappable_base,
 			 dev_priv->gtt.mappable_end);
-		dev_priv->mm.gtt_mtrr = -1;
+		dev_priv->gtt.mtrr = -1;
 	}
 
 	acpi_video_unregister();
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 4261258..ae10e28 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -445,6 +445,8 @@ struct i915_gtt {
 		struct page *page;
 	} scratch;
 
+	int mtrr;
+
 	/* global gtt ops */
 	int (*gtt_probe)(struct drm_device *dev, size_t *gtt_total,
 			  size_t *stolen, phys_addr_t *mappable_base,
@@ -785,8 +787,6 @@ struct i915_gem_mm {
 	/** Usable portion of the GTT for GEM */
 	unsigned long stolen_base; /* limited to low memory (32-bit) */
 
-	int gtt_mtrr;
-
 	/** PPGTT used for aliasing the PPGTT with the GTT */
 	struct i915_hw_ppgtt *aliasing_ppgtt;
 
-- 
1.8.2.3

  parent reply	other threads:[~2013-05-25 19:24 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25 19:26 [PATCH 00/34] PPGTT prep part 2 (and unmerged part 1) Ben Widawsky
2013-05-25 19:26 ` [PATCH 01/34] drm/i915: pre-fixes for checkpatch Ben Widawsky
2013-05-25 19:26 ` [PATCH 02/34] drm/i915: use mappable size for fb kickout Ben Widawsky
2013-05-25 19:26 ` [PATCH 03/34] drm/i915: use drm_mm_takedown Ben Widawsky
2013-05-25 19:26 ` [PATCH 04/34] drm/i915: context debug messages Ben Widawsky
2013-05-25 19:26 ` [PATCH 05/34] drm/i915: Call context fini at cleanup Ben Widawsky
2013-05-26 13:27   ` Daniel Vetter
2013-05-25 19:26 ` [PATCH 06/34] drm/i915: make PDE|PTE platform specific Ben Widawsky
2013-05-25 19:26 ` [PATCH 07/34] drm: Optionally create mm blocks from top-to-bottom Ben Widawsky
2013-05-25 19:26 ` [PATCH 08/34] drm/i915: Use drm_mm for PPGTT PDEs Ben Widawsky
2013-05-25 19:26 ` [PATCH 09/34] drm/i915: Use PDEs as the guard page Ben Widawsky
2013-05-25 19:26 ` [PATCH 10/34] drm/i915: cleanup context fini Ben Widawsky
2013-05-25 19:26 ` [PATCH 11/34] drm/i915: Do a fuller init after reset Ben Widawsky
2013-05-25 19:26 ` [PATCH 12/34] drm/i915: Split context enabling from init Ben Widawsky
2013-05-26  1:41   ` [PATCH v3 " Ben Widawsky
2013-05-25 19:26 ` [PATCH 13/34] drm/i915: destroy i915_gem_init_global_gtt Ben Widawsky
2013-05-25 19:26 ` [PATCH 14/34] drm/i915: Embed PPGTT into the context Ben Widawsky
2013-05-25 19:26 ` [PATCH 15/34] drm/i915: Tie context to PPGTT Ben Widawsky
2013-05-29  5:32   ` [PATCH 14.5/34] drm/i915: Unify PPGTT codepaths on gen6+ Ben Widawsky
2013-05-25 19:26 ` [PATCH 16/34] drm/i915: Really share scratch page Ben Widawsky
2013-05-25 19:26 ` [PATCH 17/34] drm/i915: Combine scratch members into a struct Ben Widawsky
2013-05-25 19:26 ` [PATCH 18/34] drm/i915: Drop dev from pte_encode Ben Widawsky
2013-05-25 20:14   ` Kenneth Graunke
2013-05-25 19:26 ` [PATCH 19/34] drm/i915: Use gtt shortform where possible Ben Widawsky
2013-05-25 19:26 ` [PATCH 20/34] drm/i915: Move fbc members out of line Ben Widawsky
2013-05-25 19:26 ` [PATCH 21/34] drm/i915: Move gtt and ppgtt under address space umbrella Ben Widawsky
2013-05-25 19:26 ` Ben Widawsky [this message]
2013-05-25 19:26 ` [PATCH 23/34] drm/i915: Move stolen stuff to i915_gtt Ben Widawsky
2013-05-25 19:26 ` [PATCH 24/34] drm/i915: Move aliasing_ppgtt Ben Widawsky
2013-05-25 19:26 ` [PATCH 25/34] drm/i915: Put the mm in the parent address space Ben Widawsky
2013-05-25 19:27 ` [PATCH 26/34] drm/i915: Move object tracking lists to new mm Ben Widawsky
2013-05-25 19:27 ` [PATCH 27/34] drm/i915: Create a global list of vms Ben Widawsky
2013-05-26 17:19   ` Ben Widawsky
2013-05-25 19:27 ` [PATCH 28/34] drm/i915: Start using vm lists Ben Widawsky
2013-05-25 19:27 ` [PATCH 29/34] drm/i915: Remove object's gtt_offset Ben Widawsky
2013-05-25 19:27 ` [PATCH 30/34] drm: pre allocate node for create_block Ben Widawsky
2013-05-25 19:27 ` [PATCH 31/34] drm/i915: Getter/setter for object attributes Ben Widawsky
2013-05-25 19:27 ` [PATCH 32/34] drm/i915: Create VMAs (part 1) Ben Widawsky
2013-05-25 19:27 ` [PATCH 33/34] drm/i915: Create VMAs (part 2) Ben Widawsky
2013-05-25 19:27 ` [PATCH 34/34] drm/i915: Create VMAs (part 3) Ben Widawsky
2013-05-27  7:31   ` Chris Wilson
2013-05-27  8:59     ` Daniel Vetter
2013-06-04 21:49 ` [PATCH 00/34] PPGTT prep part 2 (and unmerged part 1) Ben Widawsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369510028-3343-23-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.