mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-06 02:24:14 +08:00
drm/i915/ttm: Return some errors instead of trying memcpy move
The i915_ttm_accel_move() function may return error codes that should
be propagated further up the stack rather than consumed assuming that
the accel move failed and could be replaced with a memcpy move.
For -EINTR, -ERESTARTSYS and -EAGAIN, just propagate those codes, rather
than retrying with a memcpy move.
Fixes: 2b0a750caf
("drm/i915/ttm: Failsafe migration blits")
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220201070340.16457-1-thomas.hellstrom@linux.intel.com
This commit is contained in:
parent
ef6e871af3
commit
29b9702ffe
@ -436,11 +436,17 @@ __i915_ttm_move(struct ttm_buffer_object *bo,
|
|||||||
|
|
||||||
if (!IS_ERR(fence))
|
if (!IS_ERR(fence))
|
||||||
goto out;
|
goto out;
|
||||||
} else if (move_deps) {
|
} else {
|
||||||
int err = i915_deps_sync(move_deps, ctx);
|
int err = PTR_ERR(fence);
|
||||||
|
|
||||||
if (err)
|
if (err == -EINTR || err == -ERESTARTSYS || err == -EAGAIN)
|
||||||
return ERR_PTR(err);
|
return fence;
|
||||||
|
|
||||||
|
if (move_deps) {
|
||||||
|
err = i915_deps_sync(move_deps, ctx);
|
||||||
|
if (err)
|
||||||
|
return ERR_PTR(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Error intercept failed or no accelerated migration to start with */
|
/* Error intercept failed or no accelerated migration to start with */
|
||||||
|
Loading…
Reference in New Issue
Block a user