[Intel-gfx] [PATCH 09/10] drm/i915: prefer resource_size_t for everything stolen
Chris Wilson
chris at chris-wilson.co.uk
Wed Dec 6 18:39:52 UTC 2017
Quoting Matthew Auld (2017-12-06 18:17:29)
> Keeps things consistent now that we make use of struct resource. This
> should keep us covered in case we ever get huge amounts of stolen
> memory.
>
> v2: bunch of missing conversions (Chris)
>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
> @@ -3464,7 +3464,7 @@ int i915_ggtt_probe_hw(struct drm_i915_private *dev_priv)
> */
> if (USES_GUC(dev_priv)) {
> ggtt->base.total = min_t(u64, ggtt->base.total, GUC_GGTT_TOP);
> - ggtt->mappable_end = min(ggtt->mappable_end, ggtt->base.total);
> + ggtt->mappable_end = min_t(u64, ggtt->mappable_end, ggtt->base.total);
> }
>
> if ((ggtt->base.total - 1) >> 32) {
> @@ -3472,13 +3472,13 @@ int i915_ggtt_probe_hw(struct drm_i915_private *dev_priv)
> " of address space! Found %lldM!\n",
> ggtt->base.total >> 20);
> ggtt->base.total = 1ULL << 32;
> - ggtt->mappable_end = min(ggtt->mappable_end, ggtt->base.total);
> + ggtt->mappable_end = min_t(u64, ggtt->mappable_end, ggtt->base.total);
> }
Hmm. Not pretty, but I have no better alternative (other than plain old
if()).
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list