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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm planning on using it later for AubCrash.

Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>
Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux