[Intel-gfx] [RFC PATCH 03/12] drm/i915: Store the GGTT Stolen Memory base physical address
Oscar Mateo
oscar.mateo at intel.com
Fri Oct 27 18:01:06 UTC 2017
I'm planning on using it later for AubCrash.
Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
Cc: Mika Kuoppala <mika.kuoppala at intel.com>
Cc: Chris Wilson <chris at 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 --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);
--
1.9.1
More information about the Intel-gfx
mailing list