[Intel-gfx] [PATCH 7/9] drm/i915: make reserved struct resource centric
Chris Wilson
chris at chris-wilson.co.uk
Fri Nov 24 22:19:37 UTC 2017
Quoting Matthew Auld (2017-11-24 21:29:28)
Always have a small explanation here.
"Now that we are using struct resource to track the stolen region, it is
more convenient if we track the reserved portion of that region in a
resource as well."
> v2: s/<= end + 1/< end/ (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>
> ---
> @@ -400,17 +401,16 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv)
> reserved_base = stolen_top;
> }
>
> - if (reserved_base < dev_priv->dsm.start ||
> - reserved_base + reserved_size > stolen_top) {
> - dma_addr_t reserved_top = reserved_base + reserved_size;
> - DRM_ERROR("Stolen reserved area [%pad - %pad] outside stolen memory [%pad - %pad]\n",
> - &reserved_base, &reserved_top,
> - &dev_priv->dsm.start, &stolen_top);
> + reserved.start = reserved_base;
> + reserved.end = reserved_base + reserved_size - 1;
Not just
dev_priv->dsm_reserved = DEFINE_RES_MEM(reserved_base, reserved_size);
?
-Chris
More information about the Intel-gfx
mailing list