Alex Dai and Chris Wilson have both recently posted patches to rationalise the use of vmap() for mapping GEM objects into kernel virtual space. However, they addressed different areas, with Alex's patch being derived from the copy_batch() code, whereas Chris' patch refactored the dma-buf and ringbuffer code. So this patchset unifies the two, copying Chris' interfaces which unite pin-and-vmap for convenient lifecycle management, but using Alex's code underneath to permit partial mappings. And finally there's a little optimisation I've added for "small" objects e.g. ringbuffers and contexts, which are expected to be the objects most commonly handled by this code. Signed-off-by: Dave Gordon <david.s.gordon@xxxxxxxxx> Cc: Alex Dai <yu.dai@xxxxxxxxx> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> Alex Dai (1): drm/i915: add i915_gem_object_vmap_range() to map GEM object to virtual space Dave Gordon (2): drm/i915: refactor duplicate object vmap functions (reworked) drm/i915: optimise i915_gem_object_vmap_range() for small objects drivers/gpu/drm/i915/i915_cmd_parser.c | 28 +--------- drivers/gpu/drm/i915/i915_drv.h | 15 ++++-- drivers/gpu/drm/i915/i915_gem.c | 94 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_dmabuf.c | 53 +++---------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 52 ++++++------------ 5 files changed, 128 insertions(+), 114 deletions(-) -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx