[Intel-gfx] add remap_pfn_range_notrack instead of reinventing it in i915 v2

Daniel Vetter daniel at ffwll.ch
Thu Apr 8 10:36:21 UTC 2021


On Fri, Mar 26, 2021 at 06:55:01AM +0100, Christoph Hellwig wrote:
> Hi all,
> 
> i915 has some reason to want to avoid the track_pfn_remap overhead in
> remap_pfn_range.  Add a function to the core VM to do just that rather
> than reinventing the functionality poorly in the driver.
> 
> Note that the remap_io_sg path does get exercises when using Xorg on my
> Thinkpad X1, so this should be considered lightly tested, I've not
> managed to hit the remap_io_mapping path at all.
> 
> Changes since v1:
>  - create a io_mapping_map_user wrapper instead of exporting
>    remap_pfn_range_notrack
>  - switch to plain remap_pfn_range for remap_sg as it does not use
>    a pre-verified pgprot from an iomap

I'm burried under patches and stuff so no in-depth review. But from a
quick scan lgtm. On the series:

Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>

I've seen it's landed already in some tree, maybe if you can add the acks
ftr?

Cheers, Daniel

> 
> Diffstat:
>  drivers/gpu/drm/i915/Kconfig             |    1 
>  drivers/gpu/drm/i915/gem/i915_gem_mman.c |    9 +-
>  drivers/gpu/drm/i915/i915_drv.h          |    3 
>  drivers/gpu/drm/i915/i915_mm.c           |  117 ++++++-------------------------
>  include/linux/io-mapping.h               |    3 
>  include/linux/mm.h                       |    2 
>  mm/Kconfig                               |    3 
>  mm/Makefile                              |    1 
>  mm/io-mapping.c                          |   29 +++++++
>  mm/memory.c                              |   51 ++++++++-----
>  10 files changed, 97 insertions(+), 122 deletions(-)

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list