projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e6bc8c
)
drm/i915/gt: Pass the -EINVAL when emit_pte doesn't update any PTE
author
Ramalingam C
<ramalingam.c@intel.com>
Tue, 5 Apr 2022 15:08:35 +0000
(20:38 +0530)
committer
Ramalingam C
<ramalingam.c@intel.com>
Thu, 14 Apr 2022 07:50:18 +0000
(13:20 +0530)
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
drivers/gpu/drm/i915/gt/intel_migrate.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/gt/intel_migrate.c
b/drivers/gpu/drm/i915/gt/intel_migrate.c
index e0f1c727662e5abff73739e453429932072ac20e..6378d4450e1ae5c7ec7409047c2e6b6892525bbb 100644
(file)
--- 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;
}