Commit 310bf25d authored by Ramalingam C's avatar Ramalingam C

drm/i915/gt: Pass the -EINVAL when emit_pte doesn't update any PTE

When emit_pte doesn't update any PTE with return value as 0, interpret
it as -EINVAL.

v2:
  Add missing goto [Thomas]
Signed-off-by: default avatarRamalingam C <ramalingam.c@intel.com>
Reviewed-by: default avatarThomas Hellstrom <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220405150840.29351-5-ramalingam.c@intel.com
parent 6e6bc8c0
...@@ -577,7 +577,11 @@ intel_context_migrate_copy(struct intel_context *ce, ...@@ -577,7 +577,11 @@ intel_context_migrate_copy(struct intel_context *ce,
len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem, len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
src_offset, CHUNK_SZ); src_offset, CHUNK_SZ);
if (len <= 0) { if (!len) {
err = -EINVAL;
goto out_rq;
}
if (len < 0) {
err = len; err = len;
goto out_rq; goto out_rq;
} }
......
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