[Intel-gfx] [PATCH] drm/i915/display: Fix initial fb to use resource_size_t

Chris Wilson chris at chris-wilson.co.uk
Tue Jul 7 17:15:17 UTC 2020


We lookup up the physical address of the inherited framebuffer, and
presume that is an offset into the stolen memory region. As we are
dealing with physical resources and their addresses, we need to use
resource_size_t and not assume everything fits within a plain u32 [based
on prior assumptions that we were simpling handling offsets into the
GGTT not physical memory].

We made the switch to using resource_size_t for stolen in commit
b7128ef125b4 ("drm/i915: prefer resource_size_t for everything stolen")

Reported-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
References: b7128ef125b4 ("drm/i915: prefer resource_size_t for everything stolen")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index dff7c17f3d2b..6bfe3148f927 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3409,7 +3409,8 @@ initial_plane_vma(struct drm_i915_private *i915,
 {
 	struct drm_i915_gem_object *obj;
 	struct i915_vma *vma;
-	u32 base, size;
+	resource_size_t base;
+	resource_size_t size;
 
 	if (plane_config->size == 0)
 		return NULL;
-- 
2.20.1



More information about the Intel-gfx mailing list