]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Jan 2018 16:38:42 +0000 (16:38 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Jan 2018 18:48:53 +0000 (18:48 +0000)
commitf8b017bf1b7de04afa1ba45f260801713c4c1286
treed8689efeb51272ef206f1d53b95476336c435c33
parent327a455121e562451625dd451fe8b24145f8fd35
drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()

In some iommu, e.g. swiotlb, the available space can be quite limited.
So we employ a trial-and-error approach to seeing if our large
contiguous chunks can fit, and if that fails we try again with smaller
chunks after trying to free our own lazily allocated blobs. As we use a
trial-and-error approach, we do not want dma_map_sg() to emit a WARN of
its own accord, we want to gracefully report the error back to the caller
instead.

Note that our noisy culprit, swiotlb, doesn't honour the flag, yet.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180104163842.11635-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c