summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem_gtt.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-01-06 15:20:11 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-01-06 16:02:09 +0000
commitedd1f2fe11ff77ab2a3169b9359e2ba69541a2f2 (patch)
tree80ff829dfb8f32a6f5056011782823b5a8b1c3df /drivers/gpu/drm/i915/i915_gem_gtt.h
parent46fad808b1b73c3f7c0b88016dcc6fb4cd549b27 (diff)
drm/i915: Use fixed-sized types for stolen
Stolen memory is a hardware resource of known size, so use an accurate fixed integer type rather than the ambiguous variable size_t. This was motivated by the next patch spotting inconsistencies in our types. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170106152013.24684-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.h')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index 0055b8567a43..9e91d7e6149c 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -315,6 +315,9 @@ struct i915_ggtt {
struct i915_address_space base;
struct io_mapping mappable; /* Mapping to our CPU mappable region */
+ phys_addr_t mappable_base; /* PA of our GMADR */
+ u64 mappable_end; /* End offset that we can CPU map */
+
/* Stolen memory is segmented in hardware with different portions
* offlimits to certain functions.
*
@@ -323,12 +326,10 @@ struct i915_ggtt {
* avoid the first page! The upper end of stolen memory is reserved for
* hardware functions and similarly removed from the accessible range.
*/
- size_t stolen_size; /* Total size of stolen memory */
- size_t stolen_usable_size; /* Total size minus reserved ranges */
- size_t stolen_reserved_base;
- size_t stolen_reserved_size;
- u64 mappable_end; /* End offset that we can CPU map */
- phys_addr_t mappable_base; /* PA of our GMADR */
+ u32 stolen_size; /* Total size of stolen memory */
+ u32 stolen_usable_size; /* Total size minus reserved ranges */
+ u32 stolen_reserved_base;
+ u32 stolen_reserved_size;
/** "Graphics Stolen Memory" holds the global PTEs */
void __iomem *gsm;