Quoting Matthew Auld (2019-10-29 09:58:51) > From: Daniele Ceraolo Spurio <[email protected]> > > Skip both setup and cleanup of the aperture mapping if the HW doesn't > have an aperture bar. > > Signed-off-by: Daniele Ceraolo Spurio <[email protected]> > Signed-off-by: Matthew Auld <[email protected]> > --- > 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 <[email protected]> -Chris _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
