Skip to contentSkip to conversation

drm/i915/selftests: Modernize printing in i915 selftests

PATCH Superseded Krzysztof Karas 5 participants 33 messages Aug 28 – Sep 30

Subsystems (2)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover drm/i915/selftests: Modernize printing in i915 selftests

Currently, in many instances, i915 functions call pr_* macros to write a message to the system log. This way of printing lacks device context, which could be a valuable source of information. Many files in DRM already use drm_* prints to include that context, so it would be beneficial to do the same for i915 as well. Start small and convert i915 selftests first.

I do not anticipate this series to pass BAT runs due to filtering warnings and error messages in our CI. Since the formatting is slightly different, expected messages will be detected as new issues.

v3 (Janusz, sashiko):
- keep pr_* where no device exists;
- pass struct drm_device explicitly through selftest wrappers instead of casting void *data;
- fall back to pr_* when device is NULL, to avoid "NULL device" output;
- keep lines limited to 80 characters where possible;
- drop unrelated reformatting;
- introduce local drm_i915_private variable for multiple complex dereferences;

Krzysztof Karas (8):
drm/i915/selftest: Fix a typo in alloc_workqueue call drm/i915/selftests: Use drm_* prints in live selftests drm/i915/selftests: Use drm_* prints in selftest helpers drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests drm/i915/gt/selftests: Use drm_* prints in gt standalone tests drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers drm/i915/selftests: Use drm_* prints in selftest headers drm/i915/selftests: Add drm_device to selftest wrappers

 .../gpu/drm/i915/gem/selftests/huge_pages.c   |   4 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  |   2 +-
 .../i915/gem/selftests/i915_gem_coherency.c   |   2 +-
 .../drm/i915/gem/selftests/i915_gem_context.c |   2 +-
 .../drm/i915/gem/selftests/i915_gem_dmabuf.c  |   4 +-
 .../drm/i915/gem/selftests/i915_gem_migrate.c |   2 +-
 .../drm/i915/gem/selftests/i915_gem_mman.c    |   4 +-
 .../drm/i915/gem/selftests/i915_gem_object.c  |   4 +-
 .../drm/i915/gem/selftests/i915_gem_phys.c    |   2 +-
 drivers/gpu/drm/i915/gt/selftest_context.c    |  35 +-
 drivers/gpu/drm/i915/gt/selftest_engine_cs.c  |  12 +-
 .../drm/i915/gt/selftest_engine_heartbeat.c   |  15 +-
 drivers/gpu/drm/i915/gt/selftest_engine_pm.c  |  60 +--
 drivers/gpu/drm/i915/gt/selftest_execlists.c  | 355 +++++++++++-------
 drivers/gpu/drm/i915/gt/selftest_gt_pm.c      |  36 +-
 drivers/gpu/drm/i915/gt/selftest_hangcheck.c  |   2 +-
 drivers/gpu/drm/i915/gt/selftest_llc.c        |  29 +-
 drivers/gpu/drm/i915/gt/selftest_lrc.c        |   2 +-
 drivers/gpu/drm/i915/gt/selftest_migrate.c    |  69 ++--
 drivers/gpu/drm/i915/gt/selftest_mocs.c       |  14 +-
 drivers/gpu/drm/i915/gt/selftest_rc6.c        |  59 +--
 drivers/gpu/drm/i915/gt/selftest_reset.c      |  30 +-
 drivers/gpu/drm/i915/gt/selftest_ring.c       |   2 +-
 .../drm/i915/gt/selftest_ring_submission.c    |   2 +-
 drivers/gpu/drm/i915/gt/selftest_rps.c        | 297 ++++++++-------
 drivers/gpu/drm/i915/gt/selftest_slpc.c       | 105 ++++--
 drivers/gpu/drm/i915/gt/selftest_timeline.c   |   4 +-
 drivers/gpu/drm/i915/gt/selftest_tlb.c        |  41 +-
 .../gpu/drm/i915/gt/selftest_workarounds.c    | 106 ++++--
 drivers/gpu/drm/i915/gt/st_shmem_utils.c      |   2 +-
 drivers/gpu/drm/i915/gt/uc/selftest_guc.c     |   2 +-
 .../drm/i915/gt/uc/selftest_guc_hangcheck.c   |   2 +-
 .../drm/i915/gt/uc/selftest_guc_multi_lrc.c   |   2 +-
 drivers/gpu/drm/i915/i915_selftest.h          |  16 +-
 drivers/gpu/drm/i915/selftests/i915_active.c  |  14 +-
 drivers/gpu/drm/i915/selftests/i915_gem.c     |   2 +-
 .../gpu/drm/i915/selftests/i915_gem_evict.c   |  79 ++--
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 227 ++++++-----
 drivers/gpu/drm/i915/selftests/i915_perf.c    |  31 +-
 drivers/gpu/drm/i915/selftests/i915_request.c | 307 ++++++++-------
 .../gpu/drm/i915/selftests/i915_selftest.c    |  71 +++-
 .../gpu/drm/i915/selftests/i915_sw_fence.c    |   4 +-
 drivers/gpu/drm/i915/selftests/i915_syncmap.c |   2 +-
 drivers/gpu/drm/i915/selftests/i915_vma.c     | 261 ++++++++-----
 .../gpu/drm/i915/selftests/igt_flush_test.c   |   7 +-
 .../gpu/drm/i915/selftests/igt_live_test.c    |   6 +-
 drivers/gpu/drm/i915/selftests/igt_reset.c    |   5 +-
 .../drm/i915/selftests/intel_memory_region.c  |   6 +-
 .../i915/selftests/intel_scheduler_helpers.c  |   8 +-
 drivers/gpu/drm/i915/selftests/intel_uncore.c |  49 +--
 .../gpu/drm/i915/selftests/mock_gem_device.c  |   4 +-
 drivers/gpu/drm/i915/selftests/scatterlist.c  |   2 +-
 52 files changed, 1455 insertions(+), 955 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/8 drm/i915/selftest: Fix a typo in alloc_workqueue call

The workqueue created by test_ipc() was named "i1915-selftest" instead of "i915-selftest". Correct the driver name in the workqueue name.

---
 drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/selftests/i915_sw_fence.c +1 -1
index 6a305322e30d..ecb2d718f6a6 100644
@@ -526,7 +526,7 @@ static int test_ipc(void *arg)
 	struct workqueue_struct *wq;
 	int ret = 0;
 
-	wq = alloc_workqueue("i1915-selftest", WQ_PERCPU, 0);
+	wq = alloc_workqueue("i915-selftest", WQ_PERCPU, 0);
 	if (wq == NULL)
 		return -ENOMEM;
 
Signature · 1 line
2.34.1
Reviewed-by on v3 1/8
#2 lore raw

Re: [PATCH v3 1/8] drm/i915/selftest: Fix a typo in alloc_workqueue call

Hi Krzysztof,

Quoted 6 lines · Krzysztof Karas

The workqueue created by test_ipc() was named "i1915-selftest" instead of "i915-selftest". Correct the driver name in the workqueue name.

You forgot to add my

Please, don't forget next time.

Andi

#4 lore raw

PATCH v3 2/8 drm/i915/selftests: Use drm_* prints in live selftests

In reply to Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 .../gpu/drm/i915/selftests/i915_gem_evict.c   |  75 +++--
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 223 ++++++++-----
 drivers/gpu/drm/i915/selftests/i915_perf.c    |  29 +-
 drivers/gpu/drm/i915/selftests/i915_request.c | 301 +++++++++++-------
 drivers/gpu/drm/i915/selftests/i915_vma.c     | 257 +++++++++------
 drivers/gpu/drm/i915/selftests/intel_uncore.c |  47 +--
 6 files changed, 566 insertions(+), 366 deletions(-)
drivers/gpu/drm/i915/selftests/i915_gem_evict.c +47 -28
index 718cddde7e73..604289814f79 100644
@@ -29,6 +29,8 @@
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_print.h"
 
+#include <drm/drm_print.h>
+
 #include "i915_selftest.h"
 
 #include "igt_flush_test.h"
@@ -47,6 +49,7 @@ static void quirk_add(struct drm_i915_gem_object *obj,
 
 static int populate_ggtt(struct i915_ggtt *ggtt, struct list_head *objects)
 {
+	struct drm_i915_private *i915 = ggtt->vm.i915;
 	struct drm_i915_gem_object *obj;
 	unsigned long count;
 
@@ -71,11 +74,13 @@ static int populate_ggtt(struct i915_ggtt *ggtt, struct list_head *objects)
 		quirk_add(obj, objects);
 		count++;
 	} while (1);
-	pr_debug("Filled GGTT with %lu pages [%llu total]\n",
-		 count, ggtt->vm.total / PAGE_SIZE);
+	drm_dbg(&i915->drm,
+		"Filled GGTT with %lu pages [%llu total]\n", count,
+		ggtt->vm.total / PAGE_SIZE);
 
 	if (list_empty(&ggtt->vm.bound_list)) {
-		pr_err("No objects on the GGTT inactive list!\n");
+		drm_err(&i915->drm,
+			"No objects on the GGTT inactive list!\n");
 		return -EINVAL;
 	}
 
@@ -107,6 +112,7 @@ static void cleanup_objects(struct i915_ggtt *ggtt, struct list_head *list)
 static int igt_evict_something(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct i915_ggtt *ggtt = gt->ggtt;
 	LIST_HEAD(objects);
 	int err;
@@ -125,8 +131,9 @@ static int igt_evict_something(void *arg)
 				       0);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (err != -ENOSPC) {
-		pr_err("i915_gem_evict_something failed on a full GGTT with err=%d\n",
-		       err);
+		drm_err(&i915->drm,
+			"i915_gem_evict_something failed on a full GGTT with err=%d\n",
+			err);
 		goto cleanup;
 	}
 
@@ -140,8 +147,9 @@ static int igt_evict_something(void *arg)
 				       0);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (err) {
-		pr_err("i915_gem_evict_something failed on a full GGTT with err=%d\n",
-		       err);
+		drm_err(&i915->drm,
+			"i915_gem_evict_something failed on a full GGTT with err=%d\n",
+			err);
 		goto cleanup;
 	}
 
@@ -177,7 +185,9 @@ static int igt_overcommit(void *arg)
 
 	vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0, 0);
 	if (vma != ERR_PTR(-ENOSPC)) {
-		pr_err("Failed to evict+insert, i915_gem_object_ggtt_pin returned err=%d\n", (int)PTR_ERR_OR_ZERO(vma));
+		drm_err(&gt->i915->drm,
+			"Failed to evict+insert, i915_gem_object_ggtt_pin returned err=%d\n",
+			(int)PTR_ERR_OR_ZERO(vma));
 		err = -EINVAL;
 		goto cleanup;
 	}
@@ -190,6 +200,7 @@ static int igt_overcommit(void *arg)
 static int igt_evict_for_vma(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct i915_ggtt *ggtt = gt->ggtt;
 	struct drm_mm_node target = {
 		.start = 0,
@@ -209,8 +220,9 @@ static int igt_evict_for_vma(void *arg)
 	err = i915_gem_evict_for_node(&ggtt->vm, NULL, &target, 0);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (err != -ENOSPC) {
-		pr_err("i915_gem_evict_for_node on a full GGTT returned err=%d\n",
-		       err);
+		drm_err(&i915->drm,
+			"i915_gem_evict_for_node on a full GGTT returned err=%d\n",
+			err);
 		goto cleanup;
 	}
 
@@ -221,8 +233,8 @@ static int igt_evict_for_vma(void *arg)
 	err = i915_gem_evict_for_node(&ggtt->vm, NULL, &target, 0);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (err) {
-		pr_err("i915_gem_evict_for_node returned err=%d\n",
-		       err);
+		drm_err(&i915->drm,
+			"i915_gem_evict_for_node returned err=%d\n", err);
 		goto cleanup;
 	}
 
@@ -248,6 +260,7 @@ static int igt_evict_for_cache_color(void *arg)
 		.size = I915_GTT_PAGE_SIZE,
 		.color = i915_gem_get_pat_index(gt->i915, I915_CACHE_LLC),
 	};
+	struct drm_i915_private *i915 = gt->i915;
 	struct drm_i915_gem_object *obj;
 	struct i915_vma *vma;
 	LIST_HEAD(objects);
@@ -273,7 +286,7 @@ static int igt_evict_for_cache_color(void *arg)
 	vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0,
 				       I915_GTT_PAGE_SIZE | flags);
 	if (IS_ERR(vma)) {
-		pr_err("[0]i915_gem_object_ggtt_pin failed\n");
+		drm_err(&i915->drm, "[0]i915_gem_object_ggtt_pin failed\n");
 		err = PTR_ERR(vma);
 		goto cleanup;
 	}
@@ -290,7 +303,7 @@ static int igt_evict_for_cache_color(void *arg)
 	vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0,
 				       (I915_GTT_PAGE_SIZE * 2) | flags);
 	if (IS_ERR(vma)) {
-		pr_err("[1]i915_gem_object_ggtt_pin failed\n");
+		drm_err(&i915->drm, "[1]i915_gem_object_ggtt_pin failed\n");
 		err = PTR_ERR(vma);
 		goto cleanup;
 	}
@@ -302,7 +315,8 @@ static int igt_evict_for_cache_color(void *arg)
 	err = i915_gem_evict_for_node(&ggtt->vm, NULL, &target, 0);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (err) {
-		pr_err("[0]i915_gem_evict_for_node returned err=%d\n", err);
+		drm_err(&i915->drm,
+			"[0]i915_gem_evict_for_node returned err=%d\n", err);
 		goto cleanup;
 	}
 
@@ -315,7 +329,8 @@ static int igt_evict_for_cache_color(void *arg)
 	err = i915_gem_evict_for_node(&ggtt->vm, NULL, &target, 0);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (!err) {
-		pr_err("[1]i915_gem_evict_for_node returned err=%d\n", err);
+		drm_err(&i915->drm,
+			"[1]i915_gem_evict_for_node returned err=%d\n", err);
 		err = -EINVAL;
 		goto cleanup;
 	}
@@ -332,6 +347,7 @@ static int igt_evict_for_cache_color(void *arg)
 static int igt_evict_vm(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct i915_ggtt *ggtt = gt->ggtt;
 	struct i915_gem_ww_ctx ww;
 	LIST_HEAD(objects);
@@ -348,8 +364,9 @@ static int igt_evict_vm(void *arg)
 	err = i915_gem_evict_vm(&ggtt->vm, NULL, NULL);
 	mutex_unlock(&ggtt->vm.mutex);
 	if (err) {
-		pr_err("i915_gem_evict_vm on a full GGTT returned err=%d]\n",
-		       err);
+		drm_err(&i915->drm,
+			"i915_gem_evict_vm on a full GGTT returned err=%d]\n",
+			err);
 		goto cleanup;
 	}
 
@@ -362,8 +379,9 @@ static int igt_evict_vm(void *arg)
 	}
 
 	if (err) {
-		pr_err("i915_gem_evict_vm on a full GGTT returned err=%d]\n",
-		       err);
+		drm_err(&i915->drm,
+			"i915_gem_evict_vm on a full GGTT returned err=%d]\n",
+			err);
 		goto cleanup;
 	}
 
@@ -443,7 +461,7 @@ static int igt_evict_contexts(void *arg)
 	} while (1);
 	drm_mm_remove_node(&hole);
 	mutex_unlock(&ggtt->vm.mutex);
-	pr_info("Filled GGTT with %lu 1MiB nodes\n", count);
+	drm_info(&i915->drm, "Filled GGTT with %lu 1MiB nodes\n", count);
 
 	/* Overfill the GGTT with context objects and so try to evict one. */
 	for_each_engine(engine, gt, id) {
@@ -469,9 +487,9 @@ static int igt_evict_contexts(void *arg)
 			if (IS_ERR(rq)) {
 				/* When full, fail_if_busy will trigger EBUSY */
 				if (PTR_ERR(rq) != -EBUSY) {
-					pr_err("Unexpected error from request alloc (on %s): %d\n",
-					       engine->name,
-					       (int)PTR_ERR(rq));
+					drm_err(&i915->drm,
+						"Unexpected error from request alloc (on %s): %d\n",
+						engine->name, (int)PTR_ERR(rq));
 					err = PTR_ERR(rq);
 				}
 				break;
@@ -492,16 +510,17 @@ static int igt_evict_contexts(void *arg)
 			err = 0;
 		} while(1);
 		onstack_fence_fini(&fence);
-		pr_info("Submitted %lu contexts/requests on %s\n",
-			count, engine->name);
+		drm_info(&i915->drm, "Submitted %lu contexts/requests on %s\n",
+			 count, engine->name);
 		if (err)
 			break;
 		if (last) {
 			if (i915_request_wait(last, 0, HZ) < 0) {
 				err = -EIO;
 				i915_request_put(last);
-				pr_err("Failed waiting for last request (on %s)",
-				       engine->name);
+				drm_err(&i915->drm,
+					"Failed waiting for last request (on %s)\n",
+					engine->name);
 				break;
 			}
 			i915_request_put(last);
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +141 -82

475 lines not on this page · raw message

drivers/gpu/drm/i915/selftests/i915_perf.c +17 -12
index e9469e27f42a..d2a1a901d47b 100644
@@ -14,6 +14,8 @@
 #include "igt_flush_test.h"
 #include "lib_sw_fence.h"
 
+#include <drm/drm_print.h>
+
 #define TEST_OA_CONFIG_UUID "12345678-1234-1234-1234-1234567890ab"
 
 static int
@@ -263,20 +265,21 @@ static int live_noa_delay(void *arg)
 	t1 = poll_status(rq, 0x102);
 	preempt_enable();
 
-	pr_info("CPU delay: %lluns, expected %lluns\n",
-		ktime_sub(t1, t0), expected);
+	drm_info(&i915->drm,
+		 "CPU delay: %lluns, expected %lluns\n", ktime_sub(t1, t0),
+		 expected);
 
 	delay = intel_read_status_page(stream->engine, 0x102);
 	delay -= intel_read_status_page(stream->engine, 0x100);
 	delay = intel_gt_clock_interval_to_ns(stream->engine->gt, delay);
-	pr_info("GPU delay: %uns, expected %lluns\n",
-		delay, expected);
+	drm_info(&i915->drm,
+		 "GPU delay: %uns, expected %lluns\n", delay, expected);
 
 	if (4 * delay < 3 * expected || 2 * delay > 3 * expected) {
-		pr_err("GPU delay [%uus] outside of expected threshold! [%lluus, %lluus]\n",
-		       delay / 1000,
-		       div_u64(3 * expected, 4000),
-		       div_u64(3 * expected, 2000));
+		drm_err(&i915->drm,
+			"GPU delay [%uus] outside of expected threshold! [%lluus, %lluus]\n",
+			delay / 1000, div_u64(3 * expected, 4000),
+			div_u64(3 * expected, 2000));
 		err = -EINVAL;
 	}
 
@@ -385,7 +388,7 @@ static int live_noa_gpr(void *arg)
 	i915_request_add(rq);
 
 	if (i915_request_wait(rq, I915_WAIT_INTERRUPTIBLE, HZ / 2) < 0) {
-		pr_err("noa_wait timed out\n");
+		drm_err(&i915->drm, "noa_wait timed out\n");
 		intel_gt_set_wedged(stream->engine->gt);
 		err = -EIO;
 		goto out_rq;
@@ -396,14 +399,16 @@ static int live_noa_gpr(void *arg)
 		if (store[i] == STACK_MAGIC)
 			continue;
 
-		pr_err("GPR[%d] lost, found:%08x, expected:%08x!\n",
-		       i, store[i], STACK_MAGIC);
+		drm_err(&i915->drm,
+			"GPR[%d] lost, found:%08x, expected:%08x!\n", i,
+			store[i], STACK_MAGIC);
 		err = -EINVAL;
 	}
 
 	/* Verify that the user's scratch page was not used for GPR storage */
 	if (memchr_inv(scratch, POISON_FREE, PAGE_SIZE)) {
-		pr_err("Scratch page overwritten!\n");
+		drm_err(&i915->drm,
+			"Scratch page overwritten!\n");
 		igt_hexdump(scratch, 4096);
 		err = -EINVAL;
 	}
drivers/gpu/drm/i915/selftests/i915_request.c +178 -123

706 lines not on this page · raw message

drivers/gpu/drm/i915/selftests/i915_vma.c +156 -101

520 lines not on this page · raw message

drivers/gpu/drm/i915/selftests/intel_uncore.c +27 -20

124 lines not on this page · raw message

Signature · 1 line
2.34.1
#5 lore raw

Re: [PATCH v3 2/8] drm/i915/selftests: Use drm_* prints in live selftests

Hi Krzysztof,

...

Quoted 38 lines

static int intel_fw_table_check(const struct intel_forcewake_range *ranges,

drivers/gpu/drm/i915/selftests/intel_uncore.c +8 -7
 				unsigned int num_ranges,
-				bool is_watertight)
+				bool is_watertight,
+				const struct drm_device *drm)
 {
 	unsigned int i;
 	s32 prev;
@@ -36,22 +39,22 @@ static int intel_fw_table_check(const struct intel_forcewake_range *ranges,
 	for (i = 0, prev = -1; i < num_ranges; i++, ranges++) {
 		/* Check that the table is watertight */
 		if (is_watertight && (prev + 1) != (s32)ranges->start) {
-			pr_err("%s: entry[%d]:(%x, %x) is not watertight to previous (%x)\n",
-			       __func__, i, ranges->start, ranges->end, prev);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) is not watertight to previous (%x)\n",
+				__func__, i, ranges->start, ranges->end, prev);
 			return -EINVAL;
 		}
 
 		/* Check that the table never goes backwards */
 		if (prev >= (s32)ranges->start) {
-			pr_err("%s: entry[%d]:(%x, %x) is less than the previous (%x)\n",
-			       __func__, i, ranges->start, ranges->end, prev);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) is less than the previous (%x)\n",
+				__func__, i, ranges->start, ranges->end, prev);
 			return -EINVAL;
 		}
 
 		/* Check that the entry is valid */
 		if (ranges->start >= ranges->end) {
-			pr_err("%s: entry[%d]:(%x, %x) has negative length\n",
-			       __func__, i, ranges->start, ranges->end);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) has negative length\n",
+				__func__, i, ranges->start, ranges->end);
 			return -EINVAL;
 		}
 

drivers/gpu/drm/i915/selftests/intel_uncore.c int intel_uncore_mock_selftests(void) · line 133

Quoted 6 lines
drivers/gpu/drm/i915/selftests/intel_uncore.c +2 -1
@@ -126,7 +129,8 @@ int intel_uncore_mock_selftests(void)
 	for (i = 0; i < ARRAY_SIZE(fw); i++) {
 		err = intel_fw_table_check(fw[i].ranges,
 					   fw[i].num_ranges,
-					   fw[i].is_watertight);
+					   fw[i].is_watertight,
+					   NULL);

arrghh! Here we are again at the drm_err(NULL,...) case.

You could eventually do in intel_fw_table_check()

	if (drm)
		drm_err(drm, ...);
	else
		pr_err(...);

but I think it's not worth the effort, just leave pr_err(). Besides, passing the drm device is quite out of the scope of the function itself, it's just odd!

Andi

Quoted 3 lines
drivers/gpu/drm/i915/selftests/i915_request.c +0 -0
 		if (err)
 			return err;
 	}
maintainer
#6 lore raw

Re: [PATCH v3 2/8] drm/i915/selftests: Use drm_* prints in live selftests

Quoted 9 lines · Andi Shyti

Hi Krzysztof,

...

drivers/gpu/drm/i915/selftests/intel_uncore.c line 34

Quoted 5 lines

static int intel_fw_table_check(const struct intel_forcewake_range *ranges,

drivers/gpu/drm/i915/selftests/intel_uncore.c +2 -1
 				unsigned int num_ranges,
-				bool is_watertight)
+				bool is_watertight,
+				const struct drm_device *drm)

First, we generally don't pass around struct drm_device *, it's struct drm_i915_private * in i915.

Second, the highest level context parameters should be first. This one looks like an afterthought.

Quoted 42 lines
Quoted 33 lines

{

drivers/gpu/drm/i915/selftests/intel_uncore.c +6 -6
 	unsigned int i;
 	s32 prev;
@@ -36,22 +39,22 @@ static int intel_fw_table_check(const struct intel_forcewake_range *ranges,
 	for (i = 0, prev = -1; i < num_ranges; i++, ranges++) {
 		/* Check that the table is watertight */
 		if (is_watertight && (prev + 1) != (s32)ranges->start) {
-			pr_err("%s: entry[%d]:(%x, %x) is not watertight to previous (%x)\n",
-			       __func__, i, ranges->start, ranges->end, prev);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) is not watertight to previous (%x)\n",
+				__func__, i, ranges->start, ranges->end, prev);
 			return -EINVAL;
 		}
 
 		/* Check that the table never goes backwards */
 		if (prev >= (s32)ranges->start) {
-			pr_err("%s: entry[%d]:(%x, %x) is less than the previous (%x)\n",
-			       __func__, i, ranges->start, ranges->end, prev);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) is less than the previous (%x)\n",
+				__func__, i, ranges->start, ranges->end, prev);
 			return -EINVAL;
 		}
 
 		/* Check that the entry is valid */
 		if (ranges->start >= ranges->end) {
-			pr_err("%s: entry[%d]:(%x, %x) has negative length\n",
-			       __func__, i, ranges->start, ranges->end);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) has negative length\n",
+				__func__, i, ranges->start, ranges->end);
 			return -EINVAL;
 		}
 

drivers/gpu/drm/i915/selftests/intel_uncore.c int intel_uncore_mock_selftests(void) · line 133

Quoted 6 lines
drivers/gpu/drm/i915/selftests/intel_uncore.c +2 -1
@@ -126,7 +129,8 @@ int intel_uncore_mock_selftests(void)
 	for (i = 0; i < ARRAY_SIZE(fw); i++) {
 		err = intel_fw_table_check(fw[i].ranges,
 					   fw[i].num_ranges,
-					   fw[i].is_watertight);
+					   fw[i].is_watertight,
+					   NULL);

arrghh! Here we are again at the drm_err(NULL,...) case.

Quoted 6 lines

You could eventually do in intel_fw_table_check()

	if (drm)
		drm_err(drm, ...);
	else
		pr_err(...);

drm_err() handles NULL drm_device just fine.

Quoted 4 lines

but I think it's not worth the effort, just leave pr_err(). Besides, passing the drm device is quite out of the scope of the function itself, it's just odd!

But agreed.

BR,
Jani.

Quoted 6 lines

Andi

Quoted 3 lines
drivers/gpu/drm/i915/selftests/i915_request.c +0 -0
 		if (err)
 			return err;
 	}
Signature · 1 line
Jani Nikula, Intel
#7 lore raw

Re: [PATCH v3 2/8] drm/i915/selftests: Use drm_* prints in live selftests

In reply to Krzysztof Karas

Hi Krzysztof,

Quoted 8 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 .../gpu/drm/i915/selftests/i915_gem_evict.c   |  75 +++--

i915_request_put(last);

<snip>

Quoted 14 lines
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +2 -0
index e6bd06774816..0c855f00c3ae 100644
@@ -25,6 +25,8 @@
 #include <linux/list_sort.h>
 #include <linux/prime_numbers.h>
 
+#include <drm/drm_print.h>
+
 #include "gem/i915_gem_context.h"
 #include "gem/i915_gem_internal.h"
 #include "gem/i915_gem_lmem.h"

drivers/gpu/drm/i915/selftests/i915_gem_gtt.c line 39

Quoted 4 lines
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +1 -0
@@ -34,6 +36,7 @@
 #include "gt/intel_gpu_commands.h"
 #include "gt/intel_gtt.h"
 
+#include "../i915_drv.h"

Is the ../ really necessary here? It builds for me if i just switch to #include "i915_drv.h", other includes treat driver/gpu/drm/i915 as the working dir. I've seen both styles used in the selftests but it just looks a bit out of place here.

<snip>

drivers/gpu/drm/i915/selftests/i915_perf.c line 18

Quoted 10 lines
drivers/gpu/drm/i915/selftests/i915_perf.c +2 -0
index e9469e27f42a..d2a1a901d47b 100644
@@ -14,6 +14,8 @@
 #include "igt_flush_test.h"
 #include "lib_sw_fence.h"
 
+#include <drm/drm_print.h>
+

Giga nit, but should this be before the "" includes?

<snip>

drivers/gpu/drm/i915/selftests/intel_uncore.c line 30

Quoted 10 lines
drivers/gpu/drm/i915/selftests/intel_uncore.c +2 -0
index 514d2200751b..1f58024150fa 100644
@@ -26,9 +26,12 @@
 
 #include "gt/intel_gt.h"
 
+#include <drm/drm_print.h>
+

Should this be before the "" includes?

<not snipping here, same file below>

Quoted 38 lines
drivers/gpu/drm/i915/selftests/intel_uncore.c +8 -7
 static int intel_fw_table_check(const struct intel_forcewake_range *ranges,
 				unsigned int num_ranges,
-				bool is_watertight)
+				bool is_watertight,
+				const struct drm_device *drm)
 {
 	unsigned int i;
 	s32 prev;
@@ -36,22 +39,22 @@ static int intel_fw_table_check(const struct intel_forcewake_range *ranges,
 	for (i = 0, prev = -1; i < num_ranges; i++, ranges++) {
 		/* Check that the table is watertight */
 		if (is_watertight && (prev + 1) != (s32)ranges->start) {
-			pr_err("%s: entry[%d]:(%x, %x) is not watertight to previous (%x)\n",
-			       __func__, i, ranges->start, ranges->end, prev);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) is not watertight to previous (%x)\n",
+				__func__, i, ranges->start, ranges->end, prev);
 			return -EINVAL;
 		}
 
 		/* Check that the table never goes backwards */
 		if (prev >= (s32)ranges->start) {
-			pr_err("%s: entry[%d]:(%x, %x) is less than the previous (%x)\n",
-			       __func__, i, ranges->start, ranges->end, prev);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) is less than the previous (%x)\n",
+				__func__, i, ranges->start, ranges->end, prev);
 			return -EINVAL;
 		}
 
 		/* Check that the entry is valid */
 		if (ranges->start >= ranges->end) {
-			pr_err("%s: entry[%d]:(%x, %x) has negative length\n",
-			       __func__, i, ranges->start, ranges->end);
+			drm_err(drm, "%s: entry[%d]:(%x, %x) has negative length\n",
+				__func__, i, ranges->start, ranges->end);
 			return -EINVAL;
 		}
 

drivers/gpu/drm/i915/selftests/intel_uncore.c int intel_uncore_mock_selftests(void) · line 133

Quoted 6 lines
drivers/gpu/drm/i915/selftests/intel_uncore.c +2 -1
@@ -126,7 +129,8 @@ int intel_uncore_mock_selftests(void)
 	for (i = 0; i < ARRAY_SIZE(fw); i++) {
 		err = intel_fw_table_check(fw[i].ranges,
 					   fw[i].num_ranges,
-					   fw[i].is_watertight);
+					   fw[i].is_watertight,
+					   NULL);

I'll join Andi here in that this looks a bit weird. Especially since the next function in the file intel_shadow_table_check() keeps using pr_err(). Either convert that too or don't do either.

<snippnig the rest>

Thanks
Krzysztof

maintainer
#8 lore raw

Re: [PATCH v3 2/8] drm/i915/selftests: Use drm_* prints in live selftests

Quoted 10 lines · Krzysztof Niemiec

drivers/gpu/drm/i915/selftests/i915_gem_gtt.c line 39

Quoted 5 lines
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +1 -0
@@ -34,6 +36,7 @@
 #include "gt/intel_gpu_commands.h"
 #include "gt/intel_gtt.h"
 
+#include "../i915_drv.h"

Is the ../ really necessary here? It builds for me if i just switch to #include "i915_drv.h", other includes treat driver/gpu/drm/i915 as the working dir. I've seen both styles used in the selftests but it just looks a bit out of place here.

Using ../ is generally just the plain wrong thing to do.

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/selftests/i915_perf.c +0 -0
index e9469e27f42a..d2a1a901d47b 100644
@@ -14,6 +14,8 @@
 #include "igt_flush_test.h"
 #include "lib_sw_fence.h"
 
Quoted 4 lines

drivers/gpu/drm/i915/selftests/i915_perf.c line 18

Quoted 2 lines
drivers/gpu/drm/i915/selftests/i915_perf.c +2 -0
+#include <drm/drm_print.h>
+

Giga nit, but should this be before the "" includes?

It's not even a nit. That's the style that should be adhered to in the driver.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel
#9 lore raw

PATCH v3 3/8 drm/i915/selftests: Use drm_* prints in selftest helpers

In reply to Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/selftests/i915_active.c         | 12 +++++++-----
 drivers/gpu/drm/i915/selftests/igt_flush_test.c      |  7 +++++--
 drivers/gpu/drm/i915/selftests/igt_live_test.c       |  6 +++---
 drivers/gpu/drm/i915/selftests/igt_reset.c           |  5 ++++-
 .../gpu/drm/i915/selftests/intel_scheduler_helpers.c |  8 ++++++--
 drivers/gpu/drm/i915/selftests/mock_gem_device.c     |  4 +++-
 6 files changed, 28 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/selftests/i915_active.c +7 -5
index 9fea2fabeac4..79b55df1e71a 100644
@@ -115,7 +115,7 @@ __live_active_setup(struct drm_i915_private *i915)
 			err = i915_active_add_request(&active->base, rq);
 		i915_request_add(rq);
 		if (err) {
-			pr_err("Failed to track active ref!\n");
+			drm_err(&i915->drm, "Failed to track active ref!\n");
 			break;
 		}
 
@@ -124,12 +124,13 @@ __live_active_setup(struct drm_i915_private *i915)
 
 	i915_active_release(&active->base);
 	if (READ_ONCE(active->retired) && count) {
-		pr_err("i915_active retired before submission!\n");
+		drm_err(&i915->drm, "i915_active retired before submission!\n");
 		err = -EINVAL;
 	}
 	if (atomic_read(&active->base.count) != count) {
-		pr_err("i915_active not tracking all requests, found %d, expected %d\n",
-		       atomic_read(&active->base.count), count);
+		drm_err(&i915->drm,
+			"i915_active not tracking all requests, found %d, expected %d\n",
+			atomic_read(&active->base.count), count);
 		err = -EINVAL;
 	}
 
@@ -236,7 +237,8 @@ static int live_active_barrier(void *arg)
 
 	__i915_active_wait(&active->base, TASK_UNINTERRUPTIBLE);
 	if (!READ_ONCE(active->retired)) {
-		pr_err("i915_active not retired after flushing barriers!\n");
+		drm_err(&i915->drm,
+			"i915_active not retired after flushing barriers!\n");
 		err = -EINVAL;
 	}
 
drivers/gpu/drm/i915/selftests/igt_flush_test.c +5 -2
index c383d31d46b0..86164d1258c6 100644
@@ -7,6 +7,8 @@
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_requests.h"
 
+#include <drm/drm_print.h>
+
 #include "i915_drv.h"
 #include "i915_selftest.h"
 
@@ -35,8 +37,9 @@ int igt_flush_test(struct drm_i915_private *i915)
 
 		/* 2x longest preempt timeout, experimentally determined */
 		if (intel_gt_wait_for_idle(gt, HZ * timeout_ms / 500) == -ETIME) {
-			pr_err("%pS timed out, cancelling all further testing.\n",
-			       __builtin_return_address(0));
+			drm_err(&gt->i915->drm,
+				"%pS timed out, cancelling all further testing.\n",
+				__builtin_return_address(0));
 
 			GEM_TRACE("%pS timed out.\n",
 				  __builtin_return_address(0));
drivers/gpu/drm/i915/selftests/igt_live_test.c +3 -3
index 7d41874a49c5..c1fbd98d3164 100644
@@ -59,9 +59,9 @@ int igt_live_test_end(struct igt_live_test *t)
 		return -EIO;
 
 	if (t->reset_global != i915_reset_count(&i915->gpu_error)) {
-		pr_err("%s(%s): GPU was reset %d times!\n",
-		       t->func, t->name,
-		       i915_reset_count(&i915->gpu_error) - t->reset_global);
+		drm_err(&i915->drm, "%s(%s): GPU was reset %d times!\n",
+			t->func, t->name,
+			i915_reset_count(&i915->gpu_error) - t->reset_global);
 		return -EIO;
 	}
 
drivers/gpu/drm/i915/selftests/igt_reset.c +4 -1
index a2838c65f8a5..7902ed9ad339 100644
@@ -4,6 +4,8 @@
  * Copyright © 2018 Intel Corporation
  */
 
+#include <drm/drm_print.h>
+
 #include "igt_reset.h"
 
 #include "gt/intel_engine.h"
@@ -16,7 +18,8 @@ void igt_global_reset_lock(struct intel_gt *gt)
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
 
-	pr_debug("%s: current gpu_error=%08lx\n", __func__, gt->reset.flags);
+	drm_dbg(&gt->i915->drm, "%s: current gpu_error=%08lx\n", __func__,
+		gt->reset.flags);
 
 	while (test_and_set_bit(I915_RESET_BACKOFF, &gt->reset.flags))
 		wait_event(gt->reset.queue,
drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c +6 -2
index e14ac0ab1314..83f66fe4a9d5 100644
@@ -5,6 +5,8 @@
 
 #include <linux/jiffies.h>
 
+#include <drm/drm_print.h>
+
 //#include "gt/intel_engine_user.h"
 #include "gt/intel_gt.h"
 #include "i915_drv.h"
@@ -24,7 +26,7 @@ struct intel_engine_cs *intel_selftest_find_any_engine(struct intel_gt *gt)
 	for_each_engine(engine, gt, id)
 		return engine;
 
-	pr_err("No valid engine found!\n");
+	drm_err(&gt->i915->drm, "No valid engine found!\n");
 	return NULL;
 }
 
@@ -60,7 +62,9 @@ int intel_selftest_modify_policy(struct intel_engine_cs *engine,
 		break;
 
 	default:
-		pr_err("Invalid scheduler policy modification type: %d!\n", modify_type);
+		drm_err(&engine->i915->drm,
+			"Invalid scheduler policy modification type: %d!\n",
+			modify_type);
 		return -EINVAL;
 	}
 
drivers/gpu/drm/i915/selftests/mock_gem_device.c +3 -1
index 796c9b070e41..c0dadcd961bb 100644
@@ -169,7 +169,9 @@ struct drm_i915_private *mock_gem_device(void)
 	i915 = devm_drm_dev_alloc(&pdev->dev, &mock_driver,
 				  struct drm_i915_private, drm);
 	if (IS_ERR(i915)) {
-		pr_err("Failed to allocate mock GEM device: err=%ld\n", PTR_ERR(i915));
+		dev_err(&pdev->dev,
+			"Failed to allocate mock GEM device: err=%ld\n",
+			PTR_ERR(i915));
 		devres_release_group(&pdev->dev, NULL);
 		put_device(&pdev->dev);
 
Signature · 1 line
2.34.1
Reviewed-by on v3 3/8
#10 lore raw

Re: [PATCH v3 3/8] drm/i915/selftests: Use drm_* prints in selftest helpers

Hi krzysztof,

drivers/gpu/drm/i915/selftests/mock_gem_device.c struct drm_i915_private *mock_gem_device(void) · line 174

Quoted 7 lines
drivers/gpu/drm/i915/selftests/mock_gem_device.c +3 -1
 	i915 = devm_drm_dev_alloc(&pdev->dev, &mock_driver,
 				  struct drm_i915_private, drm);
 	if (IS_ERR(i915)) {
-		pr_err("Failed to allocate mock GEM device: err=%ld\n", PTR_ERR(i915));
+		dev_err(&pdev->dev,
+			"Failed to allocate mock GEM device: err=%ld\n",
+			PTR_ERR(i915));

good choice here to use dev_err(...);

Also here you forgot to add my r-b. People normally spend time to do reviews and it's not nice to ignore them.

Andi

Quoted 6 lines
drivers/gpu/drm/i915/selftests/mock_gem_device.c +0 -0
 		devres_release_group(&pdev->dev, NULL);
 		put_device(&pdev->dev);
Signature · 2 lines
-- 
2.34.1
#11 lore raw

Re: [PATCH v3 3/8] drm/i915/selftests: Use drm_* prints in selftest helpers

In reply to Krzysztof Karas

Hi Krzysztof,

Quoted 59 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/selftests/i915_active.c         | 12 +++++++-----
 drivers/gpu/drm/i915/selftests/igt_flush_test.c      |  7 +++++--
 drivers/gpu/drm/i915/selftests/igt_live_test.c       |  6 +++---
 drivers/gpu/drm/i915/selftests/igt_reset.c           |  5 ++++-
 .../gpu/drm/i915/selftests/intel_scheduler_helpers.c |  8 ++++++--
 drivers/gpu/drm/i915/selftests/mock_gem_device.c     |  4 +++-
 6 files changed, 28 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/selftests/i915_active.c +7 -5
index 9fea2fabeac4..79b55df1e71a 100644
@@ -115,7 +115,7 @@ __live_active_setup(struct drm_i915_private *i915)
 			err = i915_active_add_request(&active->base, rq);
 		i915_request_add(rq);
 		if (err) {
-			pr_err("Failed to track active ref!\n");
+			drm_err(&i915->drm, "Failed to track active ref!\n");
 			break;
 		}
 
@@ -124,12 +124,13 @@ __live_active_setup(struct drm_i915_private *i915)
 
 	i915_active_release(&active->base);
 	if (READ_ONCE(active->retired) && count) {
-		pr_err("i915_active retired before submission!\n");
+		drm_err(&i915->drm, "i915_active retired before submission!\n");
 		err = -EINVAL;
 	}
 	if (atomic_read(&active->base.count) != count) {
-		pr_err("i915_active not tracking all requests, found %d, expected %d\n",
-		       atomic_read(&active->base.count), count);
+		drm_err(&i915->drm,
+			"i915_active not tracking all requests, found %d, expected %d\n",
+			atomic_read(&active->base.count), count);
 		err = -EINVAL;
 	}
 
@@ -236,7 +237,8 @@ static int live_active_barrier(void *arg)
 
 	__i915_active_wait(&active->base, TASK_UNINTERRUPTIBLE);
 	if (!READ_ONCE(active->retired)) {
-		pr_err("i915_active not retired after flushing barriers!\n");
+		drm_err(&i915->drm,
+			"i915_active not retired after flushing barriers!\n");
 		err = -EINVAL;
 	}
 
drivers/gpu/drm/i915/selftests/igt_flush_test.c +0 -0
index c383d31d46b0..86164d1258c6 100644

drivers/gpu/drm/i915/selftests/igt_flush_test.c line 11

Quoted 5 lines
drivers/gpu/drm/i915/selftests/igt_flush_test.c +2 -0
@@ -7,6 +7,8 @@
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_requests.h"
 
+#include <drm/drm_print.h>
+

Same nit as in the previous patch with the drm includes going before "" i915 specific includes.

Rest LGTM to so far

Quoted 106 lines
drivers/gpu/drm/i915/selftests/igt_flush_test.c +3 -2
 #include "i915_drv.h"
 #include "i915_selftest.h"
 
@@ -35,8 +37,9 @@ int igt_flush_test(struct drm_i915_private *i915)
 
 		/* 2x longest preempt timeout, experimentally determined */
 		if (intel_gt_wait_for_idle(gt, HZ * timeout_ms / 500) == -ETIME) {
-			pr_err("%pS timed out, cancelling all further testing.\n",
-			       __builtin_return_address(0));
+			drm_err(&gt->i915->drm,
+				"%pS timed out, cancelling all further testing.\n",
+				__builtin_return_address(0));
 
 			GEM_TRACE("%pS timed out.\n",
 				  __builtin_return_address(0));
drivers/gpu/drm/i915/selftests/igt_live_test.c +3 -3
index 7d41874a49c5..c1fbd98d3164 100644
@@ -59,9 +59,9 @@ int igt_live_test_end(struct igt_live_test *t)
 		return -EIO;
 
 	if (t->reset_global != i915_reset_count(&i915->gpu_error)) {
-		pr_err("%s(%s): GPU was reset %d times!\n",
-		       t->func, t->name,
-		       i915_reset_count(&i915->gpu_error) - t->reset_global);
+		drm_err(&i915->drm, "%s(%s): GPU was reset %d times!\n",
+			t->func, t->name,
+			i915_reset_count(&i915->gpu_error) - t->reset_global);
 		return -EIO;
 	}
 
drivers/gpu/drm/i915/selftests/igt_reset.c +4 -1
index a2838c65f8a5..7902ed9ad339 100644
@@ -4,6 +4,8 @@
  * Copyright © 2018 Intel Corporation
  */
 
+#include <drm/drm_print.h>
+
 #include "igt_reset.h"
 
 #include "gt/intel_engine.h"
@@ -16,7 +18,8 @@ void igt_global_reset_lock(struct intel_gt *gt)
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
 
-	pr_debug("%s: current gpu_error=%08lx\n", __func__, gt->reset.flags);
+	drm_dbg(&gt->i915->drm, "%s: current gpu_error=%08lx\n", __func__,
+		gt->reset.flags);
 
 	while (test_and_set_bit(I915_RESET_BACKOFF, &gt->reset.flags))
 		wait_event(gt->reset.queue,
drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c +6 -2
index e14ac0ab1314..83f66fe4a9d5 100644
@@ -5,6 +5,8 @@
 
 #include <linux/jiffies.h>
 
+#include <drm/drm_print.h>
+
 //#include "gt/intel_engine_user.h"
 #include "gt/intel_gt.h"
 #include "i915_drv.h"
@@ -24,7 +26,7 @@ struct intel_engine_cs *intel_selftest_find_any_engine(struct intel_gt *gt)
 	for_each_engine(engine, gt, id)
 		return engine;
 
-	pr_err("No valid engine found!\n");
+	drm_err(&gt->i915->drm, "No valid engine found!\n");
 	return NULL;
 }
 
@@ -60,7 +62,9 @@ int intel_selftest_modify_policy(struct intel_engine_cs *engine,
 		break;
 
 	default:
-		pr_err("Invalid scheduler policy modification type: %d!\n", modify_type);
+		drm_err(&engine->i915->drm,
+			"Invalid scheduler policy modification type: %d!\n",
+			modify_type);
 		return -EINVAL;
 	}
 
drivers/gpu/drm/i915/selftests/mock_gem_device.c +3 -1
index 796c9b070e41..c0dadcd961bb 100644
@@ -169,7 +169,9 @@ struct drm_i915_private *mock_gem_device(void)
 	i915 = devm_drm_dev_alloc(&pdev->dev, &mock_driver,
 				  struct drm_i915_private, drm);
 	if (IS_ERR(i915)) {
-		pr_err("Failed to allocate mock GEM device: err=%ld\n", PTR_ERR(i915));
+		dev_err(&pdev->dev,
+			"Failed to allocate mock GEM device: err=%ld\n",
+			PTR_ERR(i915));
 		devres_release_group(&pdev->dev, NULL);
 		put_device(&pdev->dev);
 
Signature · 1 line
2.34.1
#12 lore raw

PATCH v3 4/8 drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

In reply to Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/gt/selftest_context.c    |  33 +-
 drivers/gpu/drm/i915/gt/selftest_engine_cs.c  |   8 +-
 drivers/gpu/drm/i915/gt/selftest_engine_pm.c  |  58 +--
 drivers/gpu/drm/i915/gt/selftest_execlists.c  | 353 +++++++++++-------
 drivers/gpu/drm/i915/gt/selftest_gt_pm.c      |  32 +-
 drivers/gpu/drm/i915/gt/selftest_migrate.c    |  65 ++--
 drivers/gpu/drm/i915/gt/selftest_mocs.c       |  12 +-
 drivers/gpu/drm/i915/gt/selftest_reset.c      |  28 +-
 drivers/gpu/drm/i915/gt/selftest_slpc.c       | 103 +++--
 drivers/gpu/drm/i915/gt/selftest_tlb.c        |  39 +-
 .../gpu/drm/i915/gt/selftest_workarounds.c    | 104 ++++--
 11 files changed, 513 insertions(+), 322 deletions(-)
drivers/gpu/drm/i915/gt/selftest_context.c +20 -13
index ab76703f6e8b..d9d279991eda 100644
@@ -136,7 +136,9 @@ static int __live_context_size(struct intel_engine_cs *engine)
 		goto err_unpin;
 
 	if (memchr_inv(vaddr, POISON_INUSE, I915_GTT_PAGE_SIZE)) {
-		pr_err("%s context overwrote trailing red-zone!", engine->name);
+		drm_err(&engine->i915->drm,
+			"%s context overwrote trailing red-zone!",
+			engine->name);
 		err = -EINVAL;
 	}
 
@@ -196,6 +198,7 @@ static int live_context_size(void *arg)
 
 static int __live_active_context(struct intel_engine_cs *engine)
 {
+	struct drm_i915_private *i915 = engine->i915;
 	unsigned long saved_heartbeat;
 	struct intel_context *ce;
 	int pass;
@@ -221,8 +224,8 @@ static int __live_active_context(struct intel_engine_cs *engine)
 		return 0;
 
 	if (intel_engine_pm_is_awake(engine)) {
-		pr_err("%s is awake before starting %s!\n",
-		       engine->name, __func__);
+		drm_err(&i915->drm, "%s is awake before starting %s!\n",
+			engine->name, __func__);
 		return -EINVAL;
 	}
 
@@ -250,15 +253,17 @@ static int __live_active_context(struct intel_engine_cs *engine)
 
 		/* Context will be kept active until after an idle-barrier. */
 		if (i915_active_is_idle(&ce->active)) {
-			pr_err("context is not active; expected idle-barrier (%s pass %d)\n",
-			       engine->name, pass);
+			drm_err(&i915->drm,
+				"context is not active; expected idle-barrier (%s pass %d)\n",
+				engine->name, pass);
 			err = -EINVAL;
 			goto out_engine;
 		}
 
 		if (!intel_engine_pm_is_awake(engine)) {
-			pr_err("%s is asleep before idle-barrier\n",
-			       engine->name);
+			drm_err(&i915->drm,
+				"%s is asleep before idle-barrier\n",
+				engine->name);
 			err = -EINVAL;
 			goto out_engine;
 		}
@@ -280,14 +285,14 @@ static int __live_active_context(struct intel_engine_cs *engine)
 		goto err;
 
 	if (!i915_active_is_idle(&ce->active)) {
-		pr_err("context is still active!");
+		drm_err(&i915->drm, "context is still active!");
 		err = -EINVAL;
 	}
 
 	intel_engine_pm_flush(engine);
 
 	if (intel_engine_pm_is_awake(engine)) {
-		struct drm_printer p = drm_dbg_printer(&engine->i915->drm,
+		struct drm_printer p = drm_dbg_printer(&i915->drm,
 						       DRM_UT_DRIVER, NULL);
 
 		intel_engine_dump(engine, &p,
@@ -356,6 +361,7 @@ static int __remote_sync(struct intel_context *ce, struct intel_context *remote)
 
 static int __live_remote_context(struct intel_engine_cs *engine)
 {
+	struct drm_i915_private *i915 = engine->i915;
 	struct intel_context *local, *remote;
 	unsigned long saved_heartbeat;
 	int pass;
@@ -374,8 +380,8 @@ static int __live_remote_context(struct intel_engine_cs *engine)
 		return 0;
 
 	if (intel_engine_pm_is_awake(engine)) {
-		pr_err("%s is awake before starting %s!\n",
-		       engine->name, __func__);
+		drm_err(&i915->drm, "%s is awake before starting %s!\n",
+			engine->name, __func__);
 		return -EINVAL;
 	}
 
@@ -403,8 +409,9 @@ static int __live_remote_context(struct intel_engine_cs *engine)
 			break;
 
 		if (i915_active_is_idle(&remote->active)) {
-			pr_err("remote context is not active; expected idle-barrier (%s pass %d)\n",
-			       engine->name, pass);
+			drm_err(&i915->drm,
+				"remote context is not active; expected idle-barrier (%s pass %d)\n",
+				engine->name, pass);
 			err = -EINVAL;
 			break;
 		}
drivers/gpu/drm/i915/gt/selftest_engine_cs.c +4 -4
index 5ffa5e30f419..28c019547b34 100644
@@ -207,8 +207,8 @@ static int perf_mi_bb_start(void *arg)
 		if (err)
 			break;
 
-		pr_info("%s: MI_BB_START cycles: %u\n",
-			engine->name, trifilter(cycles));
+		drm_info(&gt->i915->drm, "%s: MI_BB_START cycles: %u\n",
+			 engine->name, trifilter(cycles));
 	}
 	if (perf_end(gt, wakeref))
 		err = -EIO;
@@ -365,8 +365,8 @@ static int perf_mi_noop(void *arg)
 		if (err)
 			break;
 
-		pr_info("%s: 16K MI_NOOP cycles: %u\n",
-			engine->name, trifilter(cycles));
+		drm_info(&gt->i915->drm, "%s: 16K MI_NOOP cycles: %u\n",
+			 engine->name, trifilter(cycles));
 	}
 	if (perf_end(gt, wakeref))
 		err = -EIO;
drivers/gpu/drm/i915/gt/selftest_engine_pm.c +36 -22

139 lines not on this page · raw message

drivers/gpu/drm/i915/gt/selftest_execlists.c +212 -141

826 lines not on this page · raw message

drivers/gpu/drm/i915/gt/selftest_gt_pm.c +21 -11
index 07eaf71955c4..4e583fcb1cf9 100644
@@ -5,6 +5,8 @@
 
 #include <linux/sort.h>
 
+#include <drm/drm_print.h>
+
 #include "intel_engine_regs.h"
 #include "intel_gt_clock_utils.h"
 
@@ -79,13 +81,14 @@ static void measure_clocks(struct intel_engine_cs *engine,
 static int live_gt_clocks(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
 	intel_wakeref_t wakeref;
 	int err = 0;
 
 	if (!gt->clock_frequency) { /* unknown */
-		pr_info("CS_TIMESTAMP frequency unknown\n");
+		drm_info(&i915->drm, "CS_TIMESTAMP frequency unknown\n");
 		return 0;
 	}
 
@@ -109,20 +112,23 @@ static int live_gt_clocks(void *arg)
 		time = intel_gt_clock_interval_to_ns(engine->gt, cycles);
 		expected = intel_gt_ns_to_clock_interval(engine->gt, dt);
 
-		pr_info("%s: TIMESTAMP %d cycles [%lldns] in %lldns [%d cycles], using CS clock frequency of %uKHz\n",
-			engine->name, cycles, time, dt, expected,
-			engine->gt->clock_frequency / 1000);
+		drm_info(&i915->drm,
+			 "%s: TIMESTAMP %d cycles [%lldns] in %lldns [%d cycles], using CS clock frequency of %uKHz\n",
+			 engine->name, cycles, time, dt, expected,
+			 engine->gt->clock_frequency / 1000);
 
 		if (9 * time < 8 * dt || 8 * time > 9 * dt) {
-			pr_err("%s: CS ticks did not match walltime!\n",
-			       engine->name);
+			drm_err(&i915->drm,
+				"%s: CS ticks did not match walltime!\n",
+				engine->name);
 			err = -EINVAL;
 			break;
 		}
 
 		if (9 * expected < 8 * cycles || 8 * expected > 9 * cycles) {
-			pr_err("%s: walltime did not match CS ticks!\n",
-			       engine->name);
+			drm_err(&i915->drm,
+				"%s: walltime did not match CS ticks!\n",
+				engine->name);
 			err = -EINVAL;
 			break;
 		}
@@ -137,6 +143,7 @@ static int live_gt_clocks(void *arg)
 static int live_gt_resume(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	IGT_TIMEOUT(end_time);
 	int err;
 
@@ -146,7 +153,8 @@ static int live_gt_resume(void *arg)
 		intel_gt_suspend_late(gt);
 
 		if (gt->rc6.enabled) {
-			pr_err("rc6 still enabled after suspend!\n");
+			drm_err(&i915->drm,
+				"rc6 still enabled after suspend!\n");
 			intel_gt_set_wedged_on_init(gt);
 			err = -EINVAL;
 			break;
@@ -157,7 +165,8 @@ static int live_gt_resume(void *arg)
 			break;
 
 		if (gt->rc6.supported && !gt->rc6.enabled) {
-			pr_err("rc6 not enabled upon resume!\n");
+			drm_err(&i915->drm,
+				"rc6 not enabled upon resume!\n");
 			intel_gt_set_wedged_on_init(gt);
 			err = -EINVAL;
 			break;
@@ -165,7 +174,8 @@ static int live_gt_resume(void *arg)
 
 		err = st_llc_verify(&gt->llc);
 		if (err) {
-			pr_err("llc state not restored upon resume!\n");
+			drm_err(&i915->drm,
+				"llc state not restored upon resume!\n");
 			intel_gt_set_wedged_on_init(gt);
 			break;
 		}
drivers/gpu/drm/i915/gt/selftest_migrate.c +38 -27

155 lines not on this page · raw message

drivers/gpu/drm/i915/gt/selftest_mocs.c +8 -4
index d73e438fb85f..770516c6c7da 100644
@@ -13,6 +13,8 @@
 #include "selftests/igt_spinner.h"
 #include "selftests/intel_scheduler_helpers.h"
 
+#include <drm/drm_print.h>
+
 struct live_mocs {
 	struct drm_i915_mocs_table table;
 	struct drm_i915_mocs_table *mocs;
@@ -169,8 +171,9 @@ static int check_mocs_table(struct intel_engine_cs *engine,
 
 	for_each_mocs(expect, table, i) {
 		if (**vaddr != expect) {
-			pr_err("%s: Invalid MOCS[%d] entry, found %08x, expected %08x\n",
-			       engine->name, i, **vaddr, expect);
+			drm_err(&engine->i915->drm,
+				"%s: Invalid MOCS[%d] entry, found %08x, expected %08x\n",
+				engine->name, i, **vaddr, expect);
 			return -EINVAL;
 		}
 		++*vaddr;
@@ -203,8 +206,9 @@ static int check_l3cc_table(struct intel_engine_cs *engine,
 
 	for_each_l3cc(expect, table, i) {
 		if (!mcr_range(engine->i915, reg) && **vaddr != expect) {
-			pr_err("%s: Invalid L3CC[%d] entry, found %08x, expected %08x\n",
-			       engine->name, i, **vaddr, expect);
+			drm_err(&engine->i915->drm,
+				"%s: Invalid L3CC[%d] entry, found %08x, expected %08x\n",
+				engine->name, i, **vaddr, expect);
 			return -EINVAL;
 		}
 		++*vaddr;
drivers/gpu/drm/i915/gt/selftest_reset.c +18 -10
index 2cfc23c58e90..938218e0d5bc 100644
@@ -14,11 +14,14 @@
 #include "selftests/igt_atomic.h"
 #include "selftests/igt_spinner.h"
 
+#include <drm/drm_print.h>
+
 static int
 __igt_reset_stolen(struct intel_gt *gt,
 		   intel_engine_mask_t mask,
 		   const char *msg)
 {
+	struct drm_i915_private *i915 = gt->i915;
 	struct i915_ggtt *ggtt = gt->ggtt;
 	const struct resource *dsm = &gt->i915->dsm.stolen;
 	resource_size_t num_pages, page;
@@ -147,8 +150,9 @@ __igt_reset_stolen(struct intel_gt *gt,
 		    !__drm_mm_interval_first(&gt->i915->mm.stolen,
 					     page << PAGE_SHIFT,
 					     ((page + 1) << PAGE_SHIFT) - 1)) {
-			pr_debug("unused stolen page %pa modified by GPU reset\n",
-				 &page);
+			drm_dbg(&i915->drm,
+				"unused stolen page %pa modified by GPU reset\n",
+				&page);
 			if (count++ == 0)
 				igt_hexdump(in, PAGE_SIZE);
 			max = page;
@@ -160,12 +164,14 @@ __igt_reset_stolen(struct intel_gt *gt,
 	ggtt->vm.clear_range(&ggtt->vm, ggtt->error_capture.start, PAGE_SIZE);
 
 	if (count > 0) {
-		pr_info("%s reset clobbered %ld pages of stolen, last clobber at page %ld\n",
-			msg, count, max);
+		drm_info(&i915->drm,
+			 "%s reset clobbered %ld pages of stolen, last clobber at page %ld\n",
+			 msg, count, max);
 	}
 	if (max >= I915_GEM_STOLEN_BIAS >> PAGE_SHIFT) {
-		pr_err("%s reset clobbered unreserved area [above %x] of stolen; may cause severe faults\n",
-		       msg, I915_GEM_STOLEN_BIAS);
+		drm_err(&i915->drm,
+			"%s reset clobbered unreserved area [above %x] of stolen; may cause severe faults\n",
+			msg, I915_GEM_STOLEN_BIAS);
 		err = -EINVAL;
 	}
 
@@ -223,7 +229,7 @@ static int igt_global_reset(void *arg)
 	intel_gt_reset(gt, ALL_ENGINES, NULL);
 
 	if (i915_reset_count(&gt->i915->gpu_error) == reset_count) {
-		pr_err("No GPU reset recorded!\n");
+		drm_err(&gt->i915->drm, "No GPU reset recorded!\n");
 		err = -EINVAL;
 	}
 
@@ -287,7 +293,8 @@ static int igt_atomic_reset(void *arg)
 		reset_finish(gt, awake);
 
 		if (err) {
-			pr_err("__intel_gt_reset failed under %s\n", p->name);
+			drm_err(&gt->i915->drm,
+				"__intel_gt_reset failed under %s\n", p->name);
 			break;
 		}
 	}
@@ -347,8 +354,9 @@ static int igt_atomic_engine_reset(void *arg)
 				local_bh_enable();
 
 			if (err) {
-				pr_err("intel_engine_reset(%s) failed under %s\n",
-				       engine->name, p->name);
+				drm_err(&engine->i915->drm,
+					"intel_engine_reset(%s) failed under %s\n",
+					engine->name, p->name);
 				break;
 			}
 		}
drivers/gpu/drm/i915/gt/selftest_slpc.c +67 -36

265 lines not on this page · raw message

drivers/gpu/drm/i915/gt/selftest_tlb.c +24 -15
index a5184f09d1de..89420f07f681 100644
@@ -20,6 +20,8 @@
 #include "selftests/igt_flush_test.h"
 #include "selftests/i915_random.h"
 
+#include <drm/drm_print.h>
+
 static void vma_set_qw(struct i915_vma *vma, u64 addr, u64 val)
 {
 	GEM_BUG_ON(addr < i915_vma_offset(vma));
@@ -39,6 +41,7 @@ pte_tlbinv(struct intel_context *ce,
 {
 	const unsigned int pat_index =
 		i915_gem_get_pat_index(ce->vm->i915, I915_CACHE_NONE);
+	struct drm_i915_private *i915 = ce->engine->i915;
 	struct drm_i915_gem_object *batch;
 	struct drm_mm_node vb_node;
 	struct i915_request *rq;
@@ -68,7 +71,8 @@ pte_tlbinv(struct intel_context *ce,
 				 va->size, align);
 	err = i915_vma_pin(va,  0, 0, addr | PIN_OFFSET_FIXED | PIN_USER);
 	if (err) {
-		pr_err("Cannot pin at %llx+%llx\n", addr, va->size);
+		drm_err(&i915->drm, "Cannot pin at %llx+%llx\n",
+			addr, va->size);
 		goto out;
 	}
 	GEM_BUG_ON(i915_vma_offset(va) != addr);
@@ -91,11 +95,12 @@ pte_tlbinv(struct intel_context *ce,
 	addr = igt_random_offset(prng, addr, addr + align, 8, 8);
 
 	if (va != vb)
-		pr_info("%s(%s): Sampling %llx, with alignment %llx, using PTE size %x (phys %x, sg %x), invalidate:%llx+%llx\n",
-			ce->engine->name, va->obj->mm.region->name ?: "smem",
-			addr, align, va->resource->page_sizes_gtt,
-			va->page_sizes.phys, va->page_sizes.sg,
-			addr & -length, length);
+		drm_info(&i915->drm,
+			 "%s(%s): Sampling %llx, with alignment %llx, using PTE size %x (phys %x, sg %x), invalidate:%llx+%llx\n",
+			 ce->engine->name, va->obj->mm.region->name ?: "smem",
+			 addr, align, va->resource->page_sizes_gtt,
+			 va->page_sizes.phys, va->page_sizes.sg,
+			 addr & -length, length);
 
 	cs = i915_gem_object_pin_map_unlocked(batch, I915_MAP_WC);
 	*cs++ = MI_NOOP; /* for later termination */
@@ -147,10 +152,12 @@ pte_tlbinv(struct intel_context *ce,
 
 	if (va == vb) {
 		if (!i915_request_completed(rq)) {
-			pr_err("%s(%s): Semaphore sanitycheck failed %llx, with alignment %llx, using PTE size %x (phys %x, sg %x)\n",
-			       ce->engine->name, va->obj->mm.region->name ?: "smem",
-			       addr, align, va->resource->page_sizes_gtt,
-			       va->page_sizes.phys, va->page_sizes.sg);
+			drm_err(&i915->drm,
+				"%s(%s): Semaphore sanitycheck failed %llx, with alignment %llx, using PTE size %x (phys %x, sg %x)\n",
+				ce->engine->name,
+				va->obj->mm.region->name ?: "smem", addr, align,
+				va->resource->page_sizes_gtt,
+				va->page_sizes.phys, va->page_sizes.sg);
 			err = -EIO;
 		}
 	} else if (!i915_request_completed(rq)) {
@@ -171,12 +178,13 @@ pte_tlbinv(struct intel_context *ce,
 		tlbinv(ce->vm, addr & -length, length);
 
 		if (wait_for(i915_request_completed(rq), HZ / 2)) {
-			pr_err("%s: Request did not complete; the COND_BBE did not read the updated PTE\n",
-			       ce->engine->name);
+			drm_err(&i915->drm,
+				"%s: Request did not complete; the COND_BBE did not read the updated PTE\n",
+				ce->engine->name);
 			err = -EINVAL;
 		}
 	} else {
-		pr_err("Spinner ended unexpectedly\n");
+		drm_err(&i915->drm, "Spinner ended unexpectedly\n");
 		err = -EIO;
 	}
 	i915_request_put(rq);
@@ -271,8 +279,9 @@ mem_tlbinv(struct intel_gt *gt,
 
 	GEM_BUG_ON(A->base.size != B->base.size);
 	if ((A->mm.page_sizes.phys | B->mm.page_sizes.phys) & (A->base.size - 1))
-		pr_warn("Failed to allocate contiguous pages for size %zx\n",
-			A->base.size);
+		drm_warn(&gt->i915->drm,
+			 "Failed to allocate contiguous pages for size %zx\n",
+			 A->base.size);
 
 	ppgtt = i915_ppgtt_create(gt, 0);
 	if (IS_ERR(ppgtt)) {
drivers/gpu/drm/i915/gt/selftest_workarounds.c +65 -39

256 lines not on this page · raw message

Signature · 1 line
2.34.1
#13 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

Hi Krzysztof,

Quoted 4 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5

what a ride!

While reviewing everything I was thinking whether it would make sense to add an i915_err() like xe and gt.

...

drivers/gpu/drm/i915/gt/selftest_migrate.c static void spinner_kill(struct timer_list *timer) · line 554

Quoted 6 lines
drivers/gpu/drm/i915/gt/selftest_migrate.c +1 -1
@@ -540,7 +551,7 @@ static void spinner_kill(struct timer_list *timer)
 	struct spinner_timer *st = timer_container_of(st, timer, timer);
 
 	igt_spinner_end(&st->spin);
-	pr_info("%s\n", __func__);
+	drm_info(st->spin.hws->base.dev, "killing spinner\n");

considering that you kept the __func__ reference everywhere else, you could have also kept it here. I like that you have added a message, though.

As you are going to resend, anyway, please fix this little nit.

Quoted 1 line
(quoted diff) +0 -0
 }

...

drivers/gpu/drm/i915/gt/selftest_migrate.c static int __perf_copy_blt(struct intel_context *ce, · line 978

Quoted 7 lines
drivers/gpu/drm/i915/gt/selftest_migrate.c +1 -5
 	sort(t, ARRAY_SIZE(t), sizeof(*t), wrap_ktime_compare, NULL);
-	pr_info("%s: %zd KiB copy: %lld MiB/s\n",
-		ce->engine->name, sz >> 10,
-		div64_u64(mul_u32_u32(4 * sz,
-				      1000 * 1000 * 1000),
-			  t[1] + 2 * t[2] + t[3]) >> 20);
+	drm_info(&ce->engine->i915->drm, "%s: %zd KiB copy: %lld MiB/s\n",

Not a binding comment: rq->i915 would have made it a bit shorter.

Quoted 5 lines
drivers/gpu/drm/i915/gt/selftest_migrate.c +3 -0
+		 ce->engine->name, sz >> 10,
+		 div64_u64(mul_u32_u32(4 * sz, 1000 * 1000 * 1000),
+			   t[1] + 2 * t[2] + t[3]) >> 20);
 	return 0;
 }

...

drivers/gpu/drm/i915/gt/selftest_workarounds.c live_gpu_reset_workarounds(void *arg) · line 1234

Quoted 6 lines
drivers/gpu/drm/i915/gt/selftest_workarounds.c +1 -1
@@ -1211,7 +1231,7 @@ live_gpu_reset_workarounds(void *arg)
 	if (!lists)
 		return -ENOMEM;
 
-	pr_info("Verifying after GPU reset...\n");
+	drm_info(&gt->i915->drm, "Verifying after GPU reset...\n");

I'm thinking whether it's better to use gt_info() when we have the gt reference.

Andi

Quoted 3 lines
drivers/gpu/drm/i915/gt/selftest_workarounds.c +0 -0
 	igt_global_reset_lock(gt);
 	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
#14 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

Hi Andi,

Quoted 6 lines · Andi Shyti

Hi Krzysztof,

Quoted 3 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Quoted 6 lines
Quoted 1 line
Assisted-by GitHub-Copilot:claude-opus-5

what a ride!

While reviewing everything I was thinking whether it would make sense to add an i915_err() like xe and gt.

The idea makes sense, the question is when to introduce this macro. I have the v4 pretty much ready to send, apart from a few minor issues I have to fix, but I am not against modifying it to accomodate i915_* family of prints.
If we agreed on this, then we'd have this new macro ready when we'd be replacing pr_* prints in other parts of the driver.

I think it would be worth to keep the series in the oven for a few more days, especially when it is not that critical of a change. What do you think?

Quoted 14 lines

...

drivers/gpu/drm/i915/gt/selftest_migrate.c static void spinner_kill(struct timer_list *timer) · line 554

Quoted 6 lines
drivers/gpu/drm/i915/gt/selftest_migrate.c +1 -1
@@ -540,7 +551,7 @@ static void spinner_kill(struct timer_list *timer)
 	struct spinner_timer *st = timer_container_of(st, timer, timer);
 
 	igt_spinner_end(&st->spin);
-	pr_info("%s\n", __func__);
+	drm_info(st->spin.hws->base.dev, "killing spinner\n");

considering that you kept the __func__ reference everywhere else, you could have also kept it here. I like that you have added a message, though.

Quoted 1 line

As you are going to resend, anyway, please fix this little nit.

Roger that.

Quoted 27 lines
Quoted 2 lines
(quoted diff) +0 -0
 }

...

drivers/gpu/drm/i915/gt/selftest_migrate.c static int __perf_copy_blt(struct intel_context *ce, · line 978

Quoted 7 lines
drivers/gpu/drm/i915/gt/selftest_migrate.c +1 -5
 	sort(t, ARRAY_SIZE(t), sizeof(*t), wrap_ktime_compare, NULL);
-	pr_info("%s: %zd KiB copy: %lld MiB/s\n",
-		ce->engine->name, sz >> 10,
-		div64_u64(mul_u32_u32(4 * sz,
-				      1000 * 1000 * 1000),
-			  t[1] + 2 * t[2] + t[3]) >> 20);
+	drm_info(&ce->engine->i915->drm, "%s: %zd KiB copy: %lld MiB/s\n",

Not a binding comment: rq->i915 would have made it a bit shorter.

Quoted 5 lines
drivers/gpu/drm/i915/gt/selftest_migrate.c +3 -0
+		 ce->engine->name, sz >> 10,
+		 div64_u64(mul_u32_u32(4 * sz, 1000 * 1000 * 1000),
+			   t[1] + 2 * t[2] + t[3]) >> 20);
 	return 0;
 }

...

Quoted 4 lines
drivers/gpu/drm/i915/gt/selftest_workarounds.c +0 -0
@@ -1211,7 +1231,7 @@ live_gpu_reset_workarounds(void *arg)
 	if (!lists)
 		return -ENOMEM;
 
Quoted 5 lines

drivers/gpu/drm/i915/gt/selftest_workarounds.c live_gpu_reset_workarounds(void *arg) · line 1234

Quoted 2 lines
drivers/gpu/drm/i915/gt/selftest_workarounds.c +1 -1
-	pr_info("Verifying after GPU reset...\n");
+	drm_info(&gt->i915->drm, "Verifying after GPU reset...\n");

I'm thinking whether it's better to use gt_info() when we have the gt reference.

Sure.

Quoted 6 lines

Andi

Quoted 3 lines
drivers/gpu/drm/i915/gt/selftest_workarounds.c +0 -0
 	igt_global_reset_lock(gt);
 	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
Signature · 2 lines
Best Regards,
Krzysztof
#15 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

Hi Krzysztof,

Quoted 22 lines · Krzysztof Karas

Hi Andi,

Quoted 6 lines · Andi Shyti

Hi Krzysztof,

Quoted 3 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Quoted 6 lines
Quoted 1 line
Assisted-by GitHub-Copilot:claude-opus-5

what a ride!

While reviewing everything I was thinking whether it would make sense to add an i915_err() like xe and gt.

The idea makes sense, the question is when to introduce this macro. I have the v4 pretty much ready to send, apart from a few minor issues I have to fix, but I am not against modifying it to accomodate i915_* family of prints.
If we agreed on this, then we'd have this new macro ready when we'd be replacing pr_* prints in other parts of the driver.

Quoted 3 lines

I think it would be worth to keep the series in the oven for a few more days, especially when it is not that critical of a change. What do you think?

yes, i915_* can come later, of course, it's out of the scope of this series.

Andi

#16 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

Hi Andi,

Quoted 25 lines · Andi Shyti

Hi Krzysztof,

Quoted 22 lines · Krzysztof Karas

Hi Andi,

Quoted 6 lines · Andi Shyti

Hi Krzysztof,

Quoted 3 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Quoted 6 lines
Quoted 1 line
Assisted-by GitHub-Copilot:claude-opus-5

what a ride!

While reviewing everything I was thinking whether it would make sense to add an i915_err() like xe and gt.

The idea makes sense, the question is when to introduce this macro. I have the v4 pretty much ready to send, apart from a few minor issues I have to fix, but I am not against modifying it to accomodate i915_* family of prints.
If we agreed on this, then we'd have this new macro ready when we'd be replacing pr_* prints in other parts of the driver.

Quoted 8 lines
Quoted 3 lines

I think it would be worth to keep the series in the oven for a few more days, especially when it is not that critical of a change. What do you think?

yes, i915_* can come later, of course, it's out of the scope of this series.

Andi

I checked again and again these past two weeks for your reply and none came into my inbox, only for me to notice today that it was finally pulled by my mailer client recently. I posted another version of this series, because I was under the impression that silence meant I should introduce the i915_* prints. That version was met with disapproval from Jani as well, so please just ignore v4.
Sorry for the spam.

Signature · 2 lines
Best Regards,
Krzysztof
#17 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

Hi Krzysztof,

Quoted 29 lines · Krzysztof Karas
Quoted 19 lines · Andi Shyti
Quoted 18 lines · Krzysztof Karas
Quoted 10 lines · Andi Shyti
Quoted 4 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5

what a ride!

While reviewing everything I was thinking whether it would make sense to add an i915_err() like xe and gt.

The idea makes sense, the question is when to introduce this macro. I have the v4 pretty much ready to send, apart from a few minor issues I have to fix, but I am not against modifying it to accomodate i915_* family of prints.
If we agreed on this, then we'd have this new macro ready when we'd be replacing pr_* prints in other parts of the driver.

Quoted 8 lines
Quoted 3 lines

I think it would be worth to keep the series in the oven for a few more days, especially when it is not that critical of a change. What do you think?

yes, i915_* can come later, of course, it's out of the scope of this series.

Andi

Quoted 8 lines

I checked again and again these past two weeks for your reply and none came into my inbox, only for me to notice today that it was finally pulled by my mailer client recently. I posted another version of this series, because I was under the impression that silence meant I should introduce the i915_* prints. That version was met with disapproval from Jani as well, so please just ignore v4.
Sorry for the spam.

it's also true that I haven't been very active in reviews lately.

Are you now preparing a v5?

Andi

#18 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

Hi Andi,

Quoted 41 lines · Andi Shyti

Hi Krzysztof,

Quoted 29 lines · Krzysztof Karas
Quoted 19 lines · Andi Shyti
Quoted 18 lines · Krzysztof Karas
Quoted 10 lines · Andi Shyti
Quoted 4 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5

what a ride!

While reviewing everything I was thinking whether it would make sense to add an i915_err() like xe and gt.

The idea makes sense, the question is when to introduce this macro. I have the v4 pretty much ready to send, apart from a few minor issues I have to fix, but I am not against modifying it to accomodate i915_* family of prints.
If we agreed on this, then we'd have this new macro ready when we'd be replacing pr_* prints in other parts of the driver.

Quoted 8 lines
Quoted 3 lines

I think it would be worth to keep the series in the oven for a few more days, especially when it is not that critical of a change. What do you think?

yes, i915_* can come later, of course, it's out of the scope of this series.

Andi

Quoted 8 lines

I checked again and again these past two weeks for your reply and none came into my inbox, only for me to notice today that it was finally pulled by my mailer client recently. I posted another version of this series, because I was under the impression that silence meant I should introduce the i915_* prints. That version was met with disapproval from Jani as well, so please just ignore v4.
Sorry for the spam.

Quoted 3 lines

it's also true that I haven't been very active in reviews lately.

Are you now preparing a v5?

Truth be told, I prepared two versions simultaneously while waiting for reviews on v3: one with and one without i915_* prints, both addressing earlier reviews. I updated the local version without i915_*, so it is pretty much ready to send, just need to run final checks.

Quoted 2 lines

Andi

Signature · 2 lines
Best Regards,
Krzysztof
#19 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

Hi Krzysztof,

Quoted 27 lines
Quoted 27 lines
Quoted 26 lines
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

While reviewing everything I was thinking whether it would make sense to add an i915_err() like xe and gt.

The idea makes sense, the question is when to introduce this macro. I have the v4 pretty much ready to send, apart from a few minor issues I have to fix, but I am not against modifying it to accomodate i915_* family of prints.
If we agreed on this, then we'd have this new macro ready when we'd be replacing pr_* prints in other parts of the driver.

Quoted 8 lines
Quoted 3 lines

I think it would be worth to keep the series in the oven for a few more days, especially when it is not that critical of a change. What do you think?

yes, i915_* can come later, of course, it's out of the scope of this series.

Andi

I checked again and again these past two weeks for your reply and none came into my inbox, only for me to notice today that it was finally pulled by my mailer client recently. I posted another version of this series, because I was under the impression that silence meant I should introduce the i915_* prints. That version was met with disapproval from Jani as well, so please just ignore v4.
Sorry for the spam.

Quoted 8 lines
Quoted 3 lines

it's also true that I haven't been very active in reviews lately.

Are you now preparing a v5?

Truth be told, I prepared two versions simultaneously while waiting for reviews on v3: one with and one without i915_* prints, both addressing earlier reviews. I updated the local version without i915_*, so it is pretty much ready to send, just need to run final checks.

cool! I'll wait for the v5, then :-)

Andi

#20 lore raw

Re: [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests

In reply to Krzysztof Karas

Hi Krzysztof,

Quoted 19 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/gt/selftest_context.c    |  33 +-
 drivers/gpu/drm/i915/gt/selftest_engine_cs.c  |   8 +-
 drivers/gpu/drm/i915/gt/selftest_engine_pm.c  |  58 +--
 drivers/gpu/drm/i915/gt/selftest_execlists.c  | 353 +++++++++++-------
 drivers/gpu/drm/i915/gt/selftest_gt_pm.c      |  32 +-
 drivers/gpu/drm/i915/gt/selftest_migrate.c    |  65 ++--
 drivers/gpu/drm/i915/gt/selftest_mocs.c       |  12 +-
 drivers/gpu/drm/i915/gt/selftest_reset.c      |  28 +-
 drivers/gpu/drm/i915/gt/selftest_slpc.c       | 103 +++--
 drivers/gpu/drm/i915/gt/selftest_tlb.c        |  39 +-
 .../gpu/drm/i915/gt/selftest_workarounds.c    | 104 ++++--
 11 files changed, 513 insertions(+), 322 deletions(-)

<snip>

Quoted 55 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +9 -11
index 21e5ed9f72a3..97dc44cf615f 100644
@@ -72,6 +72,8 @@ static int wait_for_reset(struct intel_engine_cs *engine,
 			  struct i915_request *rq,
 			  unsigned long timeout)
 {
+	struct drm_i915_private *i915 = engine->i915;
+
 	timeout += jiffies;
 
 	do {
@@ -89,20 +91,18 @@ static int wait_for_reset(struct intel_engine_cs *engine,
 	} while (time_before(jiffies, timeout));
 
 	if (rq->fence.error != -EIO) {
-		pr_err("%s: hanging request %llx:%lld not reset\n",
-		       engine->name,
-		       rq->fence.context,
-		       rq->fence.seqno);
+		drm_err(&i915->drm,
+			"%s: hanging request %llx:%lld not reset\n",
+			engine->name, rq->fence.context, rq->fence.seqno);
 		return -EINVAL;
 	}
 
 	/* Give the request a jiffy to complete after flushing the worker */
 	if (i915_request_wait(rq, 0,
 			      max(0l, (long)(timeout - jiffies)) + 1) < 0) {
-		pr_err("%s: hanging request %llx:%lld did not complete\n",
-		       engine->name,
-		       rq->fence.context,
-		       rq->fence.seqno);
+		drm_err(&i915->drm,
+			"%s: hanging request %llx:%lld did not complete\n",
+			engine->name, rq->fence.context, rq->fence.seqno);
 		return -ETIME;
 	}
 
@@ -328,6 +328,7 @@ static int live_unlite_preempt(void *arg)
 static int live_unlite_ring(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct intel_engine_cs *engine;
 	struct igt_spinner spin;
 	enum intel_engine_id id;
@@ -419,12 +420,10 @@ static int live_unlite_ring(void *arg)
 			n++;
 		}
 		intel_engine_flush_submission(engine);
-		pr_debug("%s: Filled ring with %d nop tails {size:%x, tail:%x, emit:%x, rq.tail:%x}\n",
-			 engine->name, n,
-			 ce[0]->ring->size,

drivers/gpu/drm/i915/gt/selftest_execlists.c static int live_unlite_ring(void *arg) · line 429

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +4 -3
-			 ce[0]->ring->tail,
-			 ce[0]->ring->emit,
-			 rq->tail);
+		drm_dbg(&i915->drm,
+			"%s: Filled ring with %d nop tails {size:%x, tail:%x, emit:%x, rq.tail:%x}\n",
+			engine->name, n, ce[0]->ring->size, ce[0]->ring->tail,
+			ce[0]->ring->emit, rq->tail);
 		GEM_BUG_ON(intel_ring_direction(ce[0]->ring,
 						rq->tail,
 						ce[0]->ring->tail) <= 0);

Here...

Quoted 11 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +3 -2
@@ -444,15 +443,16 @@ static int live_unlite_ring(void *arg)
 		err = wait_for_submit(engine, rq, HZ / 2);
 		i915_request_put(rq);
 		if (err) {
-			pr_err("%s: preemption request was not submitted\n",
-			       engine->name);
+			drm_err(&i915->drm,
+				"%s: preemption request was not submitted\n",
+				engine->name);
 			err = -ETIME;
 		}

drivers/gpu/drm/i915/gt/selftest_execlists.c static int live_unlite_ring(void *arg) · line 456

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +4 -4
 
-		pr_debug("%s: ring[0]:{ tail:%x, emit:%x }, ring[1]:{ tail:%x, emit:%x }\n",
-			 engine->name,
-			 ce[0]->ring->tail, ce[0]->ring->emit,
-			 ce[1]->ring->tail, ce[1]->ring->emit);
+		drm_dbg(&i915->drm,
+			"%s: ring[0]:{ tail:%x, emit:%x }, ring[1]:{ tail:%x, emit:%x }\n",
+			engine->name, ce[0]->ring->tail, ce[0]->ring->emit,
+			ce[1]->ring->tail, ce[1]->ring->emit);
 

here...
<snip within same file>

Quoted 13 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +1 -0
@@ -2800,6 +2854,7 @@ static int __live_preempt_ring(struct intel_engine_cs *engine,
 			       struct igt_spinner *spin,
 			       int queue_sz, int ring_sz)
 {
+	struct drm_i915_private *i915 = engine->i915;
 	struct intel_context *ce[2] = {};
 	struct i915_request *rq;
 	struct igt_live_test t;
@@ -2867,12 +2922,10 @@ static int __live_preempt_ring(struct intel_engine_cs *engine,
 		n++;
 	}
 	intel_engine_flush_submission(engine);

drivers/gpu/drm/i915/gt/selftest_execlists.c static int __live_preempt_ring(struct intel_engine_cs *engine, · line 2928

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +4 -6
-	pr_debug("%s: Filled %d with %d nop tails {size:%x, tail:%x, emit:%x, rq.tail:%x}\n",
-		 engine->name, queue_sz, n,
-		 ce[0]->ring->size,
-		 ce[0]->ring->tail,
-		 ce[0]->ring->emit,
-		 rq->tail);
+	drm_dbg(&i915->drm,
+		"%s: Filled %d with %d nop tails {size:%x, tail:%x, emit:%x, rq.tail:%x}\n",
+		engine->name, queue_sz, n, ce[0]->ring->size, ce[0]->ring->tail,
+		ce[0]->ring->emit, rq->tail);

and here..

Quoted 14 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +3 -2
 	i915_request_put(rq);
 
 	/* Create a second request to preempt the first ring */
@@ -2889,15 +2942,16 @@ static int __live_preempt_ring(struct intel_engine_cs *engine,
 	err = wait_for_submit(engine, rq, HZ / 2);
 	i915_request_put(rq);
 	if (err) {
-		pr_err("%s: preemption request was not submitted\n",
-		       engine->name);
+		drm_err(&i915->drm,
+			"%s: preemption request was not submitted\n",
+			engine->name);
 		err = -ETIME;
 	}

drivers/gpu/drm/i915/gt/selftest_execlists.c static int __live_preempt_ring(struct intel_engine_cs *engine, · line 2955

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_execlists.c +4 -4
 
-	pr_debug("%s: ring[0]:{ tail:%x, emit:%x }, ring[1]:{ tail:%x, emit:%x }\n",
-		 engine->name,
-		 ce[0]->ring->tail, ce[0]->ring->emit,
-		 ce[1]->ring->tail, ce[1]->ring->emit);
+	drm_dbg(&i915->drm,
+		"%s: ring[0]:{ tail:%x, emit:%x }, ring[1]:{ tail:%x, emit:%x }\n",
+		engine->name, ce[0]->ring->tail, ce[0]->ring->emit,
+		ce[1]->ring->tail, ce[1]->ring->emit);
 

and here.

Maybe it's worth keeping the arguments in these snippets stacked like they were stacked before for readability? You greedily rearrange arguments all over your series, which I don't think matters that much, but here it is particularly easy on the eyes before your patch, and kind of lost that quality. Giga nit though so don't address this if you don't feel like it

drivers/gpu/drm/i915/gt/selftest_mocs.c line 17

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_mocs.c +2 -0
index d73e438fb85f..770516c6c7da 100644
@@ -13,6 +13,8 @@
 #include "selftests/igt_spinner.h"
 #include "selftests/intel_scheduler_helpers.h"
 
+#include <drm/drm_print.h>
+

Same nit with drm includes as before

drivers/gpu/drm/i915/gt/selftest_reset.c line 18

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_reset.c +2 -0
index 2cfc23c58e90..938218e0d5bc 100644
@@ -14,11 +14,14 @@
 #include "selftests/igt_atomic.h"
 #include "selftests/igt_spinner.h"
 
+#include <drm/drm_print.h>
+

Include nit again

Quoted 42 lines
drivers/gpu/drm/i915/gt/selftest_slpc.c +14 -1
index c3c918248989..531dbc08c8c3 100644
@@ -3,6 +3,10 @@
  * Copyright © 2021 Intel Corporation
  */
 
+#include <drm/drm_print.h>
+
+#include "uc/intel_guc.h"
+
 #define NUM_STEPS 5
 #define H2G_DELAY 50000
 #define delay_for_h2g() usleep_range(H2G_DELAY, H2G_DELAY + 10000)
@@ -23,13 +27,22 @@ struct slpc_thread {
 	int result;
 };
 
+static struct intel_gt *selftest_slpc_to_gt(struct intel_guc_slpc *slpc)
+{
+	struct intel_guc *guc = container_of(slpc, struct intel_guc, slpc);
+
+	return guc_to_gt(guc);
+}
+
 static int slpc_set_min_freq(struct intel_guc_slpc *slpc, u32 freq)
 {
+	struct intel_gt *gt = selftest_slpc_to_gt(slpc);
 	int ret;
 
 	ret = intel_guc_slpc_set_min_freq(slpc, freq);
 	if (ret)
-		pr_err("Could not set min frequency to [%u]\n", freq);
+		drm_err(&gt->i915->drm, "Could not set min frequency to [%u]\n",
+			freq);
 	else /* Delay to ensure h2g completes */
 		delay_for_h2g();
 
@@ -38,12 +51,13 @@ static int slpc_set_min_freq(struct intel_guc_slpc *slpc, u32 freq)
 
 static int slpc_set_max_freq(struct intel_guc_slpc *slpc, u32 freq)

drivers/gpu/drm/i915/gt/selftest_slpc.c static int slpc_set_min_freq(struct intel_guc_slpc *slpc, u32 freq) · line 60

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_slpc.c +3 -2
 {
+	struct intel_gt *gt = selftest_slpc_to_gt(slpc);
 	int ret;
 
 	ret = intel_guc_slpc_set_max_freq(slpc, freq);
 	if (ret)
-		pr_err("Could not set maximum frequency [%u]\n",
-		       freq);
+		drm_err(&gt->i915->drm,
+			"Could not set maximum frequency [%u]\n", freq);

Here you could use just directly

gt_err(gt, "Could not set...

Since gt_err is just [1]

#define gt_err(_gt, _fmt, ...) \
	drm_err(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)

and it seems like there's a decently accessible reference to gt all over this file, so I'd consider converting the drm_prints to gt_prints all over too.

[1] https://elixir.bootlin.com/linux/v7.2/source/drivers/gpu/drm/i915/gt/intel_gt_print.h#L13-L14

Quoted 5 lines
drivers/gpu/drm/i915/gt/selftest_slpc.c +0 -0
 	else /* Delay to ensure h2g completes */
 		delay_for_h2g();
 
@@ -52,18 +66,19 @@ static int slpc_set_max_freq(struct intel_guc_slpc *slpc, u32 freq)
 

drivers/gpu/drm/i915/gt/selftest_slpc.c static int slpc_set_max_freq(struct intel_guc_slpc *slpc, u32 freq) · line 75

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_slpc.c +2 -1
 static int slpc_set_freq(struct intel_gt *gt, u32 freq)
 {
+	struct drm_i915_private *i915 = gt->i915;
 	int err;
 	struct intel_guc_slpc *slpc = &gt_to_guc(gt)->slpc;
 
 	err = slpc_set_max_freq(slpc, freq);
 	if (err) {
-		pr_err("Unable to update max freq");
+		drm_err(&i915->drm, "Unable to update max freq");

Like here for example, you could get rid of the i915 struct entirely and just do 'gt_err(gt, "Unable to...', since at this point you're rewriting the macro by hand anyway.

The gt_prints give even more context for the error (in the form of the GT id) compared to drm_prints, so I think they are be preferable for that reason in places where we can access the GT ref. So I'd look for other places where you could use gt prints too.

Quoted 16 lines
drivers/gpu/drm/i915/gt/selftest_slpc.c +1 -1
 		return err;
 	}
 
 	err = slpc_set_min_freq(slpc, freq);
 	if (err) {
-		pr_err("Unable to update min freq");
+		drm_err(&i915->drm, "Unable to update min freq");
 		return err;
 	}
 
drivers/gpu/drm/i915/gt/selftest_tlb.c +0 -0
index a5184f09d1de..89420f07f681 100644

drivers/gpu/drm/i915/gt/selftest_tlb.c line 24

Quoted 5 lines
drivers/gpu/drm/i915/gt/selftest_tlb.c +2 -0
@@ -20,6 +20,8 @@
 #include "selftests/igt_flush_test.h"
 #include "selftests/i915_random.h"
 
+#include <drm/drm_print.h>
+

Nit for include

drivers/gpu/drm/i915/gt/selftest_workarounds.c line 20

Quoted 10 lines
drivers/gpu/drm/i915/gt/selftest_workarounds.c +2 -0
index 4e4c420ae67f..8b74d62e7ca5 100644
@@ -16,6 +16,8 @@
 #include "selftests/intel_scheduler_helpers.h"
 #include "selftests/mock_drm.h"
 
+#include <drm/drm_print.h>
+

Nit for include

drivers/gpu/drm/i915/gt/selftest_workarounds.c line 23

Quoted 3 lines
drivers/gpu/drm/i915/gt/selftest_workarounds.c +0 -0
 #include "gem/selftests/igt_gem_utils.h"
 #include "gem/selftests/mock_context.h"
 

Thanks
Krzysztof

#21 lore raw

PATCH v3 5/8 drm/i915/gt/selftests: Use drm_* prints in gt standalone tests

In reply to Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/gt/selftest_rc6.c |  59 +++--
 drivers/gpu/drm/i915/gt/selftest_rps.c | 297 ++++++++++++++-----------
 2 files changed, 203 insertions(+), 153 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rc6.c +36 -23
index 68fb1830d411..c744579a942f 100644
@@ -14,6 +14,8 @@
 #include "selftests/i915_random.h"
 #include "selftests/librapl.h"
 
+#include <drm/drm_print.h>
+
 static u64 rc6_residency(struct intel_rc6 *rc6)
 {
 	u64 result;
@@ -32,6 +34,7 @@ static u64 rc6_residency(struct intel_rc6 *rc6)
 int live_rc6_manual(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct intel_rc6 *rc6 = &gt->rc6;
 	struct intel_rps *rps = &gt->rps;
 	intel_wakeref_t wakeref;
@@ -80,8 +83,9 @@ int live_rc6_manual(void *arg)
 	res[1] = rc6_residency(rc6);
 	rc0_freq = intel_rps_read_actual_frequency_fw(rps);
 	if ((res[1] - res[0]) >> 10) {
-		pr_err("RC6 residency increased by %lldus while disabled for 1000ms!\n",
-		       (res[1] - res[0]) >> 10);
+		drm_err(&i915->drm,
+			"RC6 residency increased by %lldus while disabled for 1000ms!\n",
+			(res[1] - res[0]) >> 10);
 		err = -EINVAL;
 		goto out_unlock;
 	}
@@ -92,10 +96,12 @@ int live_rc6_manual(void *arg)
 
 		if (!rc0_power) {
 			if (rc0_freq)
-				pr_err("No power measured while in RC0! GPU Freq: %uMHz in RC0\n",
-				       rc0_freq);
+				drm_dbg(&i915->drm,
+					"No power measured while in RC0! GPU Freq: %uMHz in RC0\n",
+					rc0_freq);
 			else
-				pr_err("No power and freq measured while in RC0\n");
+				drm_err(&i915->drm,
+					"No power and freq measured while in RC0\n");
 			err = -EINVAL;
 			goto out_unlock;
 		}
@@ -114,32 +120,37 @@ int live_rc6_manual(void *arg)
 	dt = ktime_sub(ktime_get(), dt);
 	res[1] = rc6_residency(rc6);
 	if (res[1] == res[0]) {
-		pr_err("Did not enter RC6! RC6_STATE=%08x, RC6_CONTROL=%08x, residency=%lld\n",
-		       intel_uncore_read_fw(gt->uncore, GEN6_RC_STATE),
-		       intel_uncore_read_fw(gt->uncore, GEN6_RC_CONTROL),
-		       res[0]);
+		drm_err(&i915->drm,
+			"Did not enter RC6! RC6_STATE=%08x, RC6_CONTROL=%08x, residency=%lld\n",
+			intel_uncore_read_fw(gt->uncore, GEN6_RC_STATE),
+			intel_uncore_read_fw(gt->uncore, GEN6_RC_CONTROL),
+			res[0]);
 		err = -EINVAL;
 	}
 
 	if (has_power) {
 		rc6_power = div64_u64(NSEC_PER_SEC * rc6_sample_energy[1],
 				      ktime_to_ns(dt));
-		pr_info("GPU consumed %lluuW in RC0 and %lluuW in RC6\n",
-			rc0_power, rc6_power);
+		drm_info(&i915->drm,
+			 "GPU consumed %lluuW in RC0 and %lluuW in RC6\n",
+			 rc0_power, rc6_power);
 
 		if (2 * rc6_power > rc0_power) {
-			pr_err("GPU leaked energy while in RC6!\n"
-			       "GPU Freq: %uMHz in RC6 and %uMHz in RC0\n"
-			       "RC0 energy before & after sleep respectively: %lluuJ %lluuJ\n"
-			       "RC6 energy before & after sleep respectively: %lluuJ %lluuJ\n",
-			       rc6_freq, rc0_freq, rc0_sample_energy[0], rc0_sample_energy[1],
-			       rc6_sample_energy[0], rc6_sample_energy[1]);
+			drm_err(&i915->drm,
+				"GPU leaked energy while in RC6!\n"
+				"GPU Freq: %uMHz in RC6 and %uMHz in RC0\n"
+				"RC0 energy before & after sleep respectively: %lluuJ %lluuJ\n"
+				"RC6 energy before & after sleep respectively: %lluuJ %lluuJ\n",
+				rc6_freq, rc0_freq, rc0_sample_energy[0],
+				rc0_sample_energy[1], rc6_sample_energy[0],
+				rc6_sample_energy[1]);
 
 			diff = res[1] - res[0];
 			threshold = (9 * NSEC_PER_MSEC * sleep_time) / 10;
 			if (diff < threshold)
-				pr_err("Did not enter RC6 properly, RC6 start residency=%lluns, RC6 end residency=%lluns\n",
-				       res[0], res[1]);
+				drm_err(&i915->drm,
+					"Did not enter RC6 properly, RC6 start residency=%lluns, RC6 end residency=%lluns\n",
+					res[0], res[1]);
 			err = -EINVAL;
 			goto out_unlock;
 		}
@@ -218,6 +229,7 @@ randomised_engines(struct intel_gt *gt,
 int live_rc6_ctx_wa(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct intel_engine_cs **engines;
 	unsigned int n, count;
 	I915_RND_STATE(prng);
@@ -265,13 +277,14 @@ int live_rc6_ctx_wa(void *arg)
 			}
 
 			intel_gt_pm_wait_for_idle(gt);
-			pr_debug("%s: CTX_INFO=%0x\n",
-				 engine->name, READ_ONCE(*res));
+			drm_dbg(&i915->drm, "%s: CTX_INFO=%0x\n",
+				engine->name, READ_ONCE(*res));
 
 			if (resets !=
 			    i915_reset_engine_count(error, engine)) {
-				pr_err("%s: GPU reset required\n",
-				       engine->name);
+				drm_err(&i915->drm,
+					"%s: GPU reset required\n",
+					engine->name);
 				add_taint_for_CI(gt->i915, TAINT_WARN);
 				err = -EIO;
 				goto out;
drivers/gpu/drm/i915/gt/selftest_rps.c +167 -130

567 lines not on this page · raw message

Signature · 1 line
2.34.1
#22 lore raw

Re: [PATCH v3 5/8] drm/i915/gt/selftests: Use drm_* prints in gt standalone tests

Hi krzysztof,

...

drivers/gpu/drm/i915/gt/selftest_rc6.c int live_rc6_manual(void *arg) · line 88

Quoted 9 lines
drivers/gpu/drm/i915/gt/selftest_rc6.c +3 -2
@@ -80,8 +83,9 @@ int live_rc6_manual(void *arg)
 	res[1] = rc6_residency(rc6);
 	rc0_freq = intel_rps_read_actual_frequency_fw(rps);
 	if ((res[1] - res[0]) >> 10) {
-		pr_err("RC6 residency increased by %lldus while disabled for 1000ms!\n",
-		       (res[1] - res[0]) >> 10);
+		drm_err(&i915->drm,
+			"RC6 residency increased by %lldus while disabled for 1000ms!\n",
+			(res[1] - res[0]) >> 10);

yeah... I think here we should be using gt_err()

drivers/gpu/drm/i915/gt/selftest_rc6.c int live_rc6_manual(void *arg) · line 101

Quoted 12 lines
drivers/gpu/drm/i915/gt/selftest_rc6.c +3 -2
 		err = -EINVAL;
 		goto out_unlock;
 	}
@@ -92,10 +96,12 @@ int live_rc6_manual(void *arg)
 
 		if (!rc0_power) {
 			if (rc0_freq)
-				pr_err("No power measured while in RC0! GPU Freq: %uMHz in RC0\n",
-				       rc0_freq);
+				drm_dbg(&i915->drm,
+					"No power measured while in RC0! GPU Freq: %uMHz in RC0\n",
+					rc0_freq);

this is moving from _err level to _dbg level.

Andi

Quoted 7 lines
drivers/gpu/drm/i915/gt/selftest_rc6.c +2 -1
 			else
-				pr_err("No power and freq measured while in RC0\n");
+				drm_err(&i915->drm,
+					"No power and freq measured while in RC0\n");
 			err = -EINVAL;
 			goto out_unlock;
 		}
#23 lore raw

Re: [PATCH v3 5/8] drm/i915/gt/selftests: Use drm_* prints in gt standalone tests

In reply to Krzysztof Karas

Hi Krzysztof,

Quoted 15 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/gt/selftest_rc6.c |  59 +++--
 drivers/gpu/drm/i915/gt/selftest_rps.c | 297 ++++++++++++++-----------
 2 files changed, 203 insertions(+), 153 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rc6.c +0 -0
index 68fb1830d411..c744579a942f 100644

drivers/gpu/drm/i915/gt/selftest_rc6.c line 18

Quoted 5 lines
drivers/gpu/drm/i915/gt/selftest_rc6.c +2 -0
@@ -14,6 +14,8 @@
 #include "selftests/i915_random.h"
 #include "selftests/librapl.h"
 
+#include <drm/drm_print.h>
+

Nit for include

Quoted 12 lines
drivers/gpu/drm/i915/gt/selftest_rc6.c +1 -0
 static u64 rc6_residency(struct intel_rc6 *rc6)
 {
 	u64 result;
@@ -32,6 +34,7 @@ static u64 rc6_residency(struct intel_rc6 *rc6)
 int live_rc6_manual(void *arg)
 {
 	struct intel_gt *gt = arg;
+	struct drm_i915_private *i915 = gt->i915;
 	struct intel_rc6 *rc6 = &gt->rc6;
 	struct intel_rps *rps = &gt->rps;
 	intel_wakeref_t wakeref;

drivers/gpu/drm/i915/gt/selftest_rc6.c int live_rc6_manual(void *arg) · line 88

Quoted 8 lines
drivers/gpu/drm/i915/gt/selftest_rc6.c +3 -2
@@ -80,8 +83,9 @@ int live_rc6_manual(void *arg)
 	res[1] = rc6_residency(rc6);
 	rc0_freq = intel_rps_read_actual_frequency_fw(rps);
 	if ((res[1] - res[0]) >> 10) {
-		pr_err("RC6 residency increased by %lldus while disabled for 1000ms!\n",
-		       (res[1] - res[0]) >> 10);
+		drm_err(&i915->drm,
+			"RC6 residency increased by %lldus while disabled for 1000ms!\n",
+			(res[1] - res[0]) >> 10);

To drive the point home, this is another place where gt_err would be better, since the test is concerned with a specific gt, and all kinds of values can differ between different gts on the same multi-gt system.

I'm pretty sure the pr_err was written before multi-gt was a thing (last two commits changing that line were 599b0d8ce6eda in 2024 that only changed the string, and before that 730eaeb524261 was in 2019), so there was no gt id to report. But now having the gt id stated in the error log could be really valuable for debugging, so this series is a good chance to improve the logging with gt_prints instead of drm_prints, unless it's considered out of scope.

(In this case this specific test is always run on the gt with id 0, because the file that runs it is not adapted for multi gt, but that's another issue entirely and I hope you see my point)

Snipping the rest, looks okay to me.

Thanks
Krzysztof

#24 lore raw

PATCH v3 6/8 drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers

In reply to Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 .../drm/i915/gt/selftest_engine_heartbeat.c   | 13 +++++----
 drivers/gpu/drm/i915/gt/selftest_llc.c        | 29 ++++++++++++-------
 2 files changed, 26 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c +7 -6
index b893a8fde895..d26441ee837b 100644
@@ -195,6 +195,7 @@ static int live_idle_pulse(void *arg)
 
 static int __live_heartbeat_off(struct intel_engine_cs *engine)
 {
+	struct drm_i915_private *i915 = engine->i915;
 	int err;
 
 	intel_engine_pm_get(engine);
@@ -202,8 +203,8 @@ static int __live_heartbeat_off(struct intel_engine_cs *engine)
 	engine->serial++;
 	flush_delayed_work(&engine->heartbeat.work);
 	if (!delayed_work_pending(&engine->heartbeat.work)) {
-		pr_err("%s: heartbeat not running\n",
-		       engine->name);
+		drm_err(&i915->drm, "%s: heartbeat not running\n",
+			engine->name);
 		err = -EINVAL;
 		goto err_pm;
 	}
@@ -215,15 +216,15 @@ static int __live_heartbeat_off(struct intel_engine_cs *engine)
 	engine->serial++;
 	flush_delayed_work(&engine->heartbeat.work);
 	if (delayed_work_pending(&engine->heartbeat.work)) {
-		pr_err("%s: heartbeat still running\n",
-		       engine->name);
+		drm_err(&i915->drm, "%s: heartbeat still running\n",
+			engine->name);
 		err = -EINVAL;
 		goto err_beat;
 	}
 
 	if (READ_ONCE(engine->heartbeat.systole)) {
-		pr_err("%s: heartbeat still allocated\n",
-		       engine->name);
+		drm_err(&i915->drm, "%s: heartbeat still allocated\n",
+			engine->name);
 		err = -EINVAL;
 		goto err_beat;
 	}
drivers/gpu/drm/i915/gt/selftest_llc.c +19 -10
index 779fadcec7c4..17a86e876f9f 100644
@@ -6,6 +6,8 @@
 #include "selftest_llc.h"
 #include "intel_rps.h"
 
+#include <drm/drm_print.h>
+
 static int gen6_verify_ring_freq(struct intel_llc *llc)
 {
 	struct drm_i915_private *i915 = llc_to_gt(llc)->i915;
@@ -23,6 +25,7 @@ static int gen6_verify_ring_freq(struct intel_llc *llc)
 	     gpu_freq <= consts.max_gpu_freq;
 	     gpu_freq++) {
 		struct intel_rps *rps = &llc_to_gt(llc)->rps;
+		u32 scaler = GRAPHICS_VER(i915) >= 9 ? GEN9_FREQ_SCALER : 1;
 
 		unsigned int ia_freq, ring_freq, found;
 		u32 val;
@@ -32,28 +35,34 @@ static int gen6_verify_ring_freq(struct intel_llc *llc)
 		val = gpu_freq;
 		if (snb_pcode_read(llc_to_gt(llc)->uncore, GEN6_PCODE_READ_MIN_FREQ_TABLE,
 				   &val, NULL)) {
-			pr_err("Failed to read freq table[%d], range [%d, %d]\n",
-			       gpu_freq, consts.min_gpu_freq, consts.max_gpu_freq);
+			drm_err(&i915->drm,
+				"Failed to read freq table[%d], range [%d, %d]\n",
+				gpu_freq, consts.min_gpu_freq,
+				consts.max_gpu_freq);
 			err = -ENXIO;
 			break;
 		}
 
 		found = (val >> 0) & 0xff;
 		if (found != ia_freq) {
-			pr_err("Min freq table(%d/[%d, %d]):%dMHz did not match expected CPU freq, found %d, expected %d\n",
-			       gpu_freq, consts.min_gpu_freq, consts.max_gpu_freq,
-			       intel_gpu_freq(rps, gpu_freq * (GRAPHICS_VER(i915) >= 9 ? GEN9_FREQ_SCALER : 1)),
-			       found, ia_freq);
+			drm_err(&i915->drm,
+				"Min freq table(%d/[%d, %d]):%dMHz did not match expected CPU freq, found %d, expected %d\n",
+				gpu_freq, consts.min_gpu_freq,
+				consts.max_gpu_freq,
+				intel_gpu_freq(rps, gpu_freq * scaler),
+				found, ia_freq);
 			err = -EINVAL;
 			break;
 		}
 
 		found = (val >> 8) & 0xff;
 		if (found != ring_freq) {
-			pr_err("Min freq table(%d/[%d, %d]):%dMHz did not match expected ring freq, found %d, expected %d\n",
-			       gpu_freq, consts.min_gpu_freq, consts.max_gpu_freq,
-			       intel_gpu_freq(rps, gpu_freq * (GRAPHICS_VER(i915) >= 9 ? GEN9_FREQ_SCALER : 1)),
-			       found, ring_freq);
+			drm_err(&i915->drm,
+				"Min freq table(%d/[%d, %d]):%dMHz did not match expected ring freq, found %d, expected %d\n",
+				gpu_freq, consts.min_gpu_freq,
+				consts.max_gpu_freq,
+				intel_gpu_freq(rps, gpu_freq * scaler),
+				found, ring_freq);
 			err = -EINVAL;
 			break;
 		}
Signature · 1 line
2.34.1
#25 lore raw

Re: [PATCH v3 6/8] drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers

Hi Krzysztof,

...

drivers/gpu/drm/i915/gt/selftest_llc.c static int gen6_verify_ring_freq(struct intel_llc *llc) · line 29

Quoted 6 lines
drivers/gpu/drm/i915/gt/selftest_llc.c +1 -0
@@ -23,6 +25,7 @@ static int gen6_verify_ring_freq(struct intel_llc *llc)
 	     gpu_freq <= consts.max_gpu_freq;
 	     gpu_freq++) {
 		struct intel_rps *rps = &llc_to_gt(llc)->rps;
+		u32 scaler = GRAPHICS_VER(i915) >= 9 ? GEN9_FREQ_SCALER : 1;
 

As you are at it, you can remove this ugly blank line here.

Andi

Quoted 2 lines
drivers/gpu/drm/i915/gt/selftest_llc.c +0 -0
 		unsigned int ia_freq, ring_freq, found;
 		u32 val;
#26 lore raw

Re: [PATCH v3 6/8] drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers

In reply to Krzysztof Karas

Hi Krzysztof,

Quoted 58 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 .../drm/i915/gt/selftest_engine_heartbeat.c   | 13 +++++----
 drivers/gpu/drm/i915/gt/selftest_llc.c        | 29 ++++++++++++-------
 2 files changed, 26 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c +7 -6
index b893a8fde895..d26441ee837b 100644
@@ -195,6 +195,7 @@ static int live_idle_pulse(void *arg)
 
 static int __live_heartbeat_off(struct intel_engine_cs *engine)
 {
+	struct drm_i915_private *i915 = engine->i915;
 	int err;
 
 	intel_engine_pm_get(engine);
@@ -202,8 +203,8 @@ static int __live_heartbeat_off(struct intel_engine_cs *engine)
 	engine->serial++;
 	flush_delayed_work(&engine->heartbeat.work);
 	if (!delayed_work_pending(&engine->heartbeat.work)) {
-		pr_err("%s: heartbeat not running\n",
-		       engine->name);
+		drm_err(&i915->drm, "%s: heartbeat not running\n",
+			engine->name);
 		err = -EINVAL;
 		goto err_pm;
 	}
@@ -215,15 +216,15 @@ static int __live_heartbeat_off(struct intel_engine_cs *engine)
 	engine->serial++;
 	flush_delayed_work(&engine->heartbeat.work);
 	if (delayed_work_pending(&engine->heartbeat.work)) {
-		pr_err("%s: heartbeat still running\n",
-		       engine->name);
+		drm_err(&i915->drm, "%s: heartbeat still running\n",
+			engine->name);
 		err = -EINVAL;
 		goto err_beat;
 	}
 
 	if (READ_ONCE(engine->heartbeat.systole)) {
-		pr_err("%s: heartbeat still allocated\n",
-		       engine->name);
+		drm_err(&i915->drm, "%s: heartbeat still allocated\n",
+			engine->name);
 		err = -EINVAL;
 		goto err_beat;
 	}
drivers/gpu/drm/i915/gt/selftest_llc.c +0 -0
index 779fadcec7c4..17a86e876f9f 100644

drivers/gpu/drm/i915/gt/selftest_llc.c line 10

Quoted 5 lines
drivers/gpu/drm/i915/gt/selftest_llc.c +2 -0
@@ -6,6 +6,8 @@
 #include "selftest_llc.h"
 #include "intel_rps.h"
 
+#include <drm/drm_print.h>
+

Include nit, rest looks okay to me

Thanks
Krzysztof

#27 lore raw

PATCH v3 7/8 drm/i915/selftests: Use drm_* prints in selftest headers

In reply to Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/selftests/i915_selftest.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/selftests/i915_selftest.c +5 -3
index 3adcfdab75ae..fa840a7e651e 100644
@@ -23,6 +23,8 @@
 
 #include <linux/random.h>
 
+#include <drm/drm_print.h>
+
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_pm.h"
 #include "gt/intel_gt_regs.h"
@@ -47,7 +49,7 @@ int i915_mock_sanitycheck(void)
 
 int i915_live_sanitycheck(struct drm_i915_private *i915)
 {
-	pr_info("%s: %s() - ok!\n", i915->drm.driver->name, __func__);
+	drm_info(&i915->drm, "%s() - ok!\n", __func__);
 	return 0;
 }
 
@@ -154,7 +156,7 @@ __wait_gsc_proxy_completed(struct drm_i915_private *i915)
 
 	if (need_to_wait && wait_for(!__gsc_proxy_init_progressing(&i915->media_gt->uc.gsc),
 				     timeout_ms))
-		pr_warn(DRIVER_NAME "Timed out waiting for gsc_proxy_completion!\n");
+		drm_warn(&i915->drm, "Timed out waiting for gsc_proxy_completion!\n");
 }
 
 static void
@@ -178,7 +180,7 @@ __wait_gsc_huc_load_completed(struct drm_i915_private *i915)
 
 	if (need_to_wait &&
 	    wait_for(i915_sw_fence_done(&huc->delayed_load.fence), timeout_ms))
-		pr_warn(DRIVER_NAME "Timed out waiting for huc load via GSC!\n");
+		drm_warn(&i915->drm, "Timed out waiting for huc load via GSC!\n");
 }
 
 static struct mm_struct *get_selftest_mm(int u_pid_nr)
Signature · 1 line
2.34.1
#28 lore raw

Re: [PATCH v3 7/8] drm/i915/selftests: Use drm_* prints in selftest headers

Hi Krzysztof,

Quoted 8 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/selftests/i915_selftest.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

in the title you are stating that you are using drm_* in headers. Please, fix the title according to the change.

Thanks,
Andi

Reviewed-by on v3 7/8
#29 lore raw

Re: [PATCH v3 7/8] drm/i915/selftests: Use drm_* prints in selftest headers

In reply to Krzysztof Karas

Hi Krzysztof,

Quoted 52 lines · Krzysztof Karas

Move away from generic pr prints to device context aware drm versions.

Assisted-by GitHub-Copilot:claude-opus-5
---
 drivers/gpu/drm/i915/selftests/i915_selftest.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/selftests/i915_selftest.c +5 -3
index 3adcfdab75ae..fa840a7e651e 100644
@@ -23,6 +23,8 @@
 
 #include <linux/random.h>
 
+#include <drm/drm_print.h>
+
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_pm.h"
 #include "gt/intel_gt_regs.h"
@@ -47,7 +49,7 @@ int i915_mock_sanitycheck(void)
 
 int i915_live_sanitycheck(struct drm_i915_private *i915)
 {
-	pr_info("%s: %s() - ok!\n", i915->drm.driver->name, __func__);
+	drm_info(&i915->drm, "%s() - ok!\n", __func__);
 	return 0;
 }
 
@@ -154,7 +156,7 @@ __wait_gsc_proxy_completed(struct drm_i915_private *i915)
 
 	if (need_to_wait && wait_for(!__gsc_proxy_init_progressing(&i915->media_gt->uc.gsc),
 				     timeout_ms))
-		pr_warn(DRIVER_NAME "Timed out waiting for gsc_proxy_completion!\n");
+		drm_warn(&i915->drm, "Timed out waiting for gsc_proxy_completion!\n");
 }
 
 static void
@@ -178,7 +180,7 @@ __wait_gsc_huc_load_completed(struct drm_i915_private *i915)
 
 	if (need_to_wait &&
 	    wait_for(i915_sw_fence_done(&huc->delayed_load.fence), timeout_ms))
-		pr_warn(DRIVER_NAME "Timed out waiting for huc load via GSC!\n");
+		drm_warn(&i915->drm, "Timed out waiting for huc load via GSC!\n");
 }
 
 static struct mm_struct *get_selftest_mm(int u_pid_nr)
Signature · 1 line
2.34.1

LGTM

Thanks
Krzysztof

#30 lore raw

PATCH v3 8/8 drm/i915/selftests: Add drm_device to selftest wrappers

In reply to Krzysztof Karas

Pass device pointer to the selftest wrapper macros, so we can use device context in message printing.

If the caller chooses not to pass a device, use old style formatting instead of embedding NULL device into the messages.

Assisted-by GitHub-Copilot:claude-opus-5
---
 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  4 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  |  2 +-
 .../i915/gem/selftests/i915_gem_coherency.c   |  2 +-
 .../drm/i915/gem/selftests/i915_gem_context.c |  2 +-
 .../drm/i915/gem/selftests/i915_gem_dmabuf.c  |  4 +-
 .../drm/i915/gem/selftests/i915_gem_migrate.c |  2 +-
 .../drm/i915/gem/selftests/i915_gem_mman.c    |  4 +-
 .../drm/i915/gem/selftests/i915_gem_object.c  |  4 +-
 .../drm/i915/gem/selftests/i915_gem_phys.c    |  2 +-
 drivers/gpu/drm/i915/gt/selftest_context.c    |  2 +-
 drivers/gpu/drm/i915/gt/selftest_engine_cs.c  |  4 +-
 .../drm/i915/gt/selftest_engine_heartbeat.c   |  2 +-
 drivers/gpu/drm/i915/gt/selftest_engine_pm.c  |  2 +-
 drivers/gpu/drm/i915/gt/selftest_execlists.c  |  2 +-
 drivers/gpu/drm/i915/gt/selftest_gt_pm.c      |  4 +-
 drivers/gpu/drm/i915/gt/selftest_hangcheck.c  |  2 +-
 drivers/gpu/drm/i915/gt/selftest_lrc.c        |  2 +-
 drivers/gpu/drm/i915/gt/selftest_migrate.c    |  4 +-
 drivers/gpu/drm/i915/gt/selftest_mocs.c       |  2 +-
 drivers/gpu/drm/i915/gt/selftest_reset.c      |  2 +-
 drivers/gpu/drm/i915/gt/selftest_ring.c       |  2 +-
 .../drm/i915/gt/selftest_ring_submission.c    |  2 +-
 drivers/gpu/drm/i915/gt/selftest_slpc.c       |  2 +-
 drivers/gpu/drm/i915/gt/selftest_timeline.c   |  4 +-
 drivers/gpu/drm/i915/gt/selftest_tlb.c        |  2 +-
 .../gpu/drm/i915/gt/selftest_workarounds.c    |  2 +-
 drivers/gpu/drm/i915/gt/st_shmem_utils.c      |  2 +-
 drivers/gpu/drm/i915/gt/uc/selftest_guc.c     |  2 +-
 .../drm/i915/gt/uc/selftest_guc_hangcheck.c   |  2 +-
 .../drm/i915/gt/uc/selftest_guc_multi_lrc.c   |  2 +-
 drivers/gpu/drm/i915/i915_selftest.h          | 16 ++---
 drivers/gpu/drm/i915/selftests/i915_active.c  |  2 +-
 drivers/gpu/drm/i915/selftests/i915_gem.c     |  2 +-
 .../gpu/drm/i915/selftests/i915_gem_evict.c   |  4 +-
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c |  4 +-
 drivers/gpu/drm/i915/selftests/i915_perf.c    |  2 +-
 drivers/gpu/drm/i915/selftests/i915_request.c |  6 +-
 .../gpu/drm/i915/selftests/i915_selftest.c    | 63 ++++++++++++++-----
 .../gpu/drm/i915/selftests/i915_sw_fence.c    |  2 +-
 drivers/gpu/drm/i915/selftests/i915_syncmap.c |  2 +-
 drivers/gpu/drm/i915/selftests/i915_vma.c     |  4 +-
 .../drm/i915/selftests/intel_memory_region.c  |  6 +-
 drivers/gpu/drm/i915/selftests/intel_uncore.c |  2 +-
 drivers/gpu/drm/i915/selftests/scatterlist.c  |  2 +-
 44 files changed, 113 insertions(+), 80 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +2 -2
index 44718e728291..50199faf0a0e 100644
@@ -1991,7 +1991,7 @@ int i915_gem_huge_page_mock_selftests(void)
 		goto out_put;
 	}
 
-	err = i915_subtests(tests, ppgtt);
+	err = i915_subtests(tests, ppgtt, &i915->drm);
 
 out_put:
 	i915_vm_put(&ppgtt->vm);
@@ -2021,5 +2021,5 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +1 -1
index 1d4d7cfb3f9c..48ac2b7d80df 100644
@@ -742,5 +742,5 @@ int i915_gem_client_blt_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/gem/selftests/i915_gem_coherency.c +1 -1
index 2a0c0634d446..316bab3d86ab 100644
@@ -430,5 +430,5 @@ int i915_gem_coherency_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(igt_gem_coherency),
 	};
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c +1 -1
index 9d405098f9e7..f85f4b8b1ef3 100644
@@ -1912,5 +1912,5 @@ int i915_gem_context_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c +2 -2
index 2fda549dd82d..a1c611d287c8 100644
@@ -541,7 +541,7 @@ int i915_gem_dmabuf_mock_selftests(void)
 	if (!i915)
 		return -ENOMEM;
 
-	err = i915_subtests(tests, i915);
+	err = i915_subtests(tests, i915, &i915->drm);
 
 	mock_destroy_device(i915);
 	return err;
@@ -556,5 +556,5 @@ int i915_gem_dmabuf_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(igt_dmabuf_import_same_driver_lmem_smem),
 	};
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c +1 -1
index d8f4a10d71de..553bf14f8274 100644
@@ -524,5 +524,5 @@ int i915_gem_migrate_live_selftests(struct drm_i915_private *i915)
 	if (!HAS_LMEM(i915))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +2 -2
index d01acfb7d93d..a15bdec2177b 100644
@@ -1860,12 +1860,12 @@ int i915_gem_mman_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(igt_mmap_gpu),
 	};
 
-	ret = i915_live_subtests(tests, i915);
+	ret = i915_live_subtests(tests, i915, &i915->drm);
 	if (ret)
 		return ret;
 
 	if (current->mm)
-		ret = i915_live_subtests(vma_tests, i915);
+		ret = i915_live_subtests(vma_tests, i915, &i915->drm);
 	else
 		pr_warn("No current->mm to safely borrow userspace memory from. Skipping VMA tests.\n");
 
drivers/gpu/drm/i915/gem/selftests/i915_gem_object.c +2 -2
index 19e374f68ff7..4317e6a5362e 100644
@@ -83,7 +83,7 @@ int i915_gem_object_mock_selftests(void)
 	if (!i915)
 		return -ENOMEM;
 
-	err = i915_subtests(tests, i915);
+	err = i915_subtests(tests, i915, &i915->drm);
 
 	mock_destroy_device(i915);
 	return err;
@@ -95,5 +95,5 @@ int i915_gem_object_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(igt_gem_huge),
 	};
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/gem/selftests/i915_gem_phys.c +1 -1
index d43d8dae0f69..9c05e8db3861 100644
@@ -80,7 +80,7 @@ int i915_gem_phys_mock_selftests(void)
 	if (!i915)
 		return -ENOMEM;
 
-	err = i915_subtests(tests, i915);
+	err = i915_subtests(tests, i915, &i915->drm);
 
 	mock_destroy_device(i915);
 	return err;
drivers/gpu/drm/i915/gt/selftest_context.c +1 -1
index d9d279991eda..e02eb41205a5 100644
@@ -458,5 +458,5 @@ int intel_context_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(gt))
 		return 0;
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_engine_cs.c +2 -2
index 28c019547b34..88f8ee5efa42 100644
@@ -384,7 +384,7 @@ int intel_engine_cs_perf_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
 
 static int intel_mmio_bases_check(void *arg)
@@ -439,5 +439,5 @@ int intel_engine_cs_mock_selftests(void)
 		SUBTEST(intel_mmio_bases_check),
 	};
 
-	return i915_subtests(tests, NULL);
+	return i915_subtests(tests, NULL, NULL);
 }
drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c +1 -1
index d26441ee837b..3d22f1f85f95 100644
@@ -275,7 +275,7 @@ int intel_heartbeat_live_selftests(struct drm_i915_private *i915)
 	saved_hangcheck = i915->params.enable_hangcheck;
 	i915->params.enable_hangcheck = INT_MAX;
 
-	err = intel_gt_live_subtests(tests, to_gt(i915));
+	err = intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 
 	i915->params.enable_hangcheck = saved_hangcheck;
 	return err;
drivers/gpu/drm/i915/gt/selftest_engine_pm.c +1 -1
index 2813f0c717a9..acf3ae1da919 100644
@@ -434,5 +434,5 @@ int live_engine_pm_selftests(struct intel_gt *gt)
 		SUBTEST(live_engine_pm),
 	};
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &gt->i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_execlists.c +1 -1
index 97dc44cf615f..6764d8284d6c 100644
@@ -4573,5 +4573,5 @@ int intel_execlists_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_gt_pm.c +2 -2
index 4e583fcb1cf9..534012012c34 100644
@@ -202,7 +202,7 @@ int intel_gt_pm_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
 
 int intel_gt_pm_late_selftests(struct drm_i915_private *i915)
@@ -219,5 +219,5 @@ int intel_gt_pm_late_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_hangcheck.c +1 -1
index 00dfc37221fa..3234d88a611a 100644
@@ -2028,7 +2028,7 @@ int intel_hangcheck_live_selftests(struct drm_i915_private *i915)
 
 	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
 
-	err = intel_gt_live_subtests(tests, gt);
+	err = intel_gt_live_subtests(tests, gt, &i915->drm);
 
 	intel_runtime_pm_put(gt->uncore->rpm, wakeref);
 
drivers/gpu/drm/i915/gt/selftest_lrc.c +1 -1
index 23f04f6f8fba..0e8c9626ee56 100644
@@ -1990,5 +1990,5 @@ int intel_lrc_live_selftests(struct drm_i915_private *i915)
 	if (!HAS_LOGICAL_RING_CONTEXTS(i915))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_migrate.c +2 -2
index fb348aa82e05..321ca87b7d06 100644
@@ -824,7 +824,7 @@ int intel_migrate_live_selftests(struct drm_i915_private *i915)
 	if (!gt->migrate.context)
 		return 0;
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &i915->drm);
 }
 
 static struct drm_i915_gem_object *
@@ -1046,5 +1046,5 @@ int intel_migrate_perf_selftests(struct drm_i915_private *i915)
 	if (!gt->migrate.context)
 		return 0;
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_mocs.c +1 -1
index 770516c6c7da..6b927e7d6c21 100644
@@ -453,5 +453,5 @@ int intel_mocs_live_selftests(struct drm_i915_private *i915)
 	if (!get_mocs_settings(i915, &table))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_reset.c +1 -1
index 938218e0d5bc..02acac8cd04c 100644
@@ -398,5 +398,5 @@ int intel_reset_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(gt))
 		return -EIO; /* we're long past hope of a successful reset */
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_ring.c +1 -1
index 2a8c534dc125..97ffcaadd412 100644
@@ -106,5 +106,5 @@ int intel_ring_mock_selftests(void)
 		SUBTEST(igt_ring_direction),
 	};
 
-	return i915_subtests(tests, NULL);
+	return i915_subtests(tests, NULL, NULL);
 }
drivers/gpu/drm/i915/gt/selftest_ring_submission.c +1 -1
index 600333ae6c8c..1234b74ee407 100644
@@ -295,5 +295,5 @@ int intel_ring_submission_live_selftests(struct drm_i915_private *i915)
 	if (to_gt(i915)->submission_method > INTEL_SUBMISSION_RING)
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_slpc.c +1 -1
index 531dbc08c8c3..c8096c7c628e 100644
@@ -584,5 +584,5 @@ int intel_slpc_live_selftests(struct drm_i915_private *i915)
 			return 0;
 	}
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_timeline.c +2 -2
index 29d860a5c9c8..bd9d39cfdffe 100644
@@ -448,7 +448,7 @@ int intel_timeline_mock_selftests(void)
 		SUBTEST(bench_sync),
 	};
 
-	return i915_subtests(tests, NULL);
+	return i915_subtests(tests, NULL, NULL);
 }
 
 static int emit_ggtt_store_dw(struct i915_request *rq, u32 addr, u32 value)
@@ -1425,5 +1425,5 @@ int intel_timeline_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gt/selftest_tlb.c +1 -1
index 89420f07f681..e81567067991 100644
@@ -405,7 +405,7 @@ int intel_tlb_live_selftests(struct drm_i915_private *i915)
 		if (intel_gt_is_wedged(gt))
 			continue;
 
-		err = intel_gt_live_subtests(tests, gt);
+		err = intel_gt_live_subtests(tests, gt, &i915->drm);
 		if (err)
 			return err;
 	}
drivers/gpu/drm/i915/gt/selftest_workarounds.c +1 -1
index 8b74d62e7ca5..460233fdb333 100644
@@ -1404,5 +1404,5 @@ int intel_workarounds_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/gt/st_shmem_utils.c +1 -1
index b279fe88b70e..b00e29737c11 100644
@@ -59,5 +59,5 @@ int shmem_utils_mock_selftests(void)
 		SUBTEST(igt_shmem_basic),
 	};
 
-	return i915_subtests(tests, NULL);
+	return i915_subtests(tests, NULL, NULL);
 }
drivers/gpu/drm/i915/gt/uc/selftest_guc.c +1 -1
index 63a75272924f..e201410c2e2c 100644
@@ -415,5 +415,5 @@ int intel_guc_live_selftests(struct drm_i915_private *i915)
 	if (!intel_uc_uses_guc_submission(&gt->uc))
 		return 0;
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &i915->drm);
 }
drivers/gpu/drm/i915/gt/uc/selftest_guc_hangcheck.c +1 -1
index 83801c992488..bcce2afaa4f7 100644
@@ -158,5 +158,5 @@ int intel_guc_hang_check(struct drm_i915_private *i915)
 	if (!intel_uc_uses_guc_submission(&gt->uc))
 		return 0;
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &i915->drm);
 }
drivers/gpu/drm/i915/gt/uc/selftest_guc_multi_lrc.c +1 -1
index 18077801b2e6..89a1ad08ddb0 100644
@@ -180,5 +180,5 @@ int intel_guc_multi_lrc_live_selftests(struct drm_i915_private *i915)
 	if (!intel_uc_uses_guc_submission(&gt->uc))
 		return 0;
 
-	return intel_gt_live_subtests(tests, gt);
+	return intel_gt_live_subtests(tests, gt, &i915->drm);
 }
drivers/gpu/drm/i915/i915_selftest.h +9 -7
index e29ca298e7eb..f102d61bfa3b 100644
@@ -29,6 +29,7 @@
 #define STACK_MAGIC	0xdeadbeef
 
 struct pci_dev;
+struct drm_device;
 struct drm_i915_private;
 
 struct i915_selftest {
@@ -88,24 +89,25 @@ int __i915_subtests(const char *caller,
 		    int (*teardown)(int err, void *data),
 		    const struct i915_subtest *st,
 		    unsigned int count,
-		    void *data);
-#define i915_subtests(T, data) \
+		    void *data,
+		    struct drm_device *device);
+#define i915_subtests(T, data, device) \
 	__i915_subtests(__func__, \
 			__i915_nop_setup, __i915_nop_teardown, \
-			T, ARRAY_SIZE(T), data)
-#define i915_live_subtests(T, data) ({ \
+			T, ARRAY_SIZE(T), data, device)
+#define i915_live_subtests(T, data, device) ({ \
 	typecheck(struct drm_i915_private *, data); \
 	(data)->gt[0]->uc.guc.submission_state.sched_disable_delay_ms = 0; \
 	__i915_subtests(__func__, \
 			__i915_live_setup, __i915_live_teardown, \
-			T, ARRAY_SIZE(T), data); \
+			T, ARRAY_SIZE(T), data, device); \
 })
-#define intel_gt_live_subtests(T, data) ({ \
+#define intel_gt_live_subtests(T, data, device) ({ \
 	typecheck(struct intel_gt *, data); \
 	(data)->uc.guc.submission_state.sched_disable_delay_ms = 0; \
 	__i915_subtests(__func__, \
 			__intel_gt_live_setup, __intel_gt_live_teardown, \
-			T, ARRAY_SIZE(T), data); \
+			T, ARRAY_SIZE(T), data, device); \
 })
 
 #define SUBTEST(x) { x, #x }
drivers/gpu/drm/i915/selftests/i915_active.c +1 -1
index 79b55df1e71a..8bb9994aa116 100644
@@ -262,7 +262,7 @@ int i915_active_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_subtests(tests, i915);
+	return i915_subtests(tests, i915, &i915->drm);
 }
 
 static struct intel_engine_cs *node_to_barrier(struct active_node *it)
drivers/gpu/drm/i915/selftests/i915_gem.c +1 -1
index ad650f67114a..e5ee5ddad81a 100644
@@ -258,5 +258,5 @@ int i915_gem_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/selftests/i915_gem_evict.c +2 -2
index 604289814f79..5abb0b9d7ae7 100644
@@ -571,7 +571,7 @@ int i915_gem_evict_mock_selftests(void)
 		return -ENOMEM;
 
 	with_intel_runtime_pm(&i915->runtime_pm, wakeref)
-		err = i915_subtests(tests, to_gt(i915));
+		err = i915_subtests(tests, to_gt(i915), &i915->drm);
 
 	mock_destroy_device(i915);
 	return err;
@@ -586,5 +586,5 @@ int i915_gem_evict_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +2 -2
index 0c855f00c3ae..5c3f9626f19a 100644
@@ -2004,7 +2004,7 @@ int i915_gem_gtt_mock_selftests(void)
 
 	mock_init_ggtt(gt);
 
-	err = i915_subtests(tests, gt->ggtt);
+	err = i915_subtests(tests, gt->ggtt, &i915->drm);
 
 	mock_device_flush(i915);
 	i915_gem_drain_freed_objects(i915);
@@ -2038,5 +2038,5 @@ int i915_gem_gtt_live_selftests(struct drm_i915_private *i915)
 
 	GEM_BUG_ON(offset_in_page(to_gt(i915)->ggtt->vm.total));
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/selftests/i915_perf.c +1 -1
index d2a1a901d47b..7b95b0719765 100644
@@ -442,7 +442,7 @@ int i915_perf_live_selftests(struct drm_i915_private *i915)
 	if (err)
 		return err;
 
-	err = i915_live_subtests(tests, i915);
+	err = i915_live_subtests(tests, i915, &i915->drm);
 
 	destroy_empty_config(&i915->perf);
 
drivers/gpu/drm/i915/selftests/i915_request.c +3 -3
index 431298f774e6..5c4d8137916c 100644
@@ -572,7 +572,7 @@ int i915_request_mock_selftests(void)
 		return -ENOMEM;
 
 	with_intel_runtime_pm(&i915->runtime_pm, wakeref)
-		err = i915_subtests(tests, i915);
+		err = i915_subtests(tests, i915, &i915->drm);
 
 	mock_destroy_device(i915);
 
@@ -1928,7 +1928,7 @@ int i915_request_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
 
 static int switch_to_kernel_sync(struct intel_context *ce, int err)
@@ -3354,5 +3354,5 @@ int i915_request_perf_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_subtests(tests, i915);
+	return i915_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/selftests/i915_selftest.c +47 -16

130 lines not on this page · raw message

drivers/gpu/drm/i915/selftests/i915_sw_fence.c +1 -1
index ecb2d718f6a6..ddb3c63ddd63 100644
@@ -763,5 +763,5 @@ int i915_sw_fence_mock_selftests(void)
 		SUBTEST(test_dma_fence),
 	};
 
-	return i915_subtests(tests, NULL);
+	return i915_subtests(tests, NULL, NULL);
 }
drivers/gpu/drm/i915/selftests/i915_syncmap.c +1 -1
index 88fa845e9f4a..163782c7c276 100644
@@ -612,5 +612,5 @@ int i915_syncmap_mock_selftests(void)
 		SUBTEST(igt_syncmap_random),
 	};
 
-	return i915_subtests(tests, NULL);
+	return i915_subtests(tests, NULL, NULL);
 }
drivers/gpu/drm/i915/selftests/i915_vma.c +2 -2
index 8e1e54ea0585..c754de5afa02 100644
@@ -997,7 +997,7 @@ int i915_vma_mock_selftests(void)
 
 	mock_init_ggtt(gt);
 
-	err = i915_subtests(tests, gt->ggtt);
+	err = i915_subtests(tests, gt->ggtt, &i915->drm);
 
 	mock_device_flush(i915);
 	i915_gem_drain_freed_objects(i915);
@@ -1163,5 +1163,5 @@ int i915_vma_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(igt_vma_remapped_gtt),
 	};
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/selftests/intel_memory_region.c +3 -3
index 8307390943a2..ba6e6c5bbb2f 100644
@@ -1363,7 +1363,7 @@ int intel_memory_region_mock_selftests(void)
 		goto out_unref;
 	}
 
-	err = i915_subtests(tests, mem);
+	err = i915_subtests(tests, mem, &i915->drm);
 
 	intel_memory_region_destroy(mem);
 out_unref:
@@ -1389,7 +1389,7 @@ int intel_memory_region_live_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
 
 int intel_memory_region_perf_selftests(struct drm_i915_private *i915)
@@ -1401,5 +1401,5 @@ int intel_memory_region_perf_selftests(struct drm_i915_private *i915)
 	if (intel_gt_is_wedged(to_gt(i915)))
 		return 0;
 
-	return i915_live_subtests(tests, i915);
+	return i915_live_subtests(tests, i915, &i915->drm);
 }
drivers/gpu/drm/i915/selftests/intel_uncore.c +1 -1
index 1f58024150fa..a1b77e752379 100644
@@ -296,5 +296,5 @@ int intel_uncore_live_selftests(struct drm_i915_private *i915)
 		SUBTEST(live_forcewake_ops),
 	};
 
-	return intel_gt_live_subtests(tests, to_gt(i915));
+	return intel_gt_live_subtests(tests, to_gt(i915), &i915->drm);
 }
drivers/gpu/drm/i915/selftests/scatterlist.c +1 -1
index 7e59591bbed6..88ad1d7e14f7 100644
@@ -380,5 +380,5 @@ int scatterlist_mock_selftests(void)
 		SUBTEST(igt_sg_trim),
 	};
 
-	return i915_subtests(tests, NULL);
+	return i915_subtests(tests, NULL, NULL);
 }
Signature · 1 line
2.34.1
#31 lore raw

Re: [PATCH v3 8/8] drm/i915/selftests: Add drm_device to selftest wrappers

Hi Krzysztof,

...

Quoted 14 lines
drivers/gpu/drm/i915/i915_selftest.h +4 -4
@@ -88,24 +89,25 @@ int __i915_subtests(const char *caller,
 		    int (*teardown)(int err, void *data),
 		    const struct i915_subtest *st,
 		    unsigned int count,
-		    void *data);
-#define i915_subtests(T, data) \
+		    void *data,
+		    struct drm_device *device);
+#define i915_subtests(T, data, device) \
 	__i915_subtests(__func__, \
 			__i915_nop_setup, __i915_nop_teardown, \
-			T, ARRAY_SIZE(T), data)
-#define i915_live_subtests(T, data) ({ \
+			T, ARRAY_SIZE(T), data, device)

drivers/gpu/drm/i915/i915_selftest.h int __i915_subtests(const char *caller, · line 105

Quoted 10 lines
drivers/gpu/drm/i915/i915_selftest.h +3 -2
+#define i915_live_subtests(T, data, device) ({ \
 	typecheck(struct drm_i915_private *, data); \
 	(data)->gt[0]->uc.guc.submission_state.sched_disable_delay_ms = 0; \
 	__i915_subtests(__func__, \
 			__i915_live_setup, __i915_live_teardown, \
-			T, ARRAY_SIZE(T), data); \
+			T, ARRAY_SIZE(T), data, device); \
 })
