]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 15 Mar 2017 15:32:11 +0000 (10:32 -0500)
commitc1329291994af3e9f949553d14fcef43326e31c1
tree0197ee54ecfa9264475a2852b5048fe42069f5aa
parentddb9e7c9eb526f549dd609a4df0054003e9d7af1
drm/i915: Recreate internal objects with single page segments if dmar fails

BugLink: http://bugs.launchpad.net/bugs/1673118
commit 2d2cfc12b1270c8451edc7d2dd5f79097b3a17d8 upstream.

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
5584f1b1d73e ("drm/i915: fix i915 running as dom0 under Xen") increased
the max_order.

Fixes: 920cf4194954 ("drm/i915: Introduce an internal allocator for disposable private objects")
Fixes: 5584f1b1d73e ("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>
(cherry picked from commit bb96dcf5830e5d81a1da2e2a14e6c0f7dfc64348)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpu/drm/i915/i915_gem_internal.c