]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fallback to single PAGE_SIZE segments for DMA remapping
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Dec 2016 12:43:45 +0000 (12:43 +0000)
committerJani Nikula <jani.nikula@intel.com>
Tue, 20 Dec 2016 14:30:47 +0000 (16:30 +0200)
commita662a0d5085184565362ea63048637bedec9d577
treee6f1bb3c431498b97689930c89df9e513b93fef7
parent7aae1a68012640d164d897323bcea1f577be2890
drm/i915: Fallback to single PAGE_SIZE segments for DMA remapping

If we at first do not succeed with attempting to remap our physical
pages using a coalesced scattergather list, try again with one
scattergather entry per page. This should help with swiotlb as it uses a
limited buffer size and only searches for contiguous chunks within its
buffer aligned up to the next boundary - i.e. we may prematurely cause a
failure as we are unable to utilize the unused space between large
chunks and trigger an error such as:

 i915 0000:00:02.0: swiotlb buffer is full (sz: 1630208 bytes)

Reported-by: Juergen Gross <jgross@suse.com>
Tested-by: Juergen Gross <jgross@suse.com>
Fixes: 3da9aad80994 ("drm/i915: Allow compaction upto SWIOTLB max segment size")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: <drm-intel-fixes@lists.freedesktop.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20161219124346.550-1-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit d766ef53006c2c38a7fe2bef0904105a793383f2)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gem.c