Skip to content

Commit

Permalink
drm/i915/gt: Pass the -EINVAL when emit_pte doesn't update any PTE
Browse files Browse the repository at this point in the history
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: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220405150840.29351-5-ramalingam.c@intel.com
  • Loading branch information
Ramalingam C committed Apr 14, 2022
1 parent 6e6bc8c commit 310bf25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/i915/gt/intel_migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,11 @@ intel_context_migrate_copy(struct intel_context *ce,

len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem,
src_offset, CHUNK_SZ);
if (len <= 0) {
if (!len) {
err = -EINVAL;
goto out_rq;
}
if (len < 0) {
err = len;
goto out_rq;
}
Expand Down

0 comments on commit 310bf25

Please sign in to comment.