提交 c2a6502f 编写于 作者: N Nirmoy Das 提交者: Matthew Auld

drm/i915/ttm: Abort suspend on i915_ttm_backup failure

On system suspend when system memory is low then i915_gem_obj_copy_ttm()
could fail trying to backup a lmem obj. GEM_WARN_ON() is not enough,
suspend shouldn't continue if i915_ttm_backup() throws an error.

v2: Keep the fdo issue till we have a igt test(Matt).
v3: Use %pe(Andrzej)

References: https://gitlab.freedesktop.org/drm/intel/-/issues/6529Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
Reviewed-by: NAndrzej Hajda <andrzej.hajda@intel.com>
Suggested-by: NChris P Wilson <chris.p.wilson@intel.com>
Signed-off-by: NNirmoy Das <nirmoy.das@intel.com>
Signed-off-by: NMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220901172217.18392-1-nirmoy.das@intel.com
上级 018a7bdb
......@@ -79,7 +79,12 @@ static int i915_ttm_backup(struct i915_gem_apply_to_region *apply,
goto out_no_populate;
err = i915_gem_obj_copy_ttm(backup, obj, pm_apply->allow_gpu, false);
GEM_WARN_ON(err);
if (err) {
drm_err(&i915->drm,
"Unable to copy from device to system memory, err:%pe\n",
ERR_PTR(err));
goto out_no_populate;
}
ttm_bo_wait_ctx(backup_bo, &ctx);
obj->ttm.backup = backup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册