Re: [PATCH 2/7] drm/i915: do not map aperture if it is not available.

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

 



Quoting Matthew Auld (2019-10-29 09:58:51)
> From: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
> 
> Skip both setup and cleanup of the aperture mapping if the HW doesn't
> have an aperture bar.
> 
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
> Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 31 ++++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index eebc7fee81e2..73dad8c6acc2 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -2770,7 +2770,9 @@ static void ggtt_cleanup_hw(struct i915_ggtt *ggtt)
>         i915_address_space_fini(&ggtt->vm);
>  
>         arch_phys_wc_del(ggtt->mtrr);
> -       io_mapping_fini(&ggtt->iomap);
> +
> +       if (ggtt->iomap.size)
> +               io_mapping_fini(&ggtt->iomap);

Marginally annoying we had not made io_mapping_fini() nop-proof.
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]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux