[Intel-gfx] [PATCH v4 5/8] drm/i915/dg1: Reserve first 1MB of local memory

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 27 12:59:57 UTC 2021


Quoting Matthew Auld (2021-01-27 12:48:06)
>  static struct intel_memory_region *setup_lmem(struct intel_gt *gt)
>  {
>         struct drm_i915_private *i915 = gt->i915;
> @@ -167,6 +202,16 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)
>                                          I915_GTT_PAGE_SIZE_4K,
>                                          io_start,
>                                          &intel_region_lmem_ops);
> +       if (!IS_ERR(mem)) {
> +               int err;
> +
> +               err = reserve_lowmem_region(uncore, mem);
> +               if (err) {
> +                       intel_memory_region_put(mem);
> +                       return ERR_PTR(err);

Just a worry here, are we likely to antagonise Joonas by having multiple
error paths?
-Chris


More information about the Intel-gfx mailing list