]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/ttm: fix 32b build
authorMatthew Auld <matthew.auld@intel.com>
Tue, 12 Jul 2022 17:40:50 +0000 (18:40 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Sun, 17 Jul 2022 18:53:47 +0000 (14:53 -0400)
commit0c4ee4527a1003f77be1321d4e7cfe105527a37b
treea342da302090d9b73b5ed2db68482b8a1c419874
parent0686e539510cefecc35db71057b0199d3dbc6bb6
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: 369304dfa5f8 ("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>
drivers/gpu/drm/i915/gem/i915_gem_region.c
drivers/gpu/drm/i915/gem/i915_gem_ttm.c
drivers/gpu/drm/i915/i915_scatterlist.c
drivers/gpu/drm/i915/i915_scatterlist.h
drivers/gpu/drm/i915/intel_region_ttm.c
drivers/gpu/drm/i915/intel_region_ttm.h