* [PATCH 1/2] drm/i915/selftests: Do not overwrite error code after intel_context_migrate_clear() call
@ 2025-07-29 10:17 Krzysztof Karas
2025-07-29 10:39 ` Sebastian Brzezinka
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Karas @ 2025-07-29 10:17 UTC (permalink / raw)
To: intel-gfx
Cc: Matthew Auld, Andi Shyti, Sebastian Brzezinka, Krzysztof Niemiec
Currently this function's error code is stored in err variable,
which, if a i915_request is present, will be immediately
overwritten by return from dma_resv_reserve_fences(). Call DMA
functions only if intel_context_migrate_clear() succeeded.
Suggested-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
index 9c3f17e51885..c94b71a963b2 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
@@ -1228,7 +1228,7 @@ static int __igt_mmap_migrate(struct intel_memory_region **placements,
i915_gem_object_is_lmem(obj),
expand32(POISON_INUSE), &rq);
i915_gem_object_unpin_pages(obj);
- if (rq) {
+ if (rq && !err) {
err = dma_resv_reserve_fences(obj->base.resv, 1);
if (!err)
dma_resv_add_fence(obj->base.resv, &rq->fence,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/2] drm/i915/selftests: Do not overwrite error code after intel_context_migrate_clear() call
2025-07-29 10:17 [PATCH 1/2] drm/i915/selftests: Do not overwrite error code after intel_context_migrate_clear() call Krzysztof Karas
@ 2025-07-29 10:39 ` Sebastian Brzezinka
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Brzezinka @ 2025-07-29 10:39 UTC (permalink / raw)
To: Krzysztof Karas, intel-gfx; +Cc: Matthew Auld, Andi Shyti, Krzysztof Niemiec
Hi Krzysztof
On Tue Jul 29, 2025 at 10:17 AM UTC, Krzysztof Karas wrote:
> Currently this function's error code is stored in err variable,
> which, if a i915_request is present, will be immediately
Just a small nit, I think 'an i915_request' is the right form.
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
--
Best regards,
Sebastian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-29 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29 10:17 [PATCH 1/2] drm/i915/selftests: Do not overwrite error code after intel_context_migrate_clear() call Krzysztof Karas
2025-07-29 10:39 ` Sebastian Brzezinka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.