]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Recreate internal objects with single page segments if dmar fails
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Feb 2017 13:27:21 +0000 (13:27 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 3 Feb 2017 09:55:58 +0000 (09:55 +0000)
commit1cf994074e6074bb30c9c7ec7c9a0b0b81b2274d
tree907e6681629ee8c28ae2b0dcb0f95e19128c35f9
parente2299ae17a93f5442afa05c6fa3fd5a8f6dce2ae
drm/i915: Recreate internal objects with single page segments if dmar fails

If we fail to dma-map the object, the most common cause is lack of space
inside the SW-IOTLB due to fragmentation. If we recreate the_sg_table
using segments of PAGE_SIZE (and single page allocations), we may succeed
in remapping the scatterlist.

First became a significant problem for the mock selftests after commit
0cd542ca1b06 ("drm/i915: fix i915 running as dom0 under Xen") increased
the max_order.

Fixes: 5d7786860de0 ("drm/i915: Introduce an internal allocator for disposable private objects")
Fixes: 0cd542ca1b06 ("drm/i915: fix i915 running as dom0 under Xen")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170202132721.12711-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
drivers/gpu/drm/i915/i915_gem_internal.c