Commit 42953b3c authored by Chris Wilson's avatar Chris Wilson

drm/i915/userptr: Deactivate a failed userptr if the worker reports an EFAULT

If the worker fails, it no longer has pages to release and can be
immediately removed from the invalidate-tree.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307205851.32578-1-chris@chris-wilson.co.ukReviewed-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
parent 86b04268
...@@ -541,6 +541,8 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work) ...@@ -541,6 +541,8 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work)
} }
obj->userptr.work = ERR_CAST(pages); obj->userptr.work = ERR_CAST(pages);
if (IS_ERR(pages))
__i915_gem_userptr_set_active(obj, false);
} }
mutex_unlock(&obj->mm.lock); mutex_unlock(&obj->mm.lock);
......
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