diff mbox

[RFC,03/12] drm/i915: Store the GGTT Stolen Memory base physical address

Message ID 1509127275-22121-4-git-send-email-oscar.mateo@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

oscar.mateo@intel.com Oct. 27, 2017, 6:01 p.m. UTC
I'm planning on using it later for AubCrash.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Chris Wilson <chris@chris-wsilon.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 1 +
 drivers/gpu/drm/i915/i915_gem_gtt.h | 1 +
 2 files changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 5eaa689..c5b5892 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2974,6 +2974,7 @@  static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)
 
 	/* For Modern GENs the PTEs and register space are split in the BAR */
 	phys_addr = pci_resource_start(pdev, 0) + pci_resource_len(pdev, 0) / 2;
+	ggtt->gsm_paddr = phys_addr;
 
 	/*
 	 * On BXT+/CNL+ writes larger than 64 bit to the GTT pagetable range
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index 717bbd6..c64fce1 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -388,6 +388,7 @@  struct i915_ggtt {
 	u32 stolen_reserved_size;
 
 	/** "Graphics Stolen Memory" holds the global PTEs */
+	phys_addr_t gsm_paddr;
 	void __iomem *gsm;
 	void (*invalidate)(struct drm_i915_private *dev_priv);