Commit c92fa4fe authored by Chris Wilson's avatar Chris Wilson Committed by Jani Nikula

drm/i915: Force relocations via cpu if we run out of idle aperture

If we run out of enough aperture space to fit the entire object, we
fallback to trying to insert a single page. However, if that also fails,
we currently fail to userspace with an unexpected ENOSPC. (ENOSPC means
to userspace that their batch could not be fitted within the GTT.) Prior
to commit e8cb909a ("drm/i915: Fallback to single page GTT
mmappings for relocations") the approach is to fallback to using the
slow CPU relocation path in case of iomapping failure, and that is the
behaviour we need to restore.

Fixes: e8cb909a ("drm/i915: Fallback to single page GTT mmappings...")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98101Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161007065327.24515-2-chris@chris-wilson.co.uk
(cherry picked from commit d7f76335)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 9b05a609
...@@ -451,8 +451,8 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj, ...@@ -451,8 +451,8 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj,
0, ggtt->mappable_end, 0, ggtt->mappable_end,
DRM_MM_SEARCH_DEFAULT, DRM_MM_SEARCH_DEFAULT,
DRM_MM_CREATE_DEFAULT); DRM_MM_CREATE_DEFAULT);
if (ret) if (ret) /* no inactive aperture space, use cpu reloc */
return ERR_PTR(ret); return NULL;
} else { } else {
ret = i915_vma_put_fence(vma); ret = i915_vma_put_fence(vma);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment