public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers
@ 2026-02-04 23:03 Jonathan Cavitt
  2026-02-04 23:56 ` ✗ i915.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jonathan Cavitt @ 2026-02-04 23:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt, joonas.lahtinen

Static analysis issue:

The current implementations of the eb_relocate_vma and
eb_relocate_vma_slow functions cast the return value of
eb_relocate_entry to a signed long in order to determine if an error has
occurred.  This is because the return value of eb_relocate_entry is a
u64 offset value on a success and a negative error value on a failure.

While not mechanically incorrect, it is improper to perform a cast like
this.  So, just have eb_relocate_entry (and, by extension, its helper
function relocate_entry) return the error value, storing the offset
separately in a passed u64 pointer.

Interestingly, this value is only used for non-error-checking purposes
in the eb_relocate_vma case.  We can simplify the eb_relocate_vma_slow
case by allowing the passed u64 pointer to be NULL because of this.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    | 43 ++++++++++---------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index d49e96f9be51..450482837604 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -1373,11 +1373,12 @@ static void clflush_write32(u32 *addr, u32 value, unsigned int flushes)
 	}
 }
 
-static u64
+static int
 relocate_entry(struct i915_vma *vma,
 	       const struct drm_i915_gem_relocation_entry *reloc,
 	       struct i915_execbuffer *eb,
-	       const struct i915_vma *target)
+	       const struct i915_vma *target,
+	       u64 *pin_offset)
 {
 	u64 target_addr = relocation_target(reloc, target);
 	u64 offset = reloc->offset;
@@ -1402,13 +1403,16 @@ relocate_entry(struct i915_vma *vma,
 		goto repeat;
 	}
 
-	return target->node.start | UPDATE;
+	if (pin_offset)
+		*pin_offset = target->node.start | UPDATE;
+	return 0;
 }
 
-static u64
+static int
 eb_relocate_entry(struct i915_execbuffer *eb,
 		  struct eb_vma *ev,
-		  const struct drm_i915_gem_relocation_entry *reloc)
+		  const struct drm_i915_gem_relocation_entry *reloc,
+		  u64 *offset)
 {
 	struct drm_i915_private *i915 = eb->i915;
 	struct eb_vma *target;
@@ -1505,7 +1509,7 @@ eb_relocate_entry(struct i915_execbuffer *eb,
 	ev->flags &= ~EXEC_OBJECT_ASYNC;
 
 	/* and update the user's relocation entry */
-	return relocate_entry(ev->vma, reloc, eb, target->vma);
+	return relocate_entry(ev->vma, reloc, eb, target->vma, offset);
 }
 
 static int eb_relocate_vma(struct i915_execbuffer *eb, struct eb_vma *ev)
@@ -1516,6 +1520,7 @@ static int eb_relocate_vma(struct i915_execbuffer *eb, struct eb_vma *ev)
 	struct drm_i915_gem_relocation_entry __user *urelocs =
 		u64_to_user_ptr(entry->relocs_ptr);
 	unsigned long remain = entry->relocation_count;
+	int err = 0;
 
 	if (unlikely(remain > N_RELOC(INT_MAX)))
 		return -EINVAL;
@@ -1546,21 +1551,21 @@ static int eb_relocate_vma(struct i915_execbuffer *eb, struct eb_vma *ev)
 		copied = __copy_from_user_inatomic(r, urelocs, count * sizeof(r[0]));
 		pagefault_enable();
 		if (unlikely(copied)) {
-			remain = -EFAULT;
+			err = -EFAULT;
 			goto out;
 		}
 
 		remain -= count;
 		do {
-			u64 offset = eb_relocate_entry(eb, ev, r);
+			u64 offset;
+
+			err = eb_relocate_entry(eb, ev, r, &offset);
 
 			if (likely(offset == 0))
 				continue;
 
-			if ((s64)offset < 0) {
-				remain = (int)offset;
+			if (err)
 				goto out;
-			}
 			/*
 			 * Note that reporting an error now
 			 * leaves everything in an inconsistent
@@ -1589,7 +1594,7 @@ static int eb_relocate_vma(struct i915_execbuffer *eb, struct eb_vma *ev)
 	} while (remain);
 out:
 	reloc_cache_reset(&eb->reloc_cache, eb);
-	return remain;
+	return err;
 }
 
 static int
@@ -1599,18 +1604,14 @@ eb_relocate_vma_slow(struct i915_execbuffer *eb, struct eb_vma *ev)
 	struct drm_i915_gem_relocation_entry *relocs =
 		u64_to_ptr(typeof(*relocs), entry->relocs_ptr);
 	unsigned int i;
-	int err;
+	int err = 0;
 
 	for (i = 0; i < entry->relocation_count; i++) {
-		u64 offset = eb_relocate_entry(eb, ev, &relocs[i]);
-
-		if ((s64)offset < 0) {
-			err = (int)offset;
-			goto err;
-		}
+		err = eb_relocate_entry(eb, ev, &relocs[i], NULL);
+		if (err)
+			break;
 	}
-	err = 0;
-err:
+
 	reloc_cache_reset(&eb->reloc_cache, eb);
 	return err;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✗ i915.CI.BAT: failure for drm/i915/gem: Explicitly return error value from eb_relocate helpers
  2026-02-04 23:03 [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Jonathan Cavitt
@ 2026-02-04 23:56 ` Patchwork
  2026-02-21  0:18 ` ✗ i915.CI.BAT: failure for drm/i915/gem: Explicitly return error value from eb_relocate helpers (rev2) Patchwork
  2026-02-24 16:19 ` [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Krzysztof Karas
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2026-02-04 23:56 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 7857 bytes --]

