Re: [PATCH 9/9] 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-11-24 21:29:30)
> 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>
> ---
> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
> index 2b7af60dfce0..fca56ec9913d 100644
> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> @@ -76,10 +76,10 @@ void i915_gem_stolen_remove_node(struct drm_i915_private *dev_priv,
>         mutex_unlock(&dev_priv->mm.stolen_lock);
>  }
>  
> -static dma_addr_t i915_stolen_to_dma(struct drm_i915_private *dev_priv)
> +static resource_size_t i915_stolen_to_dma(struct drm_i915_private *dev_priv)
>  {
>         struct i915_ggtt *ggtt = &dev_priv->ggtt;
> -       dma_addr_t base = intel_graphics_stolen_res.start;
> +       resource_size_t base = intel_graphics_stolen_res.start;
>         struct resource *r;
>  
>         if (base == 0 || add_overflows(base, ggtt->stolen_size))

It's no longer to_dma anymore. The point of the function was to pretend
phys_addr_t was magically transformed into dma_addr_t.

We should now be at the point where this is just
	return intel_graphics_stolen_res;
-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