aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_region_ttm.h
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2022-07-12 18:40:50 +0100
committerRodrigo Vivi <rodrigo.vivi@intel.com>2022-07-17 14:53:47 -0400
commitced7866db39fc5c59ee05e154d4abc0977a17f6b (patch)
treea342da302090d9b73b5ed2db68482b8a1c419874 /drivers/gpu/drm/i915/intel_region_ttm.h
parentdrm/i915/selftests: fix subtraction overflow bug (diff)
downloadlinux-dev-ced7866db39fc5c59ee05e154d4abc0977a17f6b.tar.xz
linux-dev-ced7866db39fc5c59ee05e154d4abc0977a17f6b.zip
drm/i915/ttm: fix 32b build
Since segment_pages is no longer a compile time constant, it looks the DIV_ROUND_UP(node->size, segment_pages) breaks the 32b build. Simplest is just to use the ULL variant, but really we should need not need more than u32 for the page alignment (also we are limited by that due to the sg->length type), so also make it all u32. Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Fixes: aff1e0b09b54 ("drm/i915/ttm: fix sg_table construction") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220712174050.592550-1-matthew.auld@intel.com (cherry picked from commit 9306b2b2dfce6931241ef804783692cee526599c) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/i915/intel_region_ttm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_region_ttm.h b/drivers/gpu/drm/i915/intel_region_ttm.h
index 98fba5155619..5bb8d8b582ae 100644
--- a/drivers/gpu/drm/i915/intel_region_ttm.h
+++ b/drivers/gpu/drm/i915/intel_region_ttm.h
@@ -25,7 +25,7 @@ int intel_region_ttm_fini(struct intel_memory_region *mem);
struct i915_refct_sgt *
intel_region_ttm_resource_to_rsgt(struct intel_memory_region *mem,
struct ttm_resource *res,
- u64 page_alignment);
+ u32 page_alignment);
void intel_region_ttm_resource_free(struct intel_memory_region *mem,
struct ttm_resource *res);