== Series Details ==

Series: drm/i915/gem: Explicitly return error value from eb_relocate helpers
URL   : https://patchwork.freedesktop.org/series/161167/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_17933 -> Patchwork_161167v1
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_161167v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_161167v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/index.html

Participating hosts (43 -> 41)
------------------------------

  Missing    (2): bat-dg2-13 fi-snb-2520m 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_161167v1:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_gttfill@basic:
    - bat-apl-1:          [PASS][1] -> [ABORT][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-apl-1/igt@gem_exec_gttfill@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-apl-1/igt@gem_exec_gttfill@basic.html
    - fi-bsw-nick:        [PASS][3] -> [ABORT][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-bsw-nick/igt@gem_exec_gttfill@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-bsw-nick/igt@gem_exec_gttfill@basic.html

  * igt@i915_module_load@load:
    - bat-jsl-1:          [PASS][5] -> [FAIL][6] +1 other test fail
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-jsl-1/igt@i915_module_load@load.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-jsl-1/igt@i915_module_load@load.html
    - fi-bsw-n3050:       [PASS][7] -> [FAIL][8] +1 other test fail
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-bsw-n3050/igt@i915_module_load@load.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-bsw-n3050/igt@i915_module_load@load.html
    - fi-kbl-8809g:       [PASS][9] -> [FAIL][10] +1 other test fail
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-kbl-8809g/igt@i915_module_load@load.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-kbl-8809g/igt@i915_module_load@load.html
    - bat-apl-1:          [PASS][11] -> [FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-apl-1/igt@i915_module_load@load.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-apl-1/igt@i915_module_load@load.html
    - fi-tgl-1115g4:      [PASS][13] -> [FAIL][14] +1 other test fail
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-tgl-1115g4/igt@i915_module_load@load.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-tgl-1115g4/igt@i915_module_load@load.html
    - fi-bsw-nick:        [PASS][15] -> [FAIL][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-bsw-nick/igt@i915_module_load@load.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-bsw-nick/igt@i915_module_load@load.html

  * igt@i915_module_load@reload:
    - fi-glk-j4005:       [PASS][17] -> [FAIL][18] +1 other test fail
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-glk-j4005/igt@i915_module_load@reload.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-glk-j4005/igt@i915_module_load@reload.html
    - fi-kbl-7567u:       [PASS][19] -> [FAIL][20] +1 other test fail
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-kbl-7567u/igt@i915_module_load@reload.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-kbl-7567u/igt@i915_module_load@reload.html
    - bat-jsl-5:          [PASS][21] -> [FAIL][22] +1 other test fail
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-jsl-5/igt@i915_module_load@reload.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-jsl-5/igt@i915_module_load@reload.html
    - fi-cfl-guc:         [PASS][23] -> [FAIL][24] +1 other test fail
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-cfl-guc/igt@i915_module_load@reload.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-cfl-guc/igt@i915_module_load@reload.html
    - fi-kbl-x1275:       [PASS][25] -> [FAIL][26] +1 other test fail
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-kbl-x1275/igt@i915_module_load@reload.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-kbl-x1275/igt@i915_module_load@reload.html
    - fi-cfl-8109u:       [PASS][27] -> [FAIL][28] +1 other test fail
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-cfl-8109u/igt@i915_module_load@reload.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-cfl-8109u/igt@i915_module_load@reload.html
    - fi-skl-6600u:       [PASS][29] -> [FAIL][30] +1 other test fail
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-skl-6600u/igt@i915_module_load@reload.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-skl-6600u/igt@i915_module_load@reload.html
    - fi-cfl-8700k:       [PASS][31] -> [FAIL][32] +1 other test fail
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/fi-cfl-8700k/igt@i915_module_load@reload.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/fi-cfl-8700k/igt@i915_module_load@reload.html
    - bat-kbl-2:          [PASS][33] -> [FAIL][34] +1 other test fail
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-kbl-2/igt@i915_module_load@reload.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-kbl-2/igt@i915_module_load@reload.html

  
Known issues
------------

  Here are the changes found in Patchwork_161167v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live:
    - bat-arlh-3:         [PASS][35] -> [INCOMPLETE][36] ([i915#15622])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-arlh-3/igt@i915_selftest@live.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-arlh-3/igt@i915_selftest@live.html

  * igt@i915_selftest@live@memory_region:
    - bat-arlh-3:         [PASS][37] -> [INCOMPLETE][38] ([i915#15630])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-arlh-3/igt@i915_selftest@live@memory_region.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-arlh-3/igt@i915_selftest@live@memory_region.html

  * igt@i915_selftest@live@workarounds:
    - bat-arlh-3:         [PASS][39] -> [DMESG-FAIL][40] ([i915#12061])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17933/bat-arlh-3/igt@i915_selftest@live@workarounds.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/bat-arlh-3/igt@i915_selftest@live@workarounds.html

  
  [i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
  [i915#15622]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15622
  [i915#15630]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15630


Build changes
-------------

  * Linux: CI_DRM_17933 -> Patchwork_161167v1

  CI-20190529: 20190529
  CI_DRM_17933: 55e3e3aeecf80d9fd2536acd8ed785282be5a7b3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_8736: 8736
  Patchwork_161167v1: 55e3e3aeecf80d9fd2536acd8ed785282be5a7b3 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v1/index.html

[-- Attachment #2: Type: text/html, Size: 8671 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* ✗ i915.CI.BAT: failure for drm/i915/gem: Explicitly return error value from eb_relocate helpers (rev2)
  2026-02-04 23:03 [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Jonathan Cavitt
  2026-02-04 23:56 ` ✗ i915.CI.BAT: failure for " Patchwork
@ 2026-02-21  0:18 ` Patchwork
  2026-02-24 16:19 ` [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Krzysztof Karas
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2026-02-21  0:18 UTC (permalink / raw)
  To: Cavitt, Jonathan; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 7806 bytes --]

== Series Details ==

Series: drm/i915/gem: Explicitly return error value from eb_relocate helpers (rev2)
URL   : https://patchwork.freedesktop.org/series/161167/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_18015 -> Patchwork_161167v2
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_161167v2 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_161167v2, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/index.html

Participating hosts (43 -> 40)
------------------------------

  Missing    (3): bat-dg2-13 fi-snb-2520m bat-adls-6 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_161167v2:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_gttfill@basic:
    - bat-apl-1:          [PASS][1] -> [ABORT][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-apl-1/igt@gem_exec_gttfill@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-apl-1/igt@gem_exec_gttfill@basic.html
    - fi-bsw-nick:        [PASS][3] -> [ABORT][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-bsw-nick/igt@gem_exec_gttfill@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-bsw-nick/igt@gem_exec_gttfill@basic.html

  * igt@i915_module_load@load:
    - bat-jsl-1:          [PASS][5] -> [FAIL][6] +1 other test fail
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-jsl-1/igt@i915_module_load@load.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-jsl-1/igt@i915_module_load@load.html
    - fi-bsw-n3050:       [PASS][7] -> [FAIL][8] +1 other test fail
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-bsw-n3050/igt@i915_module_load@load.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-bsw-n3050/igt@i915_module_load@load.html
    - fi-kbl-8809g:       [PASS][9] -> [FAIL][10] +1 other test fail
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-kbl-8809g/igt@i915_module_load@load.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-kbl-8809g/igt@i915_module_load@load.html
    - bat-apl-1:          [PASS][11] -> [FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-apl-1/igt@i915_module_load@load.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-apl-1/igt@i915_module_load@load.html
    - fi-tgl-1115g4:      [PASS][13] -> [FAIL][14] +1 other test fail
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-tgl-1115g4/igt@i915_module_load@load.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-tgl-1115g4/igt@i915_module_load@load.html
    - fi-bsw-nick:        [PASS][15] -> [FAIL][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-bsw-nick/igt@i915_module_load@load.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-bsw-nick/igt@i915_module_load@load.html

  * igt@i915_module_load@reload:
    - fi-glk-j4005:       [PASS][17] -> [FAIL][18] +1 other test fail
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-glk-j4005/igt@i915_module_load@reload.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-glk-j4005/igt@i915_module_load@reload.html
    - fi-kbl-7567u:       [PASS][19] -> [FAIL][20] +1 other test fail
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-kbl-7567u/igt@i915_module_load@reload.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-kbl-7567u/igt@i915_module_load@reload.html
    - bat-jsl-5:          [PASS][21] -> [FAIL][22] +1 other test fail
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-jsl-5/igt@i915_module_load@reload.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-jsl-5/igt@i915_module_load@reload.html
    - fi-cfl-guc:         [PASS][23] -> [FAIL][24] +1 other test fail
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-cfl-guc/igt@i915_module_load@reload.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-cfl-guc/igt@i915_module_load@reload.html
    - fi-kbl-x1275:       [PASS][25] -> [FAIL][26] +1 other test fail
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-kbl-x1275/igt@i915_module_load@reload.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-kbl-x1275/igt@i915_module_load@reload.html
    - fi-cfl-8109u:       [PASS][27] -> [FAIL][28] +1 other test fail
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-cfl-8109u/igt@i915_module_load@reload.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-cfl-8109u/igt@i915_module_load@reload.html
    - fi-skl-6600u:       [PASS][29] -> [FAIL][30] +1 other test fail
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-skl-6600u/igt@i915_module_load@reload.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-skl-6600u/igt@i915_module_load@reload.html
    - fi-cfl-8700k:       [PASS][31] -> [FAIL][32] +1 other test fail
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/fi-cfl-8700k/igt@i915_module_load@reload.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/fi-cfl-8700k/igt@i915_module_load@reload.html
    - bat-kbl-2:          [PASS][33] -> [FAIL][34] +1 other test fail
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-kbl-2/igt@i915_module_load@reload.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-kbl-2/igt@i915_module_load@reload.html

  
Known issues
------------

  Here are the changes found in Patchwork_161167v2 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@workarounds:
    - bat-arlh-3:         [PASS][35] -> [DMESG-FAIL][36] ([i915#12061]) +1 other test dmesg-fail
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-arlh-3/igt@i915_selftest@live@workarounds.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-arlh-3/igt@i915_selftest@live@workarounds.html
    - bat-dg2-14:         [PASS][37] -> [DMESG-FAIL][38] ([i915#12061]) +1 other test dmesg-fail
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-dg2-14/igt@i915_selftest@live@workarounds.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-dg2-14/igt@i915_selftest@live@workarounds.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@workarounds:
    - bat-arls-6:         [DMESG-FAIL][39] ([i915#12061]) -> [PASS][40] +1 other test pass
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18015/bat-arls-6/igt@i915_selftest@live@workarounds.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/bat-arls-6/igt@i915_selftest@live@workarounds.html

  
  [i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061


Build changes
-------------

  * Linux: CI_DRM_18015 -> Patchwork_161167v2

  CI-20190529: 20190529
  CI_DRM_18015: 7c2ed7e89e283615b5f133d0205061934541e26d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_8764: 8764
  Patchwork_161167v2: 7c2ed7e89e283615b5f133d0205061934541e26d @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_161167v2/index.html

[-- Attachment #2: Type: text/html, Size: 8740 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers
  2026-02-04 23:03 [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Jonathan Cavitt
  2026-02-04 23:56 ` ✗ i915.CI.BAT: failure for " Patchwork
  2026-02-21  0:18 ` ✗ i915.CI.BAT: failure for drm/i915/gem: Explicitly return error value from eb_relocate helpers (rev2) Patchwork
@ 2026-02-24 16:19 ` Krzysztof Karas
  2026-02-24 16:59   ` Cavitt, Jonathan
  2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Karas @ 2026-02-24 16:19 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: intel-gfx, saurabhg.gupta, alex.zuo, joonas.lahtinen

Hi Jonathan,

On 2026-02-04 at 23:03:08 +0000, Jonathan Cavitt wrote:
> Static analysis issue:
> 
> The current implementations of the eb_relocate_vma and
> eb_relocate_vma_slow functions cast the return value of
> eb_relocate_entry to a signed long in order to determine if an error has
> occurred.  This is because the return value of eb_relocate_entry is a
> u64 offset value on a success and a negative error value on a failure.
> 
> While not mechanically incorrect,
This might lower the perceived need for this change, just leave
that it is improper to cast stuff like this and that should be good.

> it is improper to perform a cast like
> this.  So, just have eb_relocate_entry (and, by extension, its helper
> function relocate_entry) return the error value, storing the offset
> separately in a passed u64 pointer.
> 
> Interestingly, this value is only used for non-error-checking purposes
> in the eb_relocate_vma case.  We can simplify the eb_relocate_vma_slow
> case by allowing the passed u64 pointer to be NULL because of this.
> 
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---

I think the code looks good, but you should address failures
from i915 CI - both test runs on this patch look more or less
the same, so this change might be breaking something.

-- 
Best Regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers
  2026-02-24 16:19 ` [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Krzysztof Karas
@ 2026-02-24 16:59   ` Cavitt, Jonathan
  0 siblings, 0 replies; 5+ messages in thread
From: Cavitt, Jonathan @ 2026-02-24 16:59 UTC (permalink / raw)
  To: Karas, Krzysztof
  Cc: intel-gfx@lists.freedesktop.org, Gupta, Saurabhg, Zuo, Alex,
	joonas.lahtinen@linux.intel.com, Cavitt, Jonathan

-----Original Message-----
From: Karas, Krzysztof <krzysztof.karas@intel.com> 
Sent: Tuesday, February 24, 2026 8:19 AM
To: Cavitt, Jonathan <jonathan.cavitt@intel.com>
Cc: intel-gfx@lists.freedesktop.org; Gupta, Saurabhg <saurabhg.gupta@intel.com>; Zuo, Alex <alex.zuo@intel.com>; joonas.lahtinen@linux.intel.com
Subject: Re: [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers
> 
> Hi Jonathan,
> 
> On 2026-02-04 at 23:03:08 +0000, Jonathan Cavitt wrote:
> > Static analysis issue:
> > 
> > The current implementations of the eb_relocate_vma and
> > eb_relocate_vma_slow functions cast the return value of
> > eb_relocate_entry to a signed long in order to determine if an error has
> > occurred.  This is because the return value of eb_relocate_entry is a
> > u64 offset value on a success and a negative error value on a failure.
> > 
> > While not mechanically incorrect,
> This might lower the perceived need for this change, just leave
> that it is improper to cast stuff like this and that should be good.

Will do.

> 
> > it is improper to perform a cast like
> > this.  So, just have eb_relocate_entry (and, by extension, its helper
> > function relocate_entry) return the error value, storing the offset
> > separately in a passed u64 pointer.
> > 
> > Interestingly, this value is only used for non-error-checking purposes
> > in the eb_relocate_vma case.  We can simplify the eb_relocate_vma_slow
> > case by allowing the passed u64 pointer to be NULL because of this.
> > 
> > Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > ---
> 
> I think the code looks good, but you should address failures
> from i915 CI - both test runs on this patch look more or less
> the same, so this change might be breaking something.

Found it: offset and error values were no longer correlated, so when an error would
occur in eb_relocate_vma, it would be ignored due to offset == 0 hitting first.
Reordering the two cases should repair the issue.  Will submit an update shortly.
-Jonathan Cavitt

> 
> -- 
> Best Regards,
> Krzysztof
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-24 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 23:03 [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Jonathan Cavitt
2026-02-04 23:56 ` ✗ i915.CI.BAT: failure for " Patchwork
2026-02-21  0:18 ` ✗ i915.CI.BAT: failure for drm/i915/gem: Explicitly return error value from eb_relocate helpers (rev2) Patchwork
2026-02-24 16:19 ` [PATCH] drm/i915/gem: Explicitly return error value from eb_relocate helpers Krzysztof Karas
2026-02-24 16:59   ` Cavitt, Jonathan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox