Re: [PATCH 09/10] drm/i915: prefer resource_size_t for everything stolen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> ---
> @@ -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@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux