public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: stolen_reserved_base is also dma_addr_t
@ 2017-09-26 19:29 Paulo Zanoni
  2017-09-26 19:29 ` [PATCH 2/2] drm/i915: use size_t instead of u32 for stolen memory size variables Paulo Zanoni
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Paulo Zanoni @ 2017-09-26 19:29 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

The chunk added by this patch was missed by these commits:
* 920bcd1820a6 ("drm/i915: make i915_stolen_to_physical() return phys_addr_t")
* c88473878d47 ("drm/i915: Treat stolen memory as DMA addresses")

The stolen_reserved_base variable contains a memory address for stolen
memory and our code uses dma_addr_t for pointers to stolen, so it
makes sense to make it also be dma_addr_t. Notice that the local
variable inside i915_gem_init_stolen() that stores this pointer is
even already dma_addr_t.

This change essentially converts the size to 64 bits where applicable,
making sure things work in case we ever get crazy enough to put stolen
that far in memory.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index f62fb90..dd2ef5b 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -365,7 +365,7 @@ struct i915_ggtt {
 	 */
 	u32 stolen_size;		/* Total size of stolen memory */
 	u32 stolen_usable_size;	/* Total size minus reserved ranges */
-	u32 stolen_reserved_base;
+	dma_addr_t stolen_reserved_base;
 	u32 stolen_reserved_size;
 
 	/** "Graphics Stolen Memory" holds the global PTEs */
-- 
2.9.5

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-29 13:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 19:29 [PATCH 1/2] drm/i915: stolen_reserved_base is also dma_addr_t Paulo Zanoni
2017-09-26 19:29 ` [PATCH 2/2] drm/i915: use size_t instead of u32 for stolen memory size variables Paulo Zanoni
2017-09-26 20:11   ` Chris Wilson
2017-09-26 20:13   ` Chris Wilson
2017-09-29  9:23     ` Joonas Lahtinen
2017-09-29  9:40       ` Chris Wilson
2017-09-29 13:11         ` Joonas Lahtinen
2017-09-26 20:01 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: stolen_reserved_base is also dma_addr_t Patchwork
2017-09-26 20:10 ` [PATCH 1/2] " Chris Wilson
2017-09-27  5:29 ` ✗ Fi.CI.IGT: failure for series starting with [1/2] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox