]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Allow compaction upto SWIOTLB max segment size
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Oct 2016 08:20:21 +0000 (09:20 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Oct 2016 09:15:01 +0000 (10:15 +0100)
commit3da9aad80994af4e8997e68c8337b62df0bfa75a
tree277f8c6c782b4785118d2facc50cb0199d763aea
parentc94b0897f4b900b2280d6a79fb5bbc45181ca537
drm/i915: Allow compaction upto SWIOTLB max segment size

commit df380c265a27 ("drm/i915: make compact dma scatter lists creation
work with SWIOTLB backend") took a heavy handed approach to undo the
scatterlist compaction in the face of SWIOTLB. (The compaction hit a bug
whereby we tried to pass a segment larger than SWIOTLB could handle.) We
can be a little more intelligent and try compacting the scatterlist up
to the maximum SWIOTLB segment size (when using SWIOTLB).

v2: Tidy sg_mark_end() and cpp

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
CC: Imre Deak <imre.deak@intel.com>
CC: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161011082021.14606-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c