drm/xe/bo: Gracefully handle errors from ttm_bo_move_accel_cleanup().
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Mon, 26 Jun 2023 18:17:40 +0000 (20:17 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:35:04 +0000 (11:35 -0500)
commit70ff6a999d7cae52b6b418c3110b6245dde9271c
tree1f5be74fb3b5797357c5888fdb3805d9dbfe576a
parent3439cc46619a3f31780cbd4f820384f9586d5ee1
drm/xe/bo: Gracefully handle errors from ttm_bo_move_accel_cleanup().

The function ttm_bo_move_accel_cleanup() attempts to help pipeline a
move, and in doing so, needs memory allocations which may fail.

Rather than failing in a state where the new resource may freed while
accessed by the copy engine, sync uninterruptible and do a failsafe
cleanup.

v2:
- Don't try to attach the signaled fence on ttm_bo_move_accel_cleanup()
  error.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230626181741.32820-4-thomas.hellstrom@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_bo.c