-#define intel_gt_live_subtests(T, data) ({ \
+#define intel_gt_live_subtests(T, data, device) ({ \

As I stated in my previous review, here perhaps it's better to use gt_*() and we can drop this change. What do you think?

Andi

Quoted 7 lines
drivers/gpu/drm/i915/i915_selftest.h +1 -1
 	typecheck(struct intel_gt *, data); \
 	(data)->uc.guc.submission_state.sched_disable_delay_ms = 0; \
 	__i915_subtests(__func__, \
 			__intel_gt_live_setup, __intel_gt_live_teardown, \
-			T, ARRAY_SIZE(T), data); \
+			T, ARRAY_SIZE(T), data, device); \
 })
#32 lore raw

✗ i915.CI.BAT: failure for drm/i915/selftests: Modernize printing in i915 selftests (rev4)

In reply to Krzysztof Karas
== Series Details ==

== Series Details ==

Series: drm/i915/selftests: Modernize printing in i915 selftests (rev4)
URL : https://patchwork.freedesktop.org/series/171991/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_19057 -> Patchwork_171991v4
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_171991v4 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_171991v4, please notify your bug team ([email protected]) 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_171991v4/index.html

Participating hosts (39 -> 39)
------------------------------

Additional (2): fi-hsw-4770 bat-arls-5
Missing (2): bat-dg2-13 fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live:
- fi-bsw-n3050: [PASS][1] -> [DMESG-WARN][2] +1 other test dmesg-warn
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/fi-bsw-n3050/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-bsw-n3050/igt@[email protected]
- bat-dg1-7: [PASS][3] -> [DMESG-WARN][4] +1 other test dmesg-warn
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/bat-dg1-7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-dg1-7/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- fi-tgl-1115g4: NOTRUN -> [DMESG-WARN][5] +1 other test dmesg-warn
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@gt_tlb:
- fi-kbl-7567u: [PASS][6] -> [DMESG-WARN][7] +1 other test dmesg-warn
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/fi-kbl-7567u/igt@i915_selftest@live@gt_tlb.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-kbl-7567u/igt@i915_selftest@live@gt_tlb.html
- fi-cfl-guc: [PASS][8] -> [DMESG-WARN][9] +1 other test dmesg-warn
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/fi-cfl-guc/igt@i915_selftest@live@gt_tlb.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-cfl-guc/igt@i915_selftest@live@gt_tlb.html
- bat-adlp-11: [PASS][10] -> [DMESG-WARN][11] +1 other test dmesg-warn
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/bat-adlp-11/igt@i915_selftest@live@gt_tlb.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-adlp-11/igt@i915_selftest@live@gt_tlb.html
- bat-dg1-6: [PASS][12] -> [DMESG-WARN][13] +1 other test dmesg-warn
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/bat-dg1-6/igt@i915_selftest@live@gt_tlb.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-dg1-6/igt@i915_selftest@live@gt_tlb.html
- bat-adlp-6: [PASS][14] -> [DMESG-WARN][15] +1 other test dmesg-warn
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/bat-adlp-6/igt@i915_selftest@live@gt_tlb.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-adlp-6/igt@i915_selftest@live@gt_tlb.html
- fi-cfl-8700k: [PASS][16] -> [DMESG-WARN][17] +1 other test dmesg-warn
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/fi-cfl-8700k/igt@i915_selftest@live@gt_tlb.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-cfl-8700k/igt@i915_selftest@live@gt_tlb.html
- fi-bsw-nick: [PASS][18] -> [DMESG-WARN][19] +1 other test dmesg-warn
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/fi-bsw-nick/igt@i915_selftest@live@gt_tlb.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-bsw-nick/igt@i915_selftest@live@gt_tlb.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_lmem_swapping@basic:
- bat-arls-5: NOTRUN -> [SKIP][20] ([i915#10213] / [i915#11671]) +3 other tests skip
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- fi-tgl-1115g4: NOTRUN -> [SKIP][21] ([i915#4613]) +3 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@[email protected]

* igt@gem_mmap@basic:
- bat-arls-5: NOTRUN -> [SKIP][22] ([i915#4083])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@gem_render_tiled_blits@basic:
- bat-arls-5: NOTRUN -> [SKIP][23] ([i915#10197] / [i915#10211] / [i915#4079])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@gem_softpin@allocator-basic-reserve:
- fi-hsw-4770: NOTRUN -> [SKIP][24] +15 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-hsw-4770/igt@[email protected]

* igt@gem_tiled_blits@basic:
- bat-arls-5: NOTRUN -> [SKIP][25] ([i915#12637] / [i915#4077]) +2 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@gem_tiled_pread_basic@basic:
- bat-arls-5: NOTRUN -> [SKIP][26] ([i915#15657])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@i915_pm_rps@basic-api:
- bat-arls-5: NOTRUN -> [SKIP][27] ([i915#10209] / [i915#11681])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@intel_hwmon@hwmon-read:
- bat-arls-5: NOTRUN -> [SKIP][28] ([i915#7707]) +1 other test skip
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- fi-hsw-4770: NOTRUN -> [SKIP][29] ([i915#5190])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-hsw-4770/igt@[email protected]
- bat-arls-5: NOTRUN -> [SKIP][30] ([i915#10200] / [i915#12203])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@kms_addfb_basic@clobberred-modifier:
- bat-arls-5: NOTRUN -> [SKIP][31] ([i915#10200]) +8 other tests skip
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-arls-5: NOTRUN -> [SKIP][32] ([i915#10202]) +1 other test skip
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@kms_dsc@dsc-basic:
- bat-arls-5: NOTRUN -> [SKIP][33] ([i915#16361])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-arls-5: NOTRUN -> [SKIP][34] ([i915#10207])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]
- fi-tgl-1115g4: NOTRUN -> [SKIP][35]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@[email protected]

* igt@kms_hdmi_inject@inject-audio:
- fi-tgl-1115g4: NOTRUN -> [FAIL][36] ([i915#16664])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@[email protected]

* igt@kms_pm_backlight@basic-brightness:
- bat-arls-5: NOTRUN -> [SKIP][37] ([i915#9812])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]
- fi-tgl-1115g4: NOTRUN -> [SKIP][38] ([i915#12343] / [i915#9812])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@[email protected]

* igt@kms_psr@psr-primary-page-flip:
- bat-arls-5: NOTRUN -> [SKIP][39] ([i915#9732]) +3 other tests skip
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]
- fi-tgl-1115g4: NOTRUN -> [SKIP][40] ([i915#9732]) +3 other tests skip
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@[email protected]

* igt@kms_psr@psr-sprite-plane-onoff:
- fi-hsw-4770: NOTRUN -> [SKIP][41] ([i915#1072]) +3 other tests skip
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-hsw-4770/igt@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- bat-arls-5: NOTRUN -> [SKIP][42] ([i915#10208] / [i915#8809])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]
- fi-tgl-1115g4: NOTRUN -> [SKIP][43] ([i915#3555])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@[email protected]

* igt@prime_vgem@basic-fence-read:
- bat-arls-5: NOTRUN -> [SKIP][44] ([i915#10212] / [i915#3708])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@prime_vgem@basic-gtt:
- bat-arls-5: NOTRUN -> [SKIP][45] ([i915#12637] / [i915#3708] / [i915#4077]) +1 other test skip
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@prime_vgem@basic-read:
- bat-arls-5: NOTRUN -> [SKIP][46] ([i915#10214] / [i915#3708])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

* igt@prime_vgem@basic-write:
- bat-arls-5: NOTRUN -> [SKIP][47] ([i915#10216] / [i915#3708])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/bat-arls-5/igt@[email protected]

#### Possible fixes ####

* igt@kms_flip@basic-flip-vs-dpms@d-hdmi-a1:
- fi-tgl-1115g4: [ABORT][48] ([i915#16837] / [i915#16872] / [i915#16881]) -> [PASS][49] +1 other test pass
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19057/fi-tgl-1115g4/igt@kms_flip@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v4/fi-tgl-1115g4/igt@kms_flip@[email protected]

[i915#10197]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10197
[i915#10200]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10200
[i915#10202]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10202
[i915#10207]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10207
[i915#10208]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10208
[i915#10209]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10209
[i915#10211]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10211
[i915#10212]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10212
[i915#10213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10213
[i915#10214]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10214
[i915#10216]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10216
[i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072
[i915#11671]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11671
[i915#11681]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11681
[i915#12203]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12203
[i915#12343]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12343
[i915#12637]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12637
[i915#15657]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15657
[i915#16361]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16361
[i915#16664]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16664
[i915#16837]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16837
[i915#16872]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16872
[i915#16881]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16881
[i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083
[i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190
[i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707
[i915#8809]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8809
[i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732
[i915#9812]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9812

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

* Linux: CI_DRM_19057 -> Patchwork_171991v4

CI-20190529: 20190529
CI_DRM_19057: 5901f93eb5a007e8b7c21ca2b5bfae5958467832 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_9078: 9078
Patchwork_171991v4: 5901f93eb5a007e8b7c21ca2b5bfae5958467832 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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