drm/mm: Support 4 GiB and larger ranges
authorThierry Reding <treding@nvidia.com>
Fri, 23 Jan 2015 08:05:06 +0000 (09:05 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Mar 2015 23:01:37 +0000 (09:01 +1000)
commit440fd5283a87345cdd4237bdf45fb01130ea0056
treef41245531ea59406e0499067541a291ef75c1c51
parented9ed50ccc2c16690b921171c809f6f15255ac65
drm/mm: Support 4 GiB and larger ranges

The current implementation is limited by the number of addresses that
fit into an unsigned long. This causes problems on 32-bit Tegra where
unsigned long is 32-bit but drm_mm is used to manage an IOVA space of
4 GiB. Given the 32-bit limitation, the range is limited to 4 GiB - 1
(or 4 GiB - 4 KiB for page granularity).

This commit changes the start and size of the range to be an unsigned
64-bit integer, thus allowing much larger ranges to be supported.

[airlied: fix i915 warnings and coloring callback]

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
fixupo
drivers/gpu/drm/drm_mm.c
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_gem_gtt.c
include/drm/drm_mm.h