summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorRamalingam C <ramalingam.c@intel.com>2022-04-05 20:38:35 +0530
committerRamalingam C <ramalingam.c@intel.com>2022-04-14 13:20:18 +0530
commit310bf25df2fcccc1d91f96928adb66bdc26613b5 (patch)
treeb99ffcc739d43f661b1edd8552d155a9e91a4175 /drivers/gpu/drm/i915
parent6e6bc8c0a81576839d1dbebbfd0a534949cb0d11 (diff)
downloadlinux-310bf25df2fcccc1d91f96928adb66bdc26613b5.tar.bz2
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: 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
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_migrate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index e0f1c727662e..6378d4450e1a 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -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;
}