* [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 10:05 ` sashiko-bot
2026-08-18 9:56 ` [PATCH v2 2/8] drm/i915/selftest: Fix a typo in alloc_workqueue call Krzysztof Karas
` (7 subsequent siblings)
8 siblings, 1 reply; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
.../gpu/drm/i915/selftests/i915_sw_fence.c | 92 +++++++------
drivers/gpu/drm/i915/selftests/i915_syncmap.c | 129 ++++++++++--------
drivers/gpu/drm/i915/selftests/scatterlist.c | 45 +++---
3 files changed, 144 insertions(+), 122 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
index 6a305322e30d..462704e575f5 100644
--- a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
@@ -26,6 +26,8 @@
#include <linux/delay.h>
#include <linux/prime_numbers.h>
+#include <drm/drm_print.h>
+
#include "../i915_selftest.h"
static int
@@ -107,7 +109,7 @@ static int test_dag(void *arg)
return -ENOMEM;
if (i915_sw_fence_await_sw_fence_gfp(A, A, GFP_KERNEL) != -EINVAL) {
- pr_err("recursive cycle not detected (AA)\n");
+ drm_err(NULL, "recursive cycle not detected (AA)\n");
goto err_A;
}
@@ -119,7 +121,7 @@ static int test_dag(void *arg)
i915_sw_fence_await_sw_fence_gfp(A, B, GFP_KERNEL);
if (i915_sw_fence_await_sw_fence_gfp(B, A, GFP_KERNEL) != -EINVAL) {
- pr_err("single depth cycle not detected (BAB)\n");
+ drm_err(NULL, "single depth cycle not detected (BAB)\n");
goto err_B;
}
@@ -130,19 +132,19 @@ static int test_dag(void *arg)
}
if (i915_sw_fence_await_sw_fence_gfp(B, C, GFP_KERNEL) == -EINVAL) {
- pr_err("invalid cycle detected\n");
+ drm_err(NULL, "invalid cycle detected\n");
goto err_C;
}
if (i915_sw_fence_await_sw_fence_gfp(C, B, GFP_KERNEL) != -EINVAL) {
- pr_err("single depth cycle not detected (CBC)\n");
+ drm_err(NULL, "single depth cycle not detected (CBC)\n");
goto err_C;
}
if (i915_sw_fence_await_sw_fence_gfp(C, A, GFP_KERNEL) != -EINVAL) {
- pr_err("cycle not detected (BA, CB, AC)\n");
+ drm_err(NULL, "cycle not detected (BA, CB, AC)\n");
goto err_C;
}
if (i915_sw_fence_await_sw_fence_gfp(A, C, GFP_KERNEL) == -EINVAL) {
- pr_err("invalid cycle detected\n");
+ drm_err(NULL, "invalid cycle detected\n");
goto err_C;
}
@@ -152,15 +154,15 @@ static int test_dag(void *arg)
ret = 0;
if (!i915_sw_fence_done(C)) {
- pr_err("fence C not done\n");
+ drm_err(NULL, "fence C not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(B)) {
- pr_err("fence B not done\n");
+ drm_err(NULL, "fence B not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(A)) {
- pr_err("fence A not done\n");
+ drm_err(NULL, "fence A not done\n");
ret = -EINVAL;
}
err_C:
@@ -191,7 +193,7 @@ static int test_AB(void *arg)
if (ret < 0)
goto err_B;
if (ret == 0) {
- pr_err("Incorrectly reported fence A was complete before await\n");
+ drm_err(NULL, "Incorrectly reported fence A was complete before await\n");
ret = -EINVAL;
goto err_B;
}
@@ -203,12 +205,12 @@ static int test_AB(void *arg)
i915_sw_fence_commit(B);
if (!i915_sw_fence_done(B)) {
- pr_err("Fence B is not done\n");
+ drm_err(NULL, "Fence B is not done\n");
goto err_B;
}
if (!i915_sw_fence_done(A)) {
- pr_err("Fence A is not done\n");
+ drm_err(NULL, "Fence A is not done\n");
goto err_B;
}
@@ -246,7 +248,7 @@ static int test_ABC(void *arg)
if (ret < 0)
goto err_C;
if (ret == 0) {
- pr_err("Incorrectly reported fence B was complete before await\n");
+ drm_err(NULL, "Incorrectly reported fence B was complete before await\n");
goto err_C;
}
@@ -254,25 +256,25 @@ static int test_ABC(void *arg)
if (ret < 0)
goto err_C;
if (ret == 0) {
- pr_err("Incorrectly reported fence C was complete before await\n");
+ drm_err(NULL, "Incorrectly reported fence C was complete before await\n");
goto err_C;
}
ret = -EINVAL;
i915_sw_fence_commit(A);
if (i915_sw_fence_done(A)) {
- pr_err("Fence A completed early\n");
+ drm_err(NULL, "Fence A completed early\n");
goto err_C;
}
i915_sw_fence_commit(B);
if (i915_sw_fence_done(B)) {
- pr_err("Fence B completed early\n");
+ drm_err(NULL, "Fence B completed early\n");
goto err_C;
}
if (i915_sw_fence_done(A)) {
- pr_err("Fence A completed early (after signaling B)\n");
+ drm_err(NULL, "Fence A completed early (after signaling B)\n");
goto err_C;
}
@@ -280,15 +282,15 @@ static int test_ABC(void *arg)
ret = 0;
if (!i915_sw_fence_done(C)) {
- pr_err("Fence C not done\n");
+ drm_err(NULL, "Fence C not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(B)) {
- pr_err("Fence B not done\n");
+ drm_err(NULL, "Fence B not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(A)) {
- pr_err("Fence A not done\n");
+ drm_err(NULL, "Fence A not done\n");
ret = -EINVAL;
}
err_C:
@@ -343,28 +345,28 @@ static int test_AB_C(void *arg)
ret = 0;
if (i915_sw_fence_done(A)) {
- pr_err("Fence A completed early\n");
+ drm_err(NULL, "Fence A completed early\n");
ret = -EINVAL;
}
if (i915_sw_fence_done(B)) {
- pr_err("Fence B completed early\n");
+ drm_err(NULL, "Fence B completed early\n");
ret = -EINVAL;
}
i915_sw_fence_commit(C);
if (!i915_sw_fence_done(C)) {
- pr_err("Fence C not done\n");
+ drm_err(NULL, "Fence C not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(B)) {
- pr_err("Fence B not done\n");
+ drm_err(NULL, "Fence B not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(A)) {
- pr_err("Fence A not done\n");
+ drm_err(NULL, "Fence A not done\n");
ret = -EINVAL;
}
@@ -424,17 +426,17 @@ static int test_C_AB(void *arg)
i915_sw_fence_commit(B);
if (!i915_sw_fence_done(A)) {
- pr_err("Fence A not done\n");
+ drm_err(NULL, "Fence A not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(B)) {
- pr_err("Fence B not done\n");
+ drm_err(NULL, "Fence B not done\n");
ret = -EINVAL;
}
if (!i915_sw_fence_done(C)) {
- pr_err("Fence C not done\n");
+ drm_err(NULL, "Fence C not done\n");
ret = -EINVAL;
}
@@ -483,14 +485,14 @@ static int test_chain(void *arg)
for (i = nfences; --i; ) {
if (i915_sw_fence_done(fences[i])) {
if (ret == 0)
- pr_err("Fence[%d] completed early\n", i);
+ drm_err(NULL, "Fence[%d] completed early\n", i);
ret = -EINVAL;
}
}
i915_sw_fence_commit(fences[0]);
for (i = 0; ret == 0 && i < nfences; i++) {
if (!i915_sw_fence_done(fences[i])) {
- pr_err("Fence[%d] is not done\n", i);
+ drm_err(NULL, "Fence[%d] is not done\n", i);
ret = -EINVAL;
}
}
@@ -553,7 +555,7 @@ static int test_ipc(void *arg)
usleep_range(1000, 2000);
if (READ_ONCE(ipc.value)) {
- pr_err("worker updated value before i915_sw_fence was signaled\n");
+ drm_err(NULL, "worker updated value before i915_sw_fence was signaled\n");
ret = -EINVAL;
}
@@ -561,7 +563,7 @@ static int test_ipc(void *arg)
i915_sw_fence_wait(ipc.out);
if (!READ_ONCE(ipc.value)) {
- pr_err("worker signaled i915_sw_fence before value was posted\n");
+ drm_err(NULL, "worker signaled i915_sw_fence before value was posted\n");
ret = -EINVAL;
}
@@ -584,7 +586,7 @@ static int test_timer(void *arg)
preempt_disable();
timed_fence_init(&tf, target = jiffies);
if (!i915_sw_fence_done(&tf.fence)) {
- pr_err("Fence with immediate expiration not signaled\n");
+ drm_err(NULL, "Fence with immediate expiration not signaled\n");
goto err;
}
preempt_enable();
@@ -594,7 +596,9 @@ static int test_timer(void *arg)
preempt_disable();
timed_fence_init(&tf, target = jiffies + delay);
if (i915_sw_fence_done(&tf.fence)) {
- pr_err("Fence with future expiration (%lu jiffies) already signaled\n", delay);
+ drm_err(NULL,
+ "Fence with future expiration (%lu jiffies) already signaled\n",
+ delay);
goto err;
}
preempt_enable();
@@ -603,12 +607,12 @@ static int test_timer(void *arg)
preempt_disable();
if (!i915_sw_fence_done(&tf.fence)) {
- pr_err("Fence not signaled after wait\n");
+ drm_err(NULL, "Fence not signaled after wait\n");
goto err;
}
if (time_before(jiffies, target)) {
- pr_err("Fence signaled too early, target=%lu, now=%lu\n",
- target, jiffies);
+ drm_err(NULL, "Fence signaled too early, target=%lu, now=%lu\n",
+ target, jiffies);
goto err;
}
preempt_enable();
@@ -692,7 +696,7 @@ static int test_dma_fence(void *arg)
err = -EINVAL;
if (i915_sw_fence_done(timeout) || i915_sw_fence_done(not)) {
- pr_err("Fences immediately signaled\n");
+ drm_err(NULL, "Fences immediately signaled\n");
goto err;
}
@@ -702,25 +706,25 @@ static int test_dma_fence(void *arg)
sleep = jiffies_to_usecs(delay) / 3;
usleep_range(sleep, 2 * sleep);
if (time_after(jiffies, end)) {
- pr_debug("Slept too long, delay=%lu, (target=%lu, now=%lu) skipping\n",
- delay, end, jiffies);
+ drm_dbg(NULL, "Slept too long, delay=%lu, (target=%lu, now=%lu) skipping\n",
+ delay, end, jiffies);
goto skip;
}
if (i915_sw_fence_done(timeout) || i915_sw_fence_done(not)) {
- pr_err("Fences signaled too early\n");
+ drm_err(NULL, "Fences signaled too early\n");
goto err;
}
if (!wait_event_timeout(timeout->wait,
i915_sw_fence_done(timeout),
2 * (end - jiffies) + 1)) {
- pr_err("Timeout fence unsignaled!\n");
+ drm_err(NULL, "Timeout fence unsignaled!\n");
goto err;
}
if (i915_sw_fence_done(not)) {
- pr_err("No timeout fence signaled!\n");
+ drm_err(NULL, "No timeout fence signaled!\n");
goto err;
}
@@ -728,7 +732,7 @@ static int test_dma_fence(void *arg)
dma_fence_signal(dma);
if (!i915_sw_fence_done(timeout) || !i915_sw_fence_done(not)) {
- pr_err("Fences unsignaled\n");
+ drm_err(NULL, "Fences unsignaled\n");
goto err;
}
diff --git a/drivers/gpu/drm/i915/selftests/i915_syncmap.c b/drivers/gpu/drm/i915/selftests/i915_syncmap.c
index 88fa845e9f4a..3eae3c6fa312 100644
--- a/drivers/gpu/drm/i915/selftests/i915_syncmap.c
+++ b/drivers/gpu/drm/i915/selftests/i915_syncmap.c
@@ -25,6 +25,8 @@
#include "../i915_selftest.h"
#include "i915_random.h"
+#include <drm/drm_print.h>
+
static char *
__sync_print(struct i915_syncmap *p,
char *buf, unsigned long *sz,
@@ -102,7 +104,7 @@ static int check_syncmap_free(struct i915_syncmap **sync)
{
i915_syncmap_free(sync);
if (*sync) {
- pr_err("sync not cleared after free\n");
+ drm_err(NULL, "sync not cleared after free\n");
return -EINVAL;
}
@@ -121,7 +123,7 @@ static int dump_syncmap(struct i915_syncmap *sync, int err)
goto skip;
if (i915_syncmap_print_to_buf(sync, buf, PAGE_SIZE))
- pr_err("%s", buf);
+ drm_err(NULL, "%s", buf);
kfree(buf);
@@ -146,14 +148,13 @@ static int igt_syncmap_init(void *arg)
static int check_seqno(struct i915_syncmap *leaf, unsigned int idx, u32 seqno)
{
if (leaf->height) {
- pr_err("%s: not a leaf, height is %d\n",
- __func__, leaf->height);
+ drm_err(NULL, "%s: not a leaf, height is %d\n", __func__, leaf->height);
return -EINVAL;
}
if (__sync_seqno(leaf)[idx] != seqno) {
- pr_err("%s: seqno[%d], found %x, expected %x\n",
- __func__, idx, __sync_seqno(leaf)[idx], seqno);
+ drm_err(NULL, "%s: seqno[%d], found %x, expected %x\n",
+ __func__, idx, __sync_seqno(leaf)[idx], seqno);
return -EINVAL;
}
@@ -169,20 +170,21 @@ static int check_one(struct i915_syncmap **sync, u64 context, u32 seqno)
return err;
if ((*sync)->height) {
- pr_err("Inserting first context=%llx did not return leaf (height=%d, prefix=%llx\n",
- context, (*sync)->height, (*sync)->prefix);
+ drm_err(NULL,
+ "Inserting first context=%llx did not return leaf (height=%d, prefix=%llx\n",
+ context, (*sync)->height, (*sync)->prefix);
return -EINVAL;
}
if ((*sync)->parent) {
- pr_err("Inserting first context=%llx created branches!\n",
- context);
+ drm_err(NULL, "Inserting first context=%llx created branches!\n", context);
return -EINVAL;
}
if (hweight32((*sync)->bitmap) != 1) {
- pr_err("First bitmap does not contain a single entry, found %x (count=%d)!\n",
- (*sync)->bitmap, hweight32((*sync)->bitmap));
+ drm_err(NULL,
+ "First bitmap does not contain a single entry, found %x (count=%d)!\n",
+ (*sync)->bitmap, hweight32((*sync)->bitmap));
return -EINVAL;
}
@@ -191,8 +193,7 @@ static int check_one(struct i915_syncmap **sync, u64 context, u32 seqno)
return err;
if (!i915_syncmap_is_later(sync, context, seqno)) {
- pr_err("Lookup of first context=%llx/seqno=%x failed!\n",
- context, seqno);
+ drm_err(NULL, "Lookup of first context=%llx/seqno=%x failed!\n", context, seqno);
return -EINVAL;
}
@@ -229,8 +230,8 @@ static int igt_syncmap_one(void *arg)
}
max++;
} while (!__igt_timeout(end_time, NULL));
- pr_debug("%s: Completed %lu single insertions\n",
- __func__, max * (max - 1) / 2);
+ drm_dbg(NULL, "%s: Completed %lu single insertions\n",
+ __func__, max * (max - 1) / 2);
out:
return dump_syncmap(sync, err);
}
@@ -244,14 +245,16 @@ static int check_leaf(struct i915_syncmap **sync, u64 context, u32 seqno)
return err;
if ((*sync)->height) {
- pr_err("Inserting context=%llx did not return leaf (height=%d, prefix=%llx\n",
- context, (*sync)->height, (*sync)->prefix);
+ drm_err(NULL,
+ "Inserting context=%llx did not return leaf (height=%d, prefix=%llx\n",
+ context, (*sync)->height, (*sync)->prefix);
return -EINVAL;
}
if (hweight32((*sync)->bitmap) != 1) {
- pr_err("First entry into leaf (context=%llx) does not contain a single entry, found %x (count=%d)!\n",
- context, (*sync)->bitmap, hweight32((*sync)->bitmap));
+ drm_err(NULL,
+ "First entry into leaf (context=%llx) does not contain a single entry, found %x (count=%d)!\n",
+ context, (*sync)->bitmap, hweight32((*sync)->bitmap));
return -EINVAL;
}
@@ -260,8 +263,8 @@ static int check_leaf(struct i915_syncmap **sync, u64 context, u32 seqno)
return err;
if (!i915_syncmap_is_later(sync, context, seqno)) {
- pr_err("Lookup of first entry context=%llx/seqno=%x failed!\n",
- context, seqno);
+ drm_err(NULL, "Lookup of first entry context=%llx/seqno=%x failed!\n",
+ context, seqno);
return -EINVAL;
}
@@ -306,20 +309,20 @@ static int igt_syncmap_join_above(void *arg)
continue;
if (!join->height) {
- pr_err("Parent with no height!\n");
+ drm_err(NULL, "Parent with no height!\n");
err = -EINVAL;
goto out;
}
if (hweight32(join->bitmap) != 2) {
- pr_err("Join does not have 2 children: %x (%d)\n",
- join->bitmap, hweight32(join->bitmap));
+ drm_err(NULL, "Join does not have 2 children: %x (%d)\n",
+ join->bitmap, hweight32(join->bitmap));
err = -EINVAL;
goto out;
}
if (__sync_child(join)[__sync_branch_idx(join, context)] != sync) {
- pr_err("Leaf misplaced in parent!\n");
+ drm_err(NULL, "Leaf misplaced in parent!\n");
err = -EINVAL;
goto out;
}
@@ -350,8 +353,9 @@ static int igt_syncmap_join_below(void *arg)
goto out;
if (sync->height) {
- pr_err("Inserting context=%llx (order=%d, step=%d) did not return leaf (height=%d, prefix=%llx\n",
- context, order, step, sync->height, sync->prefix);
+ drm_err(NULL,
+ "Inserting context=%llx (order=%d, step=%d) did not return leaf (height=%d, prefix=%llx\n",
+ context, order, step, sync->height, sync->prefix);
err = -EINVAL;
goto out;
}
@@ -363,16 +367,17 @@ static int igt_syncmap_join_below(void *arg)
u64 context = step * BIT_ULL(order);
if (!i915_syncmap_is_later(&sync, context, 0)) {
- pr_err("1: context %llx (order=%d, step=%d) not found\n",
- context, order, step);
+ drm_err(NULL, "1: context %llx (order=%d, step=%d) not found\n",
+ context, order, step);
err = -EINVAL;
goto out;
}
for (idx = 1; idx < KSYNCMAP; idx++) {
if (i915_syncmap_is_later(&sync, context + idx, 0)) {
- pr_err("1: context %llx (order=%d, step=%d) should not exist\n",
- context + idx, order, step);
+ drm_err(NULL,
+ "1: context %llx (order=%d, step=%d) should not exist\n",
+ context + idx, order, step);
err = -EINVAL;
goto out;
}
@@ -385,8 +390,8 @@ static int igt_syncmap_join_below(void *arg)
u64 context = step * BIT_ULL(order);
if (!i915_syncmap_is_later(&sync, context, 0)) {
- pr_err("2: context %llx (order=%d, step=%d) not found\n",
- context, order, step);
+ drm_err(NULL, "2: context %llx (order=%d, step=%d) not found\n",
+ context, order, step);
err = -EINVAL;
goto out;
}
@@ -423,17 +428,19 @@ static int igt_syncmap_neighbours(void *arg)
goto out;
if (sync->height) {
- pr_err("Inserting context=%llx did not return leaf (height=%d, prefix=%llx\n",
- context, sync->height, sync->prefix);
+ drm_err(NULL,
+ "Inserting context=%llx did not return leaf (height=%d, prefix=%llx\n",
+ context, sync->height, sync->prefix);
err = -EINVAL;
goto out;
}
if (sync->bitmap != BIT(idx + 1) - 1) {
- pr_err("Inserting neighbouring context=0x%llx+%d, did not fit into the same leaf bitmap=%x (%d), expected %lx (%d)\n",
- context, idx,
- sync->bitmap, hweight32(sync->bitmap),
- BIT(idx + 1) - 1, idx + 1);
+ drm_err(NULL,
+ "Inserting neighbouring context=0x%llx+%d, did not fit into the same leaf bitmap=%x (%d), expected %lx (%d)\n",
+ context, idx,
+ sync->bitmap, hweight32(sync->bitmap),
+ BIT(idx + 1) - 1, idx + 1);
err = -EINVAL;
goto out;
}
@@ -473,9 +480,10 @@ static int igt_syncmap_compact(void *arg)
goto out;
if (sync->height) {
- pr_err("Inserting context=%llx (order=%d, idx=%d) did not return leaf (height=%d, prefix=%llx\n",
- context, order, idx,
- sync->height, sync->prefix);
+ drm_err(NULL,
+ "Inserting context=%llx (order=%d, idx=%d) did not return leaf (height=%d, prefix=%llx\n",
+ context, order, idx,
+ sync->height, sync->prefix);
err = -EINVAL;
goto out;
}
@@ -483,22 +491,23 @@ static int igt_syncmap_compact(void *arg)
sync = sync->parent;
if (sync->parent) {
- pr_err("Parent (join) of last leaf was not the sync!\n");
+ drm_err(NULL, "Parent (join) of last leaf was not the sync!\n");
err = -EINVAL;
goto out;
}
if (sync->height != order) {
- pr_err("Join does not have the expected height, found %d, expected %d\n",
- sync->height, order);
+ drm_err(NULL,
+ "Join does not have the expected height, found %d, expected %d\n",
+ sync->height, order);
err = -EINVAL;
goto out;
}
if (sync->bitmap != BIT(KSYNCMAP) - 1) {
- pr_err("Join is not full!, found %x (%d) expected %lx (%d)\n",
- sync->bitmap, hweight32(sync->bitmap),
- BIT(KSYNCMAP) - 1, KSYNCMAP);
+ drm_err(NULL, "Join is not full!, found %x (%d) expected %lx (%d)\n",
+ sync->bitmap, hweight32(sync->bitmap),
+ BIT(KSYNCMAP) - 1, KSYNCMAP);
err = -EINVAL;
goto out;
}
@@ -508,28 +517,28 @@ static int igt_syncmap_compact(void *arg)
struct i915_syncmap *leaf = __sync_child(sync)[idx];
if (leaf->height) {
- pr_err("Child %d is a not leaf!\n", idx);
+ drm_err(NULL, "Child %d is a not leaf!\n", idx);
err = -EINVAL;
goto out;
}
if (leaf->parent != sync) {
- pr_err("Child %d is not attached to us!\n",
- idx);
+ drm_err(NULL, "Child %d is not attached to us!\n", idx);
err = -EINVAL;
goto out;
}
if (!is_power_of_2(leaf->bitmap)) {
- pr_err("Child %d holds more than one id, found %x (%d)\n",
- idx, leaf->bitmap, hweight32(leaf->bitmap));
+ drm_err(NULL, "Child %d holds more than one id, found %x (%d)\n",
+ idx, leaf->bitmap, hweight32(leaf->bitmap));
err = -EINVAL;
goto out;
}
if (leaf->bitmap != BIT(idx)) {
- pr_err("Child %d has wrong seqno idx, found %d, expected %d\n",
- idx, ilog2(leaf->bitmap), idx);
+ drm_err(NULL,
+ "Child %d has wrong seqno idx, found %d, expected %d\n",
+ idx, ilog2(leaf->bitmap), idx);
err = -EINVAL;
goto out;
}
@@ -582,8 +591,9 @@ static int igt_syncmap_random(void *arg)
u64 context = i915_prandom_u64_state(&ctx);
if (i915_syncmap_is_later(&sync, context, seqno) != expect) {
- pr_err("context=%llu, last=%u this=%u did not match expectation (%d)\n",
- context, last_seqno, seqno, expect);
+ drm_err(NULL,
+ "context=%llu, last=%u this=%u did not match expectation (%d)\n",
+ context, last_seqno, seqno, expect);
err = -EINVAL;
goto out;
}
@@ -595,7 +605,8 @@ static int igt_syncmap_random(void *arg)
phase++;
} while (!__igt_timeout(end_time, NULL));
- pr_debug("Completed %lu passes, each of %lu contexts\n", phase, count);
+ drm_dbg(NULL, "Completed %lu passes, each of %lu contexts\n",
+ phase, count);
out:
return dump_syncmap(sync, err);
}
diff --git a/drivers/gpu/drm/i915/selftests/scatterlist.c b/drivers/gpu/drm/i915/selftests/scatterlist.c
index 7e59591bbed6..d8fbe5a8060b 100644
--- a/drivers/gpu/drm/i915/selftests/scatterlist.c
+++ b/drivers/gpu/drm/i915/selftests/scatterlist.c
@@ -24,6 +24,8 @@
#include <linux/prime_numbers.h>
#include <linux/prandom.h>
+#include <drm/drm_print.h>
+
#include "i915_selftest.h"
#include "i915_utils.h"
@@ -53,14 +55,16 @@ static noinline int expect_pfn_sg(struct pfn_table *pt,
unsigned int npages = npages_fn(n, pt->st.nents, rnd);
if (page_to_pfn(page) != pfn) {
- pr_err("%s: %s left pages out of order, expected pfn %lu, found pfn %lu (using for_each_sg)\n",
- __func__, who, pfn, page_to_pfn(page));
+ drm_err(NULL,
+ "%s: %s left pages out of order, expected pfn %lu, found pfn %lu (using for_each_sg)\n",
+ __func__, who, pfn, page_to_pfn(page));
return -EINVAL;
}
if (sg->length != npages * PAGE_SIZE) {
- pr_err("%s: %s copied wrong sg length, expected size %lu, found %u (using for_each_sg)\n",
- __func__, who, npages * PAGE_SIZE, sg->length);
+ drm_err(NULL,
+ "%s: %s copied wrong sg length, expected size %lu, found %u (using for_each_sg)\n",
+ __func__, who, npages * PAGE_SIZE, sg->length);
return -EINVAL;
}
@@ -70,8 +74,8 @@ static noinline int expect_pfn_sg(struct pfn_table *pt,
pfn += npages;
}
if (pfn != pt->end) {
- pr_err("%s: %s finished on wrong pfn, expected %lu, found %lu\n",
- __func__, who, pt->end, pfn);
+ drm_err(NULL, "%s: %s finished on wrong pfn, expected %lu, found %lu\n",
+ __func__, who, pt->end, pfn);
return -EINVAL;
}
@@ -90,8 +94,9 @@ static noinline int expect_pfn_sg_page_iter(struct pfn_table *pt,
struct page *page = sg_page_iter_page(&sgiter);
if (page != pfn_to_page(pfn)) {
- pr_err("%s: %s left pages out of order, expected pfn %lu, found pfn %lu (using for_each_sg_page)\n",
- __func__, who, pfn, page_to_pfn(page));
+ drm_err(NULL,
+ "%s: %s left pages out of order, expected pfn %lu, found pfn %lu (using for_each_sg_page)\n",
+ __func__, who, pfn, page_to_pfn(page));
return -EINVAL;
}
@@ -101,8 +106,8 @@ static noinline int expect_pfn_sg_page_iter(struct pfn_table *pt,
pfn++;
}
if (pfn != pt->end) {
- pr_err("%s: %s finished on wrong pfn, expected %lu, found %lu\n",
- __func__, who, pt->end, pfn);
+ drm_err(NULL, "%s: %s finished on wrong pfn, expected %lu, found %lu\n",
+ __func__, who, pt->end, pfn);
return -EINVAL;
}
@@ -120,8 +125,9 @@ static noinline int expect_pfn_sgtiter(struct pfn_table *pt,
pfn = pt->start;
for_each_sgt_page(page, sgt, &pt->st) {
if (page != pfn_to_page(pfn)) {
- pr_err("%s: %s left pages out of order, expected pfn %lu, found pfn %lu (using for_each_sgt_page)\n",
- __func__, who, pfn, page_to_pfn(page));
+ drm_err(NULL,
+ "%s: %s left pages out of order, expected pfn %lu, found pfn %lu (using for_each_sgt_page)\n",
+ __func__, who, pfn, page_to_pfn(page));
return -EINVAL;
}
@@ -131,8 +137,8 @@ static noinline int expect_pfn_sgtiter(struct pfn_table *pt,
pfn++;
}
if (pfn != pt->end) {
- pr_err("%s: %s finished on wrong pfn, expected %lu, found %lu\n",
- __func__, who, pt->end, pfn);
+ drm_err(NULL, "%s: %s finished on wrong pfn, expected %lu, found %lu\n",
+ __func__, who, pt->end, pfn);
return -EINVAL;
}
@@ -275,7 +281,7 @@ static const npages_fn_t npages_funcs[] = {
NULL,
};
-static int igt_sg_alloc(void *ignored)
+static int igt_sg_alloc(void *arg)
{
IGT_TIMEOUT(end_time);
const unsigned long max_order = 20; /* approximating a 4GiB object */
@@ -305,7 +311,7 @@ static int igt_sg_alloc(void *ignored)
prandom_seed_state(&prng,
i915_selftest.random_seed);
- err = expect_pfn_sgtable(&pt, *npages, &prng,
+ err = expect_pfn_sgtable(&pt, *npages, &prng,
"sg_alloc_table",
end_time);
sg_free_table(&pt.st);
@@ -322,7 +328,7 @@ static int igt_sg_alloc(void *ignored)
return 0;
}
-static int igt_sg_trim(void *ignored)
+static int igt_sg_trim(void *arg)
{
IGT_TIMEOUT(end_time);
const unsigned long max = PAGE_SIZE; /* not prime! */
@@ -348,8 +354,9 @@ static int igt_sg_trim(void *ignored)
if (i915_sg_trim(&pt.st)) {
if (pt.st.orig_nents != prime ||
pt.st.nents != prime) {
- pr_err("i915_sg_trim failed (nents %u, orig_nents %u), expected %lu\n",
- pt.st.nents, pt.st.orig_nents, prime);
+ drm_err(NULL,
+ "i915_sg_trim failed (nents %u, orig_nents %u), expected %lu\n",
+ pt.st.nents, pt.st.orig_nents, prime);
err = -EINVAL;
} else {
prandom_seed_state(&prng,
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests
2026-08-18 9:56 ` [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests Krzysztof Karas
@ 2026-08-18 10:05 ` sashiko-bot
0 siblings, 0 replies; 13+ messages in thread
From: sashiko-bot @ 2026-08-18 10:05 UTC (permalink / raw)
To: Krzysztof Karas; +Cc: intel-gfx, dri-devel
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Replacing `pr_err()` and `pr_debug()` with `drm_err(NULL, ...)` and `drm_dbg(NULL, ...)` in mock selftests pollutes the kernel log with `(NULL device *)` boilerplate.
- [Low] Incorrect indentation on `err = expect_pfn_sgtable(...);`.
- [Low] Renaming the `ignored` parameter to `arg` without using it reduces code clarity.
--
--- Patch [1]: [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests ---
commit bac5b0f26375c24916b2bc63bce26e485e392abc
Author: Krzysztof Karas <krzysztof.karas@intel.com>
drm/i915/selftests: Use drm_* prints in mock selftests
This commit replaces generic pr_* prints with drm_* versions in the mock
selftests to be more device context aware.
> diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
> index 6a305322e30db..462704e575f5b 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
[ ... ]
> @@ -107,7 +109,7 @@ static int test_dag(void *arg)
> return -ENOMEM;
>
> if (i915_sw_fence_await_sw_fence_gfp(A, A, GFP_KERNEL) != -EINVAL) {
> - pr_err("recursive cycle not detected (AA)\n");
> + drm_err(NULL, "recursive cycle not detected (AA)\n");
[Severity: Medium]
Will passing NULL to drm_err() here and elsewhere result in the log being
polluted with "(NULL device *)" boilerplate? Since mock selftests typically
run without a real device context, does using drm_err(NULL, ...) actually
provide the context mentioned in the commit message, or does it just
degrade the log output formatting?
[ ... ]
> diff --git a/drivers/gpu/drm/i915/selftests/scatterlist.c b/drivers/gpu/drm/i915/selftests/scatterlist.c
> index 7e59591bbed6c..d8fbe5a8060b6 100644
> --- a/drivers/gpu/drm/i915/selftests/scatterlist.c
> +++ b/drivers/gpu/drm/i915/selftests/scatterlist.c
[ ... ]
> @@ -275,7 +281,7 @@ static const npages_fn_t npages_funcs[] = {
> NULL,
> };
>
> -static int igt_sg_alloc(void *ignored)
> +static int igt_sg_alloc(void *arg)
[Severity: Low]
This isn't a bug, but renaming the parameter from "ignored" to "arg" makes
it less obvious that the parameter is intentionally unused. Is there a
reason this was changed?
[ ... ]
> @@ -305,7 +311,7 @@ static int igt_sg_alloc(void *ignored)
>
> prandom_seed_state(&prng,
> i915_selftest.random_seed);
> - err = expect_pfn_sgtable(&pt, *npages, &prng,
> + err = expect_pfn_sgtable(&pt, *npages, &prng,
[Severity: Low]
This isn't a bug, but it looks like this line was accidentally indented
with an extra tab, causing it to misalign with the surrounding code.
> "sg_alloc_table",
> end_time);
> sg_free_table(&pt.st);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818095624.3254368-1-krzysztof.karas@intel.com?part=1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 2/8] drm/i915/selftest: Fix a typo in alloc_workqueue call
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 3/8] drm/i915/selftests: Use drm_* prints in live selftests Krzysztof Karas
` (6 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Replace "i1915-selftest" with "i915-selftest".
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
index 462704e575f5..b8dc30f81bf0 100644
--- a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
@@ -528,7 +528,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;
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 3/8] drm/i915/selftests: Use drm_* prints in live selftests
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 2/8] drm/i915/selftest: Fix a typo in alloc_workqueue call Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 4/8] drm/i915/selftests: Use drm_* prints in selftest helpers Krzysztof Karas
` (5 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
.../gpu/drm/i915/selftests/i915_gem_evict.c | 58 ++---
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 197 ++++++++-------
drivers/gpu/drm/i915/selftests/i915_perf.c | 24 +-
drivers/gpu/drm/i915/selftests/i915_request.c | 234 +++++++++---------
drivers/gpu/drm/i915/selftests/i915_vma.c | 222 +++++++++--------
drivers/gpu/drm/i915/selftests/intel_uncore.c | 59 +++--
6 files changed, 418 insertions(+), 376 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
index 718cddde7e73..e6cdb02173a1 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
@@ -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"
@@ -71,11 +73,11 @@ 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(&ggtt->vm.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(&ggtt->vm.i915->drm, "No objects on the GGTT inactive list!\n");
return -EINVAL;
}
@@ -125,8 +127,8 @@ 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 +142,8 @@ 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 +179,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(>->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;
}
@@ -209,8 +213,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 != -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 +225,7 @@ 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;
}
@@ -273,7 +276,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 +293,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 +305,7 @@ 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 +318,7 @@ 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;
}
@@ -348,8 +351,7 @@ 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 +364,7 @@ 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 +444,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 +470,10 @@ 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 +494,16 @@ 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);
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index e6bd06774816..79c219d3a627 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -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"
@@ -34,6 +36,7 @@
#include "gt/intel_gpu_commands.h"
#include "gt/intel_gtt.h"
+#include "../i915_drv.h"
#include "i915_random.h"
#include "i915_selftest.h"
#include "i915_vma_resource.h"
@@ -268,8 +271,8 @@ static int lowlevel_hole(struct i915_address_space *vm,
hole_size = KMALLOC_MAX_SIZE / sizeof(u32);
count = hole_size >> 1;
if (!count) {
- pr_debug("%s: hole is too small [%llx - %llx] >> %d: %lld\n",
- __func__, hole_start, hole_end, size, hole_size);
+ drm_dbg(&vm->i915->drm, "%s: hole is too small [%llx - %llx] >> %d: %lld\n",
+ __func__, hole_start, hole_end, size, hole_size);
break;
}
@@ -472,16 +475,20 @@ static int fill_hole(struct i915_address_space *vm,
err = i915_vma_pin(vma, 0, 0, offset | flags);
if (err) {
- pr_err("%s(%s) pin (forward) failed with err=%d on size=%lu pages (prime=%lu), offset=%llx\n",
- __func__, p->name, err, npages, prime, offset);
+ drm_err(&vm->i915->drm,
+ "%s(%s) pin (forward) failed with err=%d on size=%lu pages (prime=%lu), offset=%llx\n",
+ __func__, p->name, err, npages, prime,
+ offset);
goto err;
}
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, offset | flags)) {
- pr_err("%s(%s) (forward) insert failed: vma.node=%llx + %llx [allocated? %d], expected offset %llx\n",
- __func__, p->name, vma->node.start, vma->node.size, drm_mm_node_allocated(&vma->node),
- offset);
+ drm_err(&vm->i915->drm,
+ "%s(%s) (forward) insert failed: vma.node=%llx + %llx [allocated? %d], expected offset %llx\n",
+ __func__, p->name, vma->node.start,
+ vma->node.size,
+ drm_mm_node_allocated(&vma->node), offset);
err = -EINVAL;
goto err;
}
@@ -512,18 +519,20 @@ static int fill_hole(struct i915_address_space *vm,
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, offset | flags)) {
- pr_err("%s(%s) (forward) moved vma.node=%llx + %llx, expected offset %llx\n",
- __func__, p->name, vma->node.start, vma->node.size,
- offset);
+ drm_err(&vm->i915->drm,
+ "%s(%s) (forward) moved vma.node=%llx + %llx, expected offset %llx\n",
+ __func__, p->name, vma->node.start,
+ vma->node.size, offset);
err = -EINVAL;
goto err;
}
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("%s(%s) (forward) unbind of vma.node=%llx + %llx failed with err=%d\n",
- __func__, p->name, vma->node.start, vma->node.size,
- err);
+ drm_err(&vm->i915->drm,
+ "%s(%s) (forward) unbind of vma.node=%llx + %llx failed with err=%d\n",
+ __func__, p->name, vma->node.start,
+ vma->node.size, err);
goto err;
}
@@ -551,16 +560,20 @@ static int fill_hole(struct i915_address_space *vm,
err = i915_vma_pin(vma, 0, 0, offset | flags);
if (err) {
- pr_err("%s(%s) pin (backward) failed with err=%d on size=%lu pages (prime=%lu), offset=%llx\n",
- __func__, p->name, err, npages, prime, offset);
+ drm_err(&vm->i915->drm,
+ "%s(%s) pin (backward) failed with err=%d on size=%lu pages (prime=%lu), offset=%llx\n",
+ __func__, p->name, err, npages, prime,
+ offset);
goto err;
}
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, offset | flags)) {
- pr_err("%s(%s) (backward) insert failed: vma.node=%llx + %llx [allocated? %d], expected offset %llx\n",
- __func__, p->name, vma->node.start, vma->node.size, drm_mm_node_allocated(&vma->node),
- offset);
+ drm_err(&vm->i915->drm,
+ "%s(%s) (backward) insert failed: vma.node=%llx + %llx [allocated? %d], expected offset %llx\n",
+ __func__, p->name, vma->node.start,
+ vma->node.size,
+ drm_mm_node_allocated(&vma->node), offset);
err = -EINVAL;
goto err;
}
@@ -591,18 +604,21 @@ static int fill_hole(struct i915_address_space *vm,
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, offset | flags)) {
- pr_err("%s(%s) (backward) moved vma.node=%llx + %llx [allocated? %d], expected offset %llx\n",
- __func__, p->name, vma->node.start, vma->node.size, drm_mm_node_allocated(&vma->node),
- offset);
+ drm_err(&vm->i915->drm,
+ "%s(%s) (backward) moved vma.node=%llx + %llx [allocated? %d], expected offset %llx\n",
+ __func__, p->name, vma->node.start,
+ vma->node.size,
+ drm_mm_node_allocated(&vma->node), offset);
err = -EINVAL;
goto err;
}
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("%s(%s) (backward) unbind of vma.node=%llx + %llx failed with err=%d\n",
- __func__, p->name, vma->node.start, vma->node.size,
- err);
+ drm_err(&vm->i915->drm,
+ "%s(%s) (backward) unbind of vma.node=%llx + %llx failed with err=%d\n",
+ __func__, p->name, vma->node.start,
+ vma->node.size, err);
goto err;
}
@@ -672,25 +688,26 @@ static int walk_hole(struct i915_address_space *vm,
addr += round_up(obj->base.size, min_alignment)) {
err = i915_vma_pin(vma, 0, 0, addr | flags);
if (err) {
- pr_err("%s bind failed at %llx + %llx [hole %llx- %llx] with err=%d\n",
- __func__, addr, vma->size,
- hole_start, hole_end, err);
+ drm_err(&vm->i915->drm,
+ "%s bind failed at %llx + %llx [hole %llx- %llx] with err=%d\n",
+ __func__, addr, vma->size, hole_start, hole_end, err);
goto err_put;
}
i915_vma_unpin(vma);
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, addr | flags)) {
- pr_err("%s incorrect at %llx + %llx\n",
- __func__, addr, vma->size);
+ drm_err(&vm->i915->drm, "%s incorrect at %llx + %llx\n",
+ __func__, addr, vma->size);
err = -EINVAL;
goto err_put;
}
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("%s unbind failed at %llx + %llx with err=%d\n",
- __func__, addr, vma->size, err);
+ drm_err(&vm->i915->drm,
+ "%s unbind failed at %llx + %llx with err=%d\n",
+ __func__, addr, vma->size, err);
goto err_put;
}
@@ -754,18 +771,16 @@ static int pot_hole(struct i915_address_space *vm,
addr += step) {
err = i915_vma_pin(vma, 0, 0, addr | flags);
if (err) {
- pr_err("%s failed to pin object at %llx in hole [%llx - %llx], with err=%d\n",
- __func__,
- addr,
- hole_start, hole_end,
- err);
+ drm_err(&vm->i915->drm,
+ "%s failed to pin object at %llx in hole [%llx - %llx], with err=%d\n",
+ __func__, addr, hole_start, hole_end, err);
goto err_obj;
}
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, addr | flags)) {
- pr_err("%s incorrect at %llx + %llx\n",
- __func__, addr, vma->size);
+ drm_err(&vm->i915->drm, "%s incorrect at %llx + %llx\n",
+ __func__, addr, vma->size);
i915_vma_unpin(vma);
err = i915_vma_unbind_unlocked(vma);
err = -EINVAL;
@@ -819,8 +834,8 @@ static int drunk_hole(struct i915_address_space *vm,
hole_size = KMALLOC_MAX_SIZE / sizeof(u32);
count = hole_size >> 1;
if (!count) {
- pr_debug("%s: hole is too small [%llx - %llx] >> %d: %lld\n",
- __func__, hole_start, hole_end, size, hole_size);
+ drm_dbg(&vm->i915->drm, "%s: hole is too small [%llx - %llx] >> %d: %lld\n",
+ __func__, hole_start, hole_end, size, hole_size);
break;
}
@@ -859,18 +874,16 @@ static int drunk_hole(struct i915_address_space *vm,
err = i915_vma_pin(vma, 0, 0, addr | flags);
if (err) {
- pr_err("%s failed to pin object at %llx + %llx in hole [%llx - %llx], with err=%d\n",
- __func__,
- addr, BIT_ULL(size),
- hole_start, hole_end,
- err);
+ drm_err(&vm->i915->drm,
+ "%s failed to pin object at %llx + %llx in hole [%llx - %llx], with err=%d\n",
+ __func__, addr, BIT_ULL(size), hole_start, hole_end, err);
goto err_obj;
}
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, addr | flags)) {
- pr_err("%s incorrect at %llx + %llx\n",
- __func__, addr, BIT_ULL(size));
+ drm_err(&vm->i915->drm, "%s incorrect at %llx + %llx\n",
+ __func__, addr, BIT_ULL(size));
i915_vma_unpin(vma);
err = i915_vma_unbind_unlocked(vma);
err = -EINVAL;
@@ -939,15 +952,16 @@ static int __shrink_hole(struct i915_address_space *vm,
err = i915_vma_pin(vma, 0, 0, addr | flags);
if (err) {
- pr_err("%s failed to pin object at %llx + %llx in hole [%llx - %llx], with err=%d\n",
- __func__, addr, size, hole_start, hole_end, err);
+ drm_err(&vm->i915->drm,
+ "%s failed to pin object at %llx + %llx in hole [%llx - %llx], with err=%d\n",
+ __func__, addr, size, hole_start, hole_end, err);
break;
}
if (!drm_mm_node_allocated(&vma->node) ||
i915_vma_misplaced(vma, 0, 0, addr | flags)) {
- pr_err("%s incorrect at %llx + %llx\n",
- __func__, addr, size);
+ drm_err(&vm->i915->drm, "%s incorrect at %llx + %llx\n",
+ __func__, addr, size);
i915_vma_unpin(vma);
err = i915_vma_unbind_unlocked(vma);
err = -EINVAL;
@@ -966,8 +980,7 @@ static int __shrink_hole(struct i915_address_space *vm,
if (err)
break;
- if (igt_timeout(end_time,
- "%s timed out at offset %llx [%llx - %llx]\n",
+ if (igt_timeout(end_time, "%s timed out at offset %llx [%llx - %llx]\n",
__func__, addr, hole_start, hole_end)) {
err = -EINTR;
break;
@@ -1419,8 +1432,7 @@ static int igt_ggtt_page(void *arg)
io_mapping_unmap_atomic(vaddr);
if (val != n) {
- pr_err("insert page failed: found %d, expected %d\n",
- val, n);
+ drm_err(&i915->drm, "insert page failed: found %d, expected %d\n", val, n);
err = -EINVAL;
break;
}
@@ -1578,18 +1590,19 @@ static int igt_gtt_reserve(void *arg)
err = reserve_gtt_with_resource(vma, total);
if (err) {
- pr_err("i915_gem_gtt_reserve (pass 1) failed at %llu/%llu with err=%d\n",
- total, ggtt->vm.total, err);
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_reserve (pass 1) failed at %llu/%llu with err=%d\n",
+ total, ggtt->vm.total, err);
goto out;
}
track_vma_bind(vma);
GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
if (vma->node.start != total ||
- vma->node.size != 2*I915_GTT_PAGE_SIZE) {
- pr_err("i915_gem_gtt_reserve (pass 1) placement failed, found (%llx + %llx), expected (%llx + %llx)\n",
- vma->node.start, vma->node.size,
- total, 2*I915_GTT_PAGE_SIZE);
+ vma->node.size != 2 * I915_GTT_PAGE_SIZE) {
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_reserve (pass 1) placement failed, found (%llx + %llx), expected (%llx + %llx)\n",
+ vma->node.start, vma->node.size, total, 2 * I915_GTT_PAGE_SIZE);
err = -EINVAL;
goto out;
}
@@ -1624,18 +1637,19 @@ static int igt_gtt_reserve(void *arg)
err = reserve_gtt_with_resource(vma, total);
if (err) {
- pr_err("i915_gem_gtt_reserve (pass 2) failed at %llu/%llu with err=%d\n",
- total, ggtt->vm.total, err);
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_reserve (pass 2) failed at %llu/%llu with err=%d\n",
+ total, ggtt->vm.total, err);
goto out;
}
track_vma_bind(vma);
GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
if (vma->node.start != total ||
- vma->node.size != 2*I915_GTT_PAGE_SIZE) {
- pr_err("i915_gem_gtt_reserve (pass 2) placement failed, found (%llx + %llx), expected (%llx + %llx)\n",
- vma->node.start, vma->node.size,
- total, 2*I915_GTT_PAGE_SIZE);
+ vma->node.size != 2 * I915_GTT_PAGE_SIZE) {
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_reserve (pass 2) placement failed, found (%llx + %llx), expected (%llx + %llx)\n",
+ vma->node.start, vma->node.size, total, 2 * I915_GTT_PAGE_SIZE);
err = -EINVAL;
goto out;
}
@@ -1654,7 +1668,7 @@ static int igt_gtt_reserve(void *arg)
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("i915_vma_unbind failed with err=%d!\n", err);
+ drm_err(&ggtt->vm.i915->drm, "i915_vma_unbind failed with err=%d!\n", err);
goto out;
}
@@ -1665,18 +1679,19 @@ static int igt_gtt_reserve(void *arg)
err = reserve_gtt_with_resource(vma, offset);
if (err) {
- pr_err("i915_gem_gtt_reserve (pass 3) failed at %llu/%llu with err=%d\n",
- total, ggtt->vm.total, err);
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_reserve (pass 3) failed at %llu/%llu with err=%d\n",
+ total, ggtt->vm.total, err);
goto out;
}
track_vma_bind(vma);
GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
if (vma->node.start != offset ||
- vma->node.size != 2*I915_GTT_PAGE_SIZE) {
- pr_err("i915_gem_gtt_reserve (pass 3) placement failed, found (%llx + %llx), expected (%llx + %llx)\n",
- vma->node.start, vma->node.size,
- offset, 2*I915_GTT_PAGE_SIZE);
+ vma->node.size != 2 * I915_GTT_PAGE_SIZE) {
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_reserve (pass 3) placement failed, found (%llx + %llx), expected (%llx + %llx)\n",
+ vma->node.start, vma->node.size, offset, 2 * I915_GTT_PAGE_SIZE);
err = -EINVAL;
goto out;
}
@@ -1730,7 +1745,7 @@ static int igt_gtt_insert(void *arg)
0, ggtt->vm.total,
},
{
- 2*I915_GTT_PAGE_SIZE, 0,
+ 2 * I915_GTT_PAGE_SIZE, 0,
0, I915_GTT_PAGE_SIZE,
},
{
@@ -1738,7 +1753,7 @@ static int igt_gtt_insert(void *arg)
0, 4*I915_GTT_PAGE_SIZE,
},
{
- -(u64)2*I915_GTT_PAGE_SIZE, 2*I915_GTT_PAGE_SIZE,
+ -(u64)2 * I915_GTT_PAGE_SIZE, 2 * I915_GTT_PAGE_SIZE,
0, 4*I915_GTT_PAGE_SIZE,
},
{
@@ -1766,9 +1781,9 @@ static int igt_gtt_insert(void *arg)
0);
mutex_unlock(&ggtt->vm.mutex);
if (err != -ENOSPC) {
- pr_err("Invalid i915_gem_gtt_insert(.size=%llx, .alignment=%llx, .start=%llx, .end=%llx) succeeded (err=%d)\n",
- ii->size, ii->alignment, ii->start, ii->end,
- err);
+ drm_err(&ggtt->vm.i915->drm,
+ "Invalid i915_gem_gtt_insert(.size=%llx, .alignment=%llx, .start=%llx, .end=%llx) succeeded (err=%d)\n",
+ ii->size, ii->alignment, ii->start, ii->end, err);
return -EINVAL;
}
}
@@ -1807,8 +1822,9 @@ static int igt_gtt_insert(void *arg)
break;
}
if (err) {
- pr_err("i915_gem_gtt_insert (pass 1) failed at %llu/%llu with err=%d\n",
- total, ggtt->vm.total, err);
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_insert (pass 1) failed at %llu/%llu with err=%d\n",
+ total, ggtt->vm.total, err);
goto out;
}
track_vma_bind(vma);
@@ -1827,7 +1843,7 @@ static int igt_gtt_insert(void *arg)
}
if (!drm_mm_node_allocated(&vma->node)) {
- pr_err("VMA was unexpectedly evicted!\n");
+ drm_err(&ggtt->vm.i915->drm, "VMA was unexpectedly evicted!\n");
err = -EINVAL;
goto out;
}
@@ -1851,22 +1867,24 @@ static int igt_gtt_insert(void *arg)
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("i915_vma_unbind failed with err=%d!\n", err);
+ drm_err(&ggtt->vm.i915->drm, "i915_vma_unbind failed with err=%d!\n", err);
goto out;
}
err = insert_gtt_with_resource(vma);
if (err) {
- pr_err("i915_gem_gtt_insert (pass 2) failed at %llu/%llu with err=%d\n",
- total, ggtt->vm.total, err);
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_insert (pass 2) failed at %llu/%llu with err=%d\n",
+ total, ggtt->vm.total, err);
goto out;
}
track_vma_bind(vma);
GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
if (vma->node.start != offset) {
- pr_err("i915_gem_gtt_insert did not return node to its previous location (the only hole), expected address %llx, found %llx\n",
- offset, vma->node.start);
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_insert did not return node to its previous location (the only hole), expected address %llx, found %llx\n",
+ offset, vma->node.start);
err = -EINVAL;
goto out;
}
@@ -1901,8 +1919,9 @@ static int igt_gtt_insert(void *arg)
err = insert_gtt_with_resource(vma);
if (err) {
- pr_err("i915_gem_gtt_insert (pass 3) failed at %llu/%llu with err=%d\n",
- total, ggtt->vm.total, err);
+ drm_err(&ggtt->vm.i915->drm,
+ "i915_gem_gtt_insert (pass 3) failed at %llu/%llu with err=%d\n",
+ total, ggtt->vm.total, err);
goto out;
}
track_vma_bind(vma);
diff --git a/drivers/gpu/drm/i915/selftests/i915_perf.c b/drivers/gpu/drm/i915/selftests/i915_perf.c
index e9469e27f42a..1d5ed73e60ab 100644
--- a/drivers/gpu/drm/i915/selftests/i915_perf.c
+++ b/drivers/gpu/drm/i915/selftests/i915_perf.c
@@ -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,18 @@ 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(&stream->engine->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(&stream->engine->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(&stream->engine->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 +385,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(&stream->engine->i915->drm, "noa_wait timed out\n");
intel_gt_set_wedged(stream->engine->gt);
err = -EIO;
goto out_rq;
@@ -396,14 +396,14 @@ 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(&stream->engine->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(&stream->engine->i915->drm, "Scratch page overwritten!\n");
igt_hexdump(scratch, 4096);
err = -EINVAL;
}
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index e1a7c454a0a9..e562c0dee03f 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -98,49 +98,51 @@ static int igt_wait_request(void *arg)
i915_request_get(request);
if (i915_request_wait(request, 0, 0) != -ETIME) {
- pr_err("request wait (busy query) succeeded (expected timeout before submit!)\n");
+ drm_err(&i915->drm,
+ "request wait (busy query) succeeded (expected timeout before submit!)\n");
goto out_request;
}
if (i915_request_wait(request, 0, T) != -ETIME) {
- pr_err("request wait succeeded (expected timeout before submit!)\n");
+ drm_err(&i915->drm, "request wait succeeded (expected timeout before submit!)\n");
goto out_request;
}
if (i915_request_completed(request)) {
- pr_err("request completed before submit!!\n");
+ drm_err(&i915->drm, "request completed before submit!!\n");
goto out_request;
}
i915_request_add(request);
if (i915_request_wait(request, 0, 0) != -ETIME) {
- pr_err("request wait (busy query) succeeded (expected timeout after submit!)\n");
+ drm_err(&i915->drm,
+ "request wait (busy query) succeeded (expected timeout after submit!)\n");
goto out_request;
}
if (i915_request_completed(request)) {
- pr_err("request completed immediately!\n");
+ drm_err(&i915->drm, "request completed immediately!\n");
goto out_request;
}
if (i915_request_wait(request, 0, T / 2) != -ETIME) {
- pr_err("request wait succeeded (expected timeout!)\n");
+ drm_err(&i915->drm, "request wait succeeded (expected timeout!)\n");
goto out_request;
}
if (i915_request_wait(request, 0, T) == -ETIME) {
- pr_err("request wait timed out!\n");
+ drm_err(&i915->drm, "request wait timed out!\n");
goto out_request;
}
if (!i915_request_completed(request)) {
- pr_err("request not complete after waiting!\n");
+ drm_err(&i915->drm, "request not complete after waiting!\n");
goto out_request;
}
if (i915_request_wait(request, 0, T) == -ETIME) {
- pr_err("request wait timed out when already complete!\n");
+ drm_err(&i915->drm, "request wait timed out when already complete!\n");
goto out_request;
}
@@ -165,34 +167,34 @@ static int igt_fence_wait(void *arg)
return PTR_ERR(request);
if (dma_fence_wait_timeout(&request->fence, false, T) != -ETIME) {
- pr_err("fence wait success before submit (expected timeout)!\n");
+ drm_err(&i915->drm, "fence wait success before submit (expected timeout)!\n");
goto out;
}
i915_request_add(request);
if (dma_fence_is_signaled(&request->fence)) {
- pr_err("fence signaled immediately!\n");
+ drm_err(&i915->drm, "fence signaled immediately!\n");
goto out;
}
if (dma_fence_wait_timeout(&request->fence, false, T / 2) != -ETIME) {
- pr_err("fence wait success after submit (expected timeout)!\n");
+ drm_err(&i915->drm, "fence wait success after submit (expected timeout)!\n");
goto out;
}
if (dma_fence_wait_timeout(&request->fence, false, T) <= 0) {
- pr_err("fence wait timed out (expected success)!\n");
+ drm_err(&i915->drm, "fence wait timed out (expected success)!\n");
goto out;
}
if (!dma_fence_is_signaled(&request->fence)) {
- pr_err("fence unsignaled after waiting!\n");
+ drm_err(&i915->drm, "fence unsignaled after waiting!\n");
goto out;
}
if (dma_fence_wait_timeout(&request->fence, false, T) <= 0) {
- pr_err("fence wait timed out when complete (expected success)!\n");
+ drm_err(&i915->drm, "fence wait timed out when complete (expected success)!\n");
goto out;
}
@@ -245,7 +247,7 @@ static int igt_request_rewind(void *arg)
/* Simulate preemption by manual reordering */
if (!mock_cancel_request(request)) {
- pr_err("failed to cancel request (already executed)!\n");
+ drm_err(&i915->drm, "failed to cancel request (already executed)!\n");
i915_request_add(vip);
goto err_context_1;
}
@@ -257,12 +259,12 @@ static int igt_request_rewind(void *arg)
if (i915_request_wait(vip, 0, HZ) == -ETIME) {
- pr_err("timed out waiting for high priority request\n");
+ drm_err(&i915->drm, "timed out waiting for high priority request\n");
goto err;
}
if (i915_request_completed(request)) {
- pr_err("low priority request already completed\n");
+ drm_err(&i915->drm, "low priority request already completed\n");
goto err;
}
@@ -406,10 +408,10 @@ static void __igt_breadcrumbs_smoketest(struct kthread_work *work)
5 * HZ)) {
struct i915_request *rq = requests[count - 1];
- pr_err("waiting for %d/%d fences (last %llx:%lld) on %s timed out!\n",
- atomic_read(&wait->pending), count,
- rq->fence.context, rq->fence.seqno,
- t->engine->name);
+ drm_err(&t->engine->i915->drm,
+ "waiting for %d/%d fences (last %llx:%lld) on %s timed out!\n",
+ atomic_read(&wait->pending), count, rq->fence.context,
+ rq->fence.seqno, t->engine->name);
GEM_TRACE_DUMP();
intel_gt_set_wedged(t->engine->gt);
@@ -423,8 +425,8 @@ static void __igt_breadcrumbs_smoketest(struct kthread_work *work)
if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
&rq->fence.flags)) {
- pr_err("%llu:%llu was not signaled!\n",
- rq->fence.context, rq->fence.seqno);
+ drm_err(&t->engine->i915->drm, "%llu:%llu was not signaled!\n",
+ rq->fence.context, rq->fence.seqno);
err = -EINVAL;
}
@@ -523,10 +525,10 @@ static int mock_breadcrumbs_smoketest(void *arg)
kthread_destroy_worker(threads[n].worker);
}
- pr_info("Completed %lu waits for %lu fence across %d cpus\n",
- atomic_long_read(&t.num_waits),
- atomic_long_read(&t.num_fences),
- ncpus);
+ drm_info(&i915->drm, "Completed %lu waits for %lu fence across %d cpus\n",
+ atomic_long_read(&t.num_waits),
+ atomic_long_read(&t.num_fences),
+ ncpus);
out_contexts:
for (n = 0; n < t.ncontexts; n++) {
@@ -632,10 +634,9 @@ static int live_nop_request(void *arg)
if (err)
return err;
- pr_info("Request latencies on %s: 1 = %lluns, %lu = %lluns\n",
- engine->name,
- ktime_to_ns(times[0]),
- prime, div64_u64(ktime_to_ns(times[1]), prime));
+ drm_info(&i915->drm, "Request latencies on %s: 1 = %lluns, %lu = %lluns\n",
+ engine->name, ktime_to_ns(times[0]), prime,
+ div64_u64(ktime_to_ns(times[1]), prime));
}
return err;
@@ -663,7 +664,7 @@ static int __cancel_inactive(struct intel_engine_cs *engine)
goto out_ce;
}
- pr_debug("%s: Cancelling inactive request\n", engine->name);
+ drm_dbg(&engine->i915->drm, "%s: Cancelling inactive request\n", engine->name);
i915_request_cancel(rq, -EINTR);
i915_request_get(rq);
i915_request_add(rq);
@@ -671,15 +672,16 @@ static int __cancel_inactive(struct intel_engine_cs *engine)
if (i915_request_wait(rq, 0, HZ / 5) < 0) {
struct drm_printer p = drm_info_printer(engine->i915->drm.dev);
- pr_err("%s: Failed to cancel inactive request\n", engine->name);
+ drm_err(&engine->i915->drm, "%s: Failed to cancel inactive request\n",
+ engine->name);
intel_engine_dump(engine, &p, "%s\n", engine->name);
err = -ETIME;
goto out_rq;
}
if (rq->fence.error != -EINTR) {
- pr_err("%s: fence not cancelled (%u)\n",
- engine->name, rq->fence.error);
+ drm_err(&engine->i915->drm, "%s: fence not cancelled (%u)\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
}
@@ -690,7 +692,7 @@ static int __cancel_inactive(struct intel_engine_cs *engine)
out_spin:
igt_spinner_fini(&spin);
if (err)
- pr_err("%s: %s error %d\n", __func__, engine->name, err);
+ drm_err(&engine->i915->drm, "%s: %s error %d\n", __func__, engine->name, err);
return err;
}
@@ -716,13 +718,13 @@ static int __cancel_active(struct intel_engine_cs *engine)
goto out_ce;
}
- pr_debug("%s: Cancelling active request\n", engine->name);
+ drm_dbg(&engine->i915->drm, "%s: Cancelling active request\n", engine->name);
i915_request_get(rq);
i915_request_add(rq);
if (!igt_wait_for_spinner(&spin, rq)) {
struct drm_printer p = drm_info_printer(engine->i915->drm.dev);
- pr_err("Failed to start spinner on %s\n", engine->name);
+ drm_err(&engine->i915->drm, "Failed to start spinner on %s\n", engine->name);
intel_engine_dump(engine, &p, "%s\n", engine->name);
err = -ETIME;
goto out_rq;
@@ -732,15 +734,15 @@ static int __cancel_active(struct intel_engine_cs *engine)
if (i915_request_wait(rq, 0, HZ / 5) < 0) {
struct drm_printer p = drm_info_printer(engine->i915->drm.dev);
- pr_err("%s: Failed to cancel active request\n", engine->name);
+ drm_err(&engine->i915->drm, "%s: Failed to cancel active request\n", engine->name);
intel_engine_dump(engine, &p, "%s\n", engine->name);
err = -ETIME;
goto out_rq;
}
if (rq->fence.error != -EINTR) {
- pr_err("%s: fence not cancelled (%u)\n",
- engine->name, rq->fence.error);
+ drm_err(&engine->i915->drm, "%s: fence not cancelled (%u)\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
}
@@ -751,7 +753,7 @@ static int __cancel_active(struct intel_engine_cs *engine)
out_spin:
igt_spinner_fini(&spin);
if (err)
- pr_err("%s: %s error %d\n", __func__, engine->name, err);
+ drm_err(&engine->i915->drm, "%s: %s error %d\n", __func__, engine->name, err);
return err;
}
@@ -785,11 +787,11 @@ static int __cancel_completed(struct intel_engine_cs *engine)
goto out_rq;
}
- pr_debug("%s: Cancelling completed request\n", engine->name);
+ drm_dbg(&engine->i915->drm, "%s: Cancelling completed request\n", engine->name);
i915_request_cancel(rq, -EINTR);
if (rq->fence.error) {
- pr_err("%s: fence not cancelled (%u)\n",
- engine->name, rq->fence.error);
+ drm_err(&engine->i915->drm, "%s: fence not cancelled (%u)\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
}
@@ -800,7 +802,7 @@ static int __cancel_completed(struct intel_engine_cs *engine)
out_spin:
igt_spinner_fini(&spin);
if (err)
- pr_err("%s: %s error %d\n", __func__, engine->name, err);
+ drm_err(&engine->i915->drm, "%s: %s error %d\n", __func__, engine->name, err);
return err;
}
@@ -846,14 +848,14 @@ static int __cancel_reset(struct drm_i915_private *i915,
goto out_ce;
}
- pr_debug("%s: Cancelling active non-preemptable request\n",
+ drm_dbg(&engine->i915->drm, "%s: Cancelling active non-preemptable request\n",
engine->name);
i915_request_get(rq);
i915_request_add(rq);
if (!igt_wait_for_spinner(&spin, rq)) {
struct drm_printer p = drm_info_printer(engine->i915->drm.dev);
- pr_err("Failed to start spinner on %s\n", engine->name);
+ drm_err(&engine->i915->drm, "Failed to start spinner on %s\n", engine->name);
intel_engine_dump(engine, &p, "%s\n", engine->name);
err = -ETIME;
goto out_rq;
@@ -870,15 +872,15 @@ static int __cancel_reset(struct drm_i915_private *i915,
if (i915_request_wait(rq, 0, HZ) < 0) {
struct drm_printer p = drm_info_printer(engine->i915->drm.dev);
- pr_err("%s: Failed to cancel hung request\n", engine->name);
+ drm_err(&engine->i915->drm, "%s: Failed to cancel hung request\n", engine->name);
intel_engine_dump(engine, &p, "%s\n", engine->name);
err = -ETIME;
goto out_nop;
}
if (rq->fence.error != -EINTR) {
- pr_err("%s: fence not cancelled (%u)\n",
- engine->name, rq->fence.error);
+ drm_err(&engine->i915->drm, "%s: fence not cancelled (%u)\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
goto out_nop;
}
@@ -886,15 +888,15 @@ static int __cancel_reset(struct drm_i915_private *i915,
if (i915_request_wait(nop, 0, HZ) < 0) {
struct drm_printer p = drm_info_printer(engine->i915->drm.dev);
- pr_err("%s: Failed to complete nop request\n", engine->name);
+ drm_err(&engine->i915->drm, "%s: Failed to complete nop request\n", engine->name);
intel_engine_dump(engine, &p, "%s\n", engine->name);
err = -ETIME;
goto out_nop;
}
if (nop->fence.error != 0) {
- pr_err("%s: Nop request errored (%u)\n",
- engine->name, nop->fence.error);
+ drm_err(&engine->i915->drm, "%s: Nop request errored (%u)\n",
+ engine->name, nop->fence.error);
err = -EINVAL;
}
@@ -909,7 +911,7 @@ static int __cancel_reset(struct drm_i915_private *i915,
out_restore:
engine->props.preempt_timeout_ms = preempt_timeout_ms;
if (err)
- pr_err("%s: %s error %d\n", __func__, engine->name, err);
+ drm_err(&engine->i915->drm, "%s: %s error %d\n", __func__, engine->name, err);
return err;
}
@@ -1102,10 +1104,9 @@ static int live_empty_request(void *arg)
if (err)
goto out_batch;
- pr_info("Batch latencies on %s: 1 = %lluns, %lu = %lluns\n",
- engine->name,
- ktime_to_ns(times[0]),
- prime, div64_u64(ktime_to_ns(times[1]), prime));
+ drm_info(&i915->drm, "Batch latencies on %s: 1 = %lluns, %lu = %lluns\n",
+ engine->name, ktime_to_ns(times[0]), prime,
+ div64_u64(ktime_to_ns(times[1]), prime));
out_batch:
i915_vma_unpin(batch);
i915_vma_put(batch);
@@ -1218,8 +1219,7 @@ static int live_all_engines(void *arg)
batch = recursive_batch(engine->gt);
if (IS_ERR(batch)) {
err = PTR_ERR(batch);
- pr_err("%s: Unable to create batch, err=%d\n",
- __func__, err);
+ drm_err(&i915->drm, "%s: Unable to create batch, err=%d\n", __func__, err);
goto out_free;
}
@@ -1227,8 +1227,8 @@ static int live_all_engines(void *arg)
request[idx] = intel_engine_create_kernel_request(engine);
if (IS_ERR(request[idx])) {
err = PTR_ERR(request[idx]);
- pr_err("%s: Request allocation failed with err=%d\n",
- __func__, err);
+ drm_err(&i915->drm, "%s: Request allocation failed with err=%d\n",
+ __func__, err);
goto out_unlock;
}
GEM_BUG_ON(request[idx]->context->vm != batch->vm);
@@ -1252,7 +1252,7 @@ static int live_all_engines(void *arg)
idx = 0;
for_each_uabi_engine(engine, i915) {
if (i915_request_completed(request[idx])) {
- pr_err("%s(%s): request completed too early!\n",
+ drm_err(&i915->drm, "%s(%s): request completed too early!\n",
__func__, engine->name);
err = -EINVAL;
goto out_request;
@@ -1264,8 +1264,8 @@ static int live_all_engines(void *arg)
for_each_uabi_engine(engine, i915) {
err = recursive_batch_resolve(request[idx]->batch);
if (err) {
- pr_err("%s: failed to resolve batch, err=%d\n",
- __func__, err);
+ drm_err(&i915->drm, "%s: failed to resolve batch, err=%d\n",
+ __func__, err);
goto out_request;
}
idx++;
@@ -1280,8 +1280,8 @@ static int live_all_engines(void *arg)
MAX_SCHEDULE_TIMEOUT);
if (timeout < 0) {
err = timeout;
- pr_err("%s: error waiting for request on %s, err=%d\n",
- __func__, engine->name, err);
+ drm_err(&i915->drm, "%s: error waiting for request on %s, err=%d\n",
+ __func__, engine->name, err);
goto out_request;
}
@@ -1348,8 +1348,8 @@ static int live_sequential_engines(void *arg)
batch = recursive_batch(engine->gt);
if (IS_ERR(batch)) {
err = PTR_ERR(batch);
- pr_err("%s: Unable to create batch for %s, err=%d\n",
- __func__, engine->name, err);
+ drm_err(&i915->drm, "%s: Unable to create batch for %s, err=%d\n",
+ __func__, engine->name, err);
goto out_free;
}
@@ -1357,8 +1357,8 @@ static int live_sequential_engines(void *arg)
request[idx] = intel_engine_create_kernel_request(engine);
if (IS_ERR(request[idx])) {
err = PTR_ERR(request[idx]);
- pr_err("%s: Request allocation failed for %s with err=%d\n",
- __func__, engine->name, err);
+ drm_err(&i915->drm, "%s: Request allocation failed for %s with err=%d\n",
+ __func__, engine->name, err);
goto out_unlock;
}
GEM_BUG_ON(request[idx]->context->vm != batch->vm);
@@ -1368,8 +1368,8 @@ static int live_sequential_engines(void *arg)
&prev->fence);
if (err) {
i915_request_add(request[idx]);
- pr_err("%s: Request await failed for %s with err=%d\n",
- __func__, engine->name, err);
+ drm_err(&i915->drm, "%s: Request await failed for %s with err=%d\n",
+ __func__, engine->name, err);
goto out_unlock;
}
}
@@ -1398,16 +1398,16 @@ static int live_sequential_engines(void *arg)
long timeout;
if (i915_request_completed(request[idx])) {
- pr_err("%s(%s): request completed too early!\n",
- __func__, engine->name);
+ drm_err(&i915->drm, "%s(%s): request completed too early!\n",
+ __func__, engine->name);
err = -EINVAL;
goto out_request;
}
err = recursive_batch_resolve(request[idx]->batch);
if (err) {
- pr_err("%s: failed to resolve batch, err=%d\n",
- __func__, err);
+ drm_err(&i915->drm, "%s: failed to resolve batch, err=%d\n",
+ __func__, err);
goto out_request;
}
@@ -1415,8 +1415,8 @@ static int live_sequential_engines(void *arg)
MAX_SCHEDULE_TIMEOUT);
if (timeout < 0) {
err = timeout;
- pr_err("%s: error waiting for request on %s, err=%d\n",
- __func__, engine->name, err);
+ drm_err(&i915->drm, "%s: error waiting for request on %s, err=%d\n",
+ __func__, engine->name, err);
goto out_request;
}
@@ -1496,7 +1496,7 @@ static void __live_parallel_engine1(struct kthread_work *work)
} while (!__igt_timeout(end_time, NULL));
intel_engine_pm_put(engine);
- pr_info("%s: %lu request + sync\n", engine->name, count);
+ drm_info(&engine->i915->drm, "%s: %lu request + sync\n", engine->name, count);
thread->result = err;
}
@@ -1525,7 +1525,7 @@ static void __live_parallel_engineN(struct kthread_work *work)
} while (!__igt_timeout(end_time, NULL));
intel_engine_pm_put(engine);
- pr_info("%s: %lu requests\n", engine->name, count);
+ drm_info(&engine->i915->drm, "%s: %lu requests\n", engine->name, count);
thread->result = err;
}
@@ -1592,7 +1592,7 @@ static void __live_parallel_spin(struct kthread_work *work)
/* Occupy this engine for the whole test */
err = wait_for_all(engine->i915);
} else {
- pr_err("Failed to start spinner on %s\n", engine->name);
+ drm_err(&engine->i915->drm, "Failed to start spinner on %s\n", engine->name);
err = -EINVAL;
}
igt_spinner_end(&spin);
@@ -1798,8 +1798,8 @@ static int live_breadcrumbs_smoketest(void *arg)
}
/* One ring interleaved between requests from all cpus */
smoke[idx].max_batch /= ncpus + 1;
- pr_debug("Limiting batches to %d requests on %s\n",
- smoke[idx].max_batch, engine->name);
+ drm_dbg(&i915->drm, "Limiting batches to %d requests on %s\n",
+ smoke[idx].max_batch, engine->name);
for (n = 0; n < ncpus; n++) {
unsigned int i = idx * ncpus + n;
@@ -1849,8 +1849,8 @@ static int live_breadcrumbs_smoketest(void *arg)
num_fences += atomic_long_read(&smoke[idx].num_fences);
idx++;
}
- pr_info("Completed %lu waits for %lu fences across %d engines and %d cpus\n",
- num_waits, num_fences, idx, ncpus);
+ drm_info(&i915->drm, "Completed %lu waits for %lu fences across %d engines and %d cpus\n",
+ num_waits, num_fences, idx, ncpus);
ret = igt_live_test_end(&live) ?: ret;
out_contexts:
@@ -2075,9 +2075,8 @@ static int measure_semaphore_response(struct intel_context *ce)
}
cycles = trifilter(elapsed);
- pr_info("%s: semaphore response %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: semaphore response %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
return intel_gt_wait_for_idle(ce->engine->gt, HZ);
@@ -2146,9 +2145,8 @@ static int measure_idle_dispatch(struct intel_context *ce)
elapsed[i] = sema[i] - elapsed[i];
cycles = trifilter(elapsed);
- pr_info("%s: idle dispatch latency %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: idle dispatch latency %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
return intel_gt_wait_for_idle(ce->engine->gt, HZ);
@@ -2223,9 +2221,8 @@ static int measure_busy_dispatch(struct intel_context *ce)
}
cycles = trifilter(elapsed);
- pr_info("%s: busy dispatch latency %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: busy dispatch latency %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
return intel_gt_wait_for_idle(ce->engine->gt, HZ);
@@ -2336,9 +2333,8 @@ static int measure_inter_request(struct intel_context *ce)
elapsed[i - 1] = sema[i + 1] - sema[i];
cycles = trifilter(elapsed);
- pr_info("%s: inter-request latency %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: inter-request latency %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
return intel_gt_wait_for_idle(ce->engine->gt, HZ);
@@ -2431,9 +2427,8 @@ static int measure_context_switch(struct intel_context *ce)
elapsed[i - 1] = sema[2 * i + 2] - sema[2 * i + 1];
cycles = trifilter(elapsed);
- pr_info("%s: context switch latency %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: context switch latency %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
return intel_gt_wait_for_idle(ce->engine->gt, HZ);
@@ -2534,17 +2529,15 @@ static int measure_preemption(struct intel_context *ce)
elapsed[i - 1] = sema[2 * i + 0] - elapsed[i - 1];
cycles = trifilter(elapsed);
- pr_info("%s: preemption dispatch latency %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: preemption dispatch latency %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
for (i = 1; i <= TF_COUNT; i++)
elapsed[i - 1] = sema[2 * i + 1] - sema[2 * i + 0];
cycles = trifilter(elapsed);
- pr_info("%s: preemption switch latency %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: preemption switch latency %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
return intel_gt_wait_for_idle(ce->engine->gt, HZ);
@@ -2636,9 +2629,8 @@ static int measure_completion(struct intel_context *ce)
}
cycles = trifilter(elapsed);
- pr_info("%s: completion latency %d cycles, %lluns\n",
- ce->engine->name, cycles >> TF_BIAS,
- cycles_to_ns(ce->engine, cycles));
+ drm_info(&ce->engine->i915->drm, "%s: completion latency %d cycles, %lluns\n",
+ ce->engine->name, cycles >> TF_BIAS, cycles_to_ns(ce->engine, cycles));
return intel_gt_wait_for_idle(ce->engine->gt, HZ);
@@ -2929,11 +2921,11 @@ static int perf_series_engines(void *arg)
decimal = 0;
}
- pr_info("%s %5s: { seqno:%d, busy:%d.%02d%%, runtime:%lldms, walltime:%lldms }\n",
- name, p->engine->name, ce->timeline->seqno,
- integer, decimal,
- div_u64(p->runtime, 1000 * 1000),
- div_u64(ktime_to_ns(p->time), 1000 * 1000));
+ drm_info(&i915->drm,
+ "%s %5s: { seqno:%d, busy:%d.%02d%%, runtime:%lldms, walltime:%lldms }\n",
+ name, p->engine->name, ce->timeline->seqno, integer, decimal,
+ div_u64(p->runtime, 1000 * 1000), div_u64(ktime_to_ns(p->time),
+ 1000 * 1000));
}
}
@@ -3275,10 +3267,10 @@ static int perf_parallel_engines(void *arg)
}
GEM_BUG_ON(engine != p->engine);
- pr_info("%s %5s: { count:%lu, busy:%d.%02d%%, runtime:%lldms, walltime:%lldms }\n",
- name, engine->name, p->count, integer, decimal,
- div_u64(p->runtime, 1000 * 1000),
- div_u64(ktime_to_ns(p->time), 1000 * 1000));
+ drm_info(&i915->drm, "%s %5s: { count:%lu, busy:%d.%02d%%, runtime:%lldms, walltime:%lldms }\n",
+ name, engine->name, p->count, integer, decimal,
+ div_u64(p->runtime, 1000 * 1000),
+ div_u64(ktime_to_ns(p->time), 1000 * 1000));
idx++;
}
}
diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
index 7c4111e60f2e..3750b9841818 100644
--- a/drivers/gpu/drm/i915/selftests/i915_vma.c
+++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
@@ -24,6 +24,8 @@
#include <linux/prime_numbers.h>
+#include <drm/drm_print.h>
+
#include "gem/i915_gem_context.h"
#include "gem/i915_gem_internal.h"
#include "gem/selftests/mock_context.h"
@@ -41,19 +43,18 @@ static bool assert_vma(struct i915_vma *vma,
bool ok = true;
if (vma->vm != ctx->vm) {
- pr_err("VMA created with wrong VM\n");
+ drm_err(obj->base.dev, "VMA created with wrong VM\n");
ok = false;
}
if (vma->size != obj->base.size) {
- pr_err("VMA created with wrong size, found %llu, expected %zu\n",
+ drm_err(obj->base.dev, "VMA created with wrong size, found %llu, expected %zu\n",
vma->size, obj->base.size);
ok = false;
}
if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
- pr_err("VMA created with wrong type [%d]\n",
- vma->gtt_view.type);
+ drm_err(obj->base.dev, "VMA created with wrong type [%d]\n", vma->gtt_view.type);
ok = false;
}
@@ -74,30 +75,29 @@ checked_vma_instance(struct drm_i915_gem_object *obj,
/* Manual checks, will be reinforced by i915_vma_compare! */
if (vma->vm != vm) {
- pr_err("VMA's vm [%p] does not match request [%p]\n",
- vma->vm, vm);
+ drm_err(obj->base.dev, "VMA's vm [%p] does not match request [%p]\n", vma->vm, vm);
ok = false;
}
if (i915_is_ggtt(vm) != i915_vma_is_ggtt(vma)) {
- pr_err("VMA ggtt status [%d] does not match parent [%d]\n",
- i915_vma_is_ggtt(vma), i915_is_ggtt(vm));
+ drm_err(obj->base.dev, "VMA ggtt status [%d] does not match parent [%d]\n",
+ i915_vma_is_ggtt(vma), i915_is_ggtt(vm));
ok = false;
}
if (i915_vma_compare(vma, vm, view)) {
- pr_err("i915_vma_compare failed with create parameters!\n");
+ drm_err(obj->base.dev, "i915_vma_compare failed with create parameters!\n");
return ERR_PTR(-EINVAL);
}
if (i915_vma_compare(vma, vma->vm,
i915_vma_is_ggtt(vma) ? &vma->gtt_view : NULL)) {
- pr_err("i915_vma_compare failed with itself\n");
+ drm_err(obj->base.dev, "i915_vma_compare failed with itself\n");
return ERR_PTR(-EINVAL);
}
if (!ok) {
- pr_err("i915_vma_compare failed to detect the difference!\n");
+ drm_err(obj->base.dev, "i915_vma_compare failed to detect the difference!\n");
return ERR_PTR(-EINVAL);
}
@@ -126,14 +126,14 @@ static int create_vmas(struct drm_i915_private *i915,
return PTR_ERR(vma);
if (!assert_vma(vma, obj, ctx)) {
- pr_err("VMA lookup/create failed\n");
+ drm_err(obj->base.dev, "VMA lookup/create failed\n");
return -EINVAL;
}
if (!pinned) {
err = i915_vma_pin(vma, 0, 0, PIN_USER);
if (err) {
- pr_err("Failed to pin VMA\n");
+ drm_err(obj->base.dev, "Failed to pin VMA\n");
return err;
}
} else {
@@ -332,10 +332,10 @@ static int igt_vma_pin1(void *arg)
for (m = modes; m->assert; m++) {
err = i915_vma_pin(vma, m->size, 0, m->flags);
if (!m->assert(vma, m, err)) {
- pr_err("%s to pin single page into GGTT with mode[%d:%s]: size=%llx flags=%llx, err=%d\n",
- m->assert == assert_pin_valid ? "Failed" : "Unexpectedly succeeded",
- (int)(m - modes), m->string, m->size, m->flags,
- err);
+ drm_err(obj->base.dev,
+ "%s to pin single page into GGTT with mode[%d:%s]: size=%llx flags=%llx, err=%d\n",
+ m->assert == assert_pin_valid ? "Failed" : "Unexpectedly succeeded",
+ (int)(m - modes), m->string, m->size, m->flags, err);
if (!err)
i915_vma_unpin(vma);
err = -EINVAL;
@@ -346,7 +346,8 @@ static int igt_vma_pin1(void *arg)
i915_vma_unpin(vma);
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("Failed to unbind single page from GGTT, err=%d\n", err);
+ drm_err(obj->base.dev,
+ "Failed to unbind single page from GGTT, err=%d\n", err);
goto out;
}
}
@@ -384,8 +385,9 @@ assert_rotated(struct drm_i915_gem_object *obj,
dma_addr_t src;
if (!sg) {
- pr_err("Invalid sg table: too short at plane %d, (%d, %d)!\n",
- n, x, y);
+ drm_err(obj->base.dev,
+ "Invalid sg table: too short at plane %d, (%d, %d)!\n",
+ n, x, y);
return ERR_PTR(-EINVAL);
}
@@ -393,15 +395,16 @@ assert_rotated(struct drm_i915_gem_object *obj,
src = i915_gem_object_get_dma_address(obj, src_idx);
if (sg_dma_len(sg) != PAGE_SIZE) {
- pr_err("Invalid sg.length, found %d, expected %lu for rotated page (%d, %d) [src index %lu]\n",
- sg_dma_len(sg), PAGE_SIZE,
- x, y, src_idx);
+ drm_err(obj->base.dev,
+ "Invalid sg.length, found %d, expected %lu for rotated page (%d, %d) [src index %lu]\n",
+ sg_dma_len(sg), PAGE_SIZE, x, y, src_idx);
return ERR_PTR(-EINVAL);
}
if (sg_dma_address(sg) != src) {
- pr_err("Invalid address for rotated page (%d, %d) [src index %lu]\n",
- x, y, src_idx);
+ drm_err(obj->base.dev,
+ "Invalid address for rotated page (%d, %d) [src index %lu]\n",
+ x, y, src_idx);
return ERR_PTR(-EINVAL);
}
@@ -414,20 +417,22 @@ assert_rotated(struct drm_i915_gem_object *obj,
continue;
if (!sg) {
- pr_err("Invalid sg table: too short at plane %d, (%d, %d)!\n",
- n, x, y);
+ drm_err(obj->base.dev,
+ "Invalid sg table: too short at plane %d, (%d, %d)!\n", n, x, y);
return ERR_PTR(-EINVAL);
}
if (sg_dma_len(sg) != left) {
- pr_err("Invalid sg.length, found %d, expected %u for rotated page (%d, %d)\n",
- sg_dma_len(sg), left, x, y);
+ drm_err(obj->base.dev,
+ "Invalid sg.length, found %d, expected %u for rotated page (%d, %d)\n",
+ sg_dma_len(sg), left, x, y);
return ERR_PTR(-EINVAL);
}
if (sg_dma_address(sg) != 0) {
- pr_err("Invalid address, found %pad, expected 0 for remapped page (%d, %d)\n",
- &sg_dma_address(sg), x, y);
+ drm_err(obj->base.dev,
+ "Invalid address, found %pad, expected 0 for remapped page (%d, %d)\n",
+ &sg_dma_address(sg), x, y);
return ERR_PTR(-EINVAL);
}
@@ -461,8 +466,9 @@ assert_remapped(struct drm_i915_gem_object *obj,
dma_addr_t src;
if (!sg) {
- pr_err("Invalid sg table: too short at plane %d, (%d, %d)!\n",
- n, x, y);
+ drm_err(obj->base.dev,
+ "Invalid sg table: too short at plane %d, (%d, %d)!\n",
+ n, x, y);
return ERR_PTR(-EINVAL);
}
if (!left) {
@@ -474,15 +480,16 @@ assert_remapped(struct drm_i915_gem_object *obj,
src = i915_gem_object_get_dma_address(obj, src_idx);
if (left < PAGE_SIZE || left & (PAGE_SIZE-1)) {
- pr_err("Invalid sg.length, found %d, expected %lu for remapped page (%d, %d) [src index %lu]\n",
- sg_dma_len(sg), PAGE_SIZE,
- x, y, src_idx);
+ drm_err(obj->base.dev,
+ "Invalid sg.length, found %d, expected %lu for remapped page (%d, %d) [src index %lu]\n",
+ sg_dma_len(sg), PAGE_SIZE, x, y, src_idx);
return ERR_PTR(-EINVAL);
}
if (sg_dma_address(sg) + offset != src) {
- pr_err("Invalid address for remapped page (%d, %d) [src index %lu]\n",
- x, y, src_idx);
+ drm_err(obj->base.dev,
+ "Invalid address for remapped page (%d, %d) [src index %lu]\n",
+ x, y, src_idx);
return ERR_PTR(-EINVAL);
}
@@ -495,9 +502,9 @@ assert_remapped(struct drm_i915_gem_object *obj,
}
if (left) {
- pr_err("Unexpected sg tail with %d size for remapped page (%d, %d)\n",
- left,
- x, y);
+ drm_err(obj->base.dev,
+ "Unexpected sg tail with %d size for remapped page (%d, %d)\n",
+ left, x, y);
return ERR_PTR(-EINVAL);
}
@@ -507,22 +514,22 @@ assert_remapped(struct drm_i915_gem_object *obj,
continue;
if (!sg) {
- pr_err("Invalid sg table: too short at plane %d, (%d, %d)!\n",
- n, x, y);
+ drm_err(obj->base.dev,
+ "Invalid sg table: too short at plane %d, (%d, %d)!\n", n, x, y);
return ERR_PTR(-EINVAL);
}
if (sg_dma_len(sg) != left) {
- pr_err("Invalid sg.length, found %u, expected %u for remapped page (%d, %d)\n",
- sg_dma_len(sg), left,
- x, y);
+ drm_err(obj->base.dev,
+ "Invalid sg.length, found %u, expected %u for remapped page (%d, %d)\n",
+ sg_dma_len(sg), left, x, y);
return ERR_PTR(-EINVAL);
}
if (sg_dma_address(sg) != 0) {
- pr_err("Invalid address, found %pad, expected 0 for remapped page (%d, %d)\n",
- &sg_dma_address(sg),
- x, y);
+ drm_err(obj->base.dev,
+ "Invalid address, found %pad, expected 0 for remapped page (%d, %d)\n",
+ &sg_dma_address(sg), x, y);
return ERR_PTR(-EINVAL);
}
@@ -628,7 +635,8 @@ static int igt_vma_rotate_remap(void *arg)
err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL);
if (err) {
- pr_err("Failed to pin VMA, err=%d\n", err);
+ drm_err(obj->base.dev,
+ "Failed to pin VMA, err=%d\n", err);
goto out_object;
}
@@ -636,36 +644,41 @@ static int igt_vma_rotate_remap(void *arg)
if (view.type == I915_GTT_VIEW_ROTATED &&
vma->size != expected_pages * PAGE_SIZE) {
- pr_err("VMA is wrong size, expected %lu, found %llu\n",
- PAGE_SIZE * expected_pages, vma->size);
+ drm_err(obj->base.dev,
+ "VMA is wrong size, expected %lu, found %llu\n",
+ PAGE_SIZE * expected_pages, vma->size);
err = -EINVAL;
goto out_object;
}
if (view.type == I915_GTT_VIEW_REMAPPED &&
vma->size > expected_pages * PAGE_SIZE) {
- pr_err("VMA is wrong size, expected %lu, found %llu\n",
- PAGE_SIZE * expected_pages, vma->size);
+ drm_err(obj->base.dev,
+ "VMA is wrong size, expected %lu, found %llu\n",
+ PAGE_SIZE * expected_pages, vma->size);
err = -EINVAL;
goto out_object;
}
if (vma->pages->nents > expected_pages) {
- pr_err("sg table is wrong sizeo, expected %u, found %u nents\n",
- expected_pages, vma->pages->nents);
+ drm_err(obj->base.dev,
+ "sg table is wrong sizeo, expected %u, found %u nents\n",
+ expected_pages, vma->pages->nents);
err = -EINVAL;
goto out_object;
}
if (vma->node.size < vma->size) {
- pr_err("VMA binding too small, expected %llu, found %llu\n",
- vma->size, vma->node.size);
+ drm_err(obj->base.dev,
+ "VMA binding too small, expected %llu, found %llu\n",
+ vma->size, vma->node.size);
err = -EINVAL;
goto out_object;
}
if (vma->pages == obj->mm.pages) {
- pr_err("VMA using unrotated object pages!\n");
+ drm_err(obj->base.dev,
+ "VMA using unrotated object pages!\n");
err = -EINVAL;
goto out_object;
}
@@ -677,19 +690,20 @@ static int igt_vma_rotate_remap(void *arg)
else
sg = assert_remapped(obj, &view.remapped, n, sg);
if (IS_ERR(sg)) {
- pr_err("Inconsistent %s VMA pages for plane %d: [(%d, %d, %d, %d, %d), (%d, %d, %d, %d, %d)]\n",
- view.type == I915_GTT_VIEW_ROTATED ?
- "rotated" : "remapped", n,
- plane_info[0].width,
- plane_info[0].height,
- plane_info[0].src_stride,
- plane_info[0].dst_stride,
- plane_info[0].offset,
- plane_info[1].width,
- plane_info[1].height,
- plane_info[1].src_stride,
- plane_info[1].dst_stride,
- plane_info[1].offset);
+ drm_err(obj->base.dev,
+ "Inconsistent %s VMA pages for plane %d: [(%d, %d, %d, %d, %d), (%d, %d, %d, %d, %d)]\n",
+ view.type == I915_GTT_VIEW_ROTATED ?
+ "rotated" : "remapped", n,
+ plane_info[0].width,
+ plane_info[0].height,
+ plane_info[0].src_stride,
+ plane_info[0].dst_stride,
+ plane_info[0].offset,
+ plane_info[1].width,
+ plane_info[1].height,
+ plane_info[1].src_stride,
+ plane_info[1].dst_stride,
+ plane_info[1].offset);
err = -EINVAL;
goto out_object;
}
@@ -698,7 +712,8 @@ static int igt_vma_rotate_remap(void *arg)
i915_vma_unpin(vma);
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("Unbinding returned %i\n", err);
+ drm_err(obj->base.dev,
+ "Unbinding returned %i\n", err);
goto out_object;
}
cond_resched();
@@ -726,14 +741,14 @@ static bool assert_partial(struct drm_i915_gem_object *obj,
dma_addr_t src;
if (!size) {
- pr_err("Partial scattergather list too long\n");
+ drm_err(obj->base.dev, "Partial scattergather list too long\n");
return false;
}
src = i915_gem_object_get_dma_address(obj, offset);
if (src != dma) {
- pr_err("DMA mismatch for partial page offset %lu\n",
- offset);
+ drm_err(obj->base.dev,
+ "DMA mismatch for partial page offset %lu\n", offset);
return false;
}
@@ -752,38 +767,38 @@ static bool assert_pin(struct i915_vma *vma,
bool ok = true;
if (vma->size != size) {
- pr_err("(%s) VMA is wrong size, expected %llu, found %llu\n",
- name, size, vma->size);
+ drm_err(vma->obj->base.dev, "(%s) VMA is wrong size, expected %llu, found %llu\n",
+ name, size, vma->size);
ok = false;
}
if (vma->node.size < vma->size) {
- pr_err("(%s) VMA binding too small, expected %llu, found %llu\n",
- name, vma->size, vma->node.size);
+ drm_err(vma->obj->base.dev,
+ "(%s) VMA binding too small, expected %llu, found %llu\n",
+ name, vma->size, vma->node.size);
ok = false;
}
if (view && view->type != I915_GTT_VIEW_NORMAL) {
if (memcmp(&vma->gtt_view, view, sizeof(*view))) {
- pr_err("(%s) VMA mismatch upon creation!\n",
- name);
+ drm_err(vma->obj->base.dev, "(%s) VMA mismatch upon creation!\n", name);
ok = false;
}
if (vma->pages == vma->obj->mm.pages) {
- pr_err("(%s) VMA using original object pages!\n",
- name);
+ drm_err(vma->obj->base.dev,
+ "(%s) VMA using original object pages!\n", name);
ok = false;
}
} else {
if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
- pr_err("Not the normal ggtt view! Found %d\n",
- vma->gtt_view.type);
+ drm_err(vma->obj->base.dev,
+ "Not the normal ggtt view! Found %d\n", vma->gtt_view.type);
ok = false;
}
if (vma->pages != vma->obj->mm.pages) {
- pr_err("VMA not using object pages!\n");
+ drm_err(vma->obj->base.dev, "VMA not using object pages!\n");
ok = false;
}
}
@@ -843,15 +858,17 @@ static int igt_vma_partial(void *arg)
goto out_object;
if (!assert_pin(vma, &view, sz*PAGE_SIZE, p->name)) {
- pr_err("(%s) Inconsistent partial pinning for (offset=%d, size=%d)\n",
- p->name, offset, sz);
+ drm_err(obj->base.dev,
+ "(%s) Inconsistent partial pinning for (offset=%d, size=%d)\n",
+ p->name, offset, sz);
err = -EINVAL;
goto out_object;
}
if (!assert_partial(obj, vma, offset, sz)) {
- pr_err("(%s) Inconsistent partial pages for (offset=%d, size=%d)\n",
- p->name, offset, sz);
+ drm_err(obj->base.dev,
+ "(%s) Inconsistent partial pages for (offset=%d, size=%d)\n",
+ p->name, offset, sz);
err = -EINVAL;
goto out_object;
}
@@ -860,7 +877,7 @@ static int igt_vma_partial(void *arg)
nvma++;
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("Unbinding returned %i\n", err);
+ drm_err(obj->base.dev, "Unbinding returned %i\n", err);
goto out_object;
}
@@ -872,8 +889,9 @@ static int igt_vma_partial(void *arg)
list_for_each_entry(vma, &obj->vma.list, obj_link)
count++;
if (count != nvma) {
- pr_err("(%s) All partial vma were not recorded on the obj->vma_list: found %u, expected %u\n",
- p->name, count, nvma);
+ drm_err(obj->base.dev,
+ "(%s) All partial vma were not recorded on the obj->vma_list: found %u, expected %u\n",
+ p->name, count, nvma);
err = -EINVAL;
goto out_object;
}
@@ -890,7 +908,7 @@ static int igt_vma_partial(void *arg)
goto out_object;
if (!assert_pin(vma, NULL, obj->base.size, p->name)) {
- pr_err("(%s) inconsistent full pin\n", p->name);
+ drm_err(obj->base.dev, "(%s) inconsistent full pin\n", p->name);
err = -EINVAL;
goto out_object;
}
@@ -899,7 +917,7 @@ static int igt_vma_partial(void *arg)
err = i915_vma_unbind_unlocked(vma);
if (err) {
- pr_err("Unbinding returned %i\n", err);
+ drm_err(obj->base.dev, "Unbinding returned %i\n", err);
goto out_object;
}
@@ -907,7 +925,7 @@ static int igt_vma_partial(void *arg)
list_for_each_entry(vma, &obj->vma.list, obj_link)
count++;
if (count != nvma) {
- pr_err("(%s) allocated an extra full vma!\n", p->name);
+ drm_err(obj->base.dev, "(%s) allocated an extra full vma!\n", p->name);
err = -EINVAL;
goto out_object;
}
@@ -1080,9 +1098,13 @@ static int igt_vma_remapped_gtt(void *arg)
val = ioread32(&map[offset / sizeof(*map)]);
if (val != exp) {
- pr_err("%s VMA write test failed, expected 0x%x, found 0x%x\n",
- *t == I915_GTT_VIEW_ROTATED ? "Rotated" : "Remapped",
- exp, val);
+ const char *kind;
+
+ kind = *t == I915_GTT_VIEW_ROTATED ?
+ "Rotated" : "Remapped";
+ drm_err(vma->obj->base.dev,
+ "%s VMA write test failed, expected 0x%x, found 0x%x\n",
+ kind, exp, val);
i915_vma_unpin_iomap(vma);
err = -EINVAL;
goto out;
diff --git a/drivers/gpu/drm/i915/selftests/intel_uncore.c b/drivers/gpu/drm/i915/selftests/intel_uncore.c
index 514d2200751b..ef17479fff1e 100644
--- a/drivers/gpu/drm/i915/selftests/intel_uncore.c
+++ b/drivers/gpu/drm/i915/selftests/intel_uncore.c
@@ -26,9 +26,12 @@
#include "gt/intel_gt.h"
+#include <drm/drm_print.h>
+
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;
}
@@ -82,20 +85,21 @@ static int intel_shadow_table_check(void)
range = range_lists[j].regs;
for (i = 0, prev = -1; i < range_lists[j].size; i++, range++) {
if (range->end < range->start) {
- pr_err("%s: range[%d]:(%06x-%06x) has end before start\n",
- __func__, i, range->start, range->end);
+ drm_err(NULL, "%s: range[%d]:(%06x-%06x) has end before start\n",
+ __func__, i, range->start, range->end);
return -EINVAL;
}
if (prev >= (s32)range->start) {
- pr_err("%s: range[%d]:(%06x-%06x) is before end of previous (%06x)\n",
- __func__, i, range->start, range->end, prev);
+ drm_err(NULL, "%s: range[%d]:(%06x-%06x) is before end of previous (%06x)\n",
+ __func__, i, range->start, range->end, prev);
return -EINVAL;
}
if (range->start % 4) {
- pr_err("%s: range[%d]:(%06x-%06x) has non-dword-aligned start\n",
- __func__, i, range->start, range->end);
+ drm_err(NULL,
+ "%s: range[%d]:(%06x-%06x) has non-dword-aligned start\n",
+ __func__, i, range->start, range->end);
return -EINVAL;
}
@@ -126,7 +130,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);
if (err)
return err;
}
@@ -172,7 +177,7 @@ static int live_forcewake_ops(void *arg)
/* vlv/chv with their pcu behave differently wrt reads */
if (IS_VALLEYVIEW(gt->i915) || IS_CHERRYVIEW(gt->i915)) {
- pr_debug("PCU fakes forcewake badly; skipping\n");
+ drm_dbg(>->i915->drm, "PCU fakes forcewake badly; skipping\n");
return 0;
}
@@ -192,8 +197,8 @@ static int live_forcewake_ops(void *arg)
if (IS_GRAPHICS_VER(gt->i915, r->min_graphics_ver, r->max_graphics_ver))
break;
if (!r->name) {
- pr_debug("Forcewaked register not known for %s; skipping\n",
- intel_platform_name(INTEL_INFO(gt->i915)->platform));
+ drm_dbg(>->i915->drm, "Forcewaked register not known for %s; skipping\n",
+ intel_platform_name(INTEL_INFO(gt->i915)->platform));
return 0;
}
@@ -225,8 +230,8 @@ static int live_forcewake_ops(void *arg)
if (!domain->wake_count)
continue;
- pr_err("fw_domain %s still active, aborting test!\n",
- intel_uncore_forcewake_domain_to_str(domain->id));
+ drm_err(>->i915->drm, "fw_domain %s still active, aborting test!\n",
+ intel_uncore_forcewake_domain_to_str(domain->id));
err = -EINVAL;
goto out_rpm;
}
@@ -245,23 +250,24 @@ static int live_forcewake_ops(void *arg)
err = wait_ack_clear(domain, FORCEWAKE_KERNEL);
preempt_enable();
if (err) {
- pr_err("Failed to clear fw_domain %s\n",
- intel_uncore_forcewake_domain_to_str(domain->id));
+ drm_err(>->i915->drm, "Failed to clear fw_domain %s\n",
+ intel_uncore_forcewake_domain_to_str(domain->id));
goto out_rpm;
}
}
if (!val) {
- pr_err("%s:%s was zero while fw was held!\n",
- engine->name, r->name);
+ drm_err(&engine->i915->drm, "%s:%s was zero while fw was held!\n",
+ engine->name, r->name);
err = -EINVAL;
goto out_rpm;
}
/* We then expect the read to return 0 outside of the fw */
if (wait_for(readl(reg) == 0, 100)) {
- pr_err("%s:%s=%0x, fw_domains 0x%x still up after 100ms!\n",
- engine->name, r->name, readl(reg), fw_domains);
+ drm_err(&engine->i915->drm,
+ "%s:%s=%0x, fw_domains 0x%x still up after 100ms!\n",
+ engine->name, r->name, readl(reg), fw_domains);
err = -ETIMEDOUT;
goto out_rpm;
}
@@ -279,7 +285,8 @@ static int live_fw_table(void *arg)
/* Confirm the table we load is still valid */
return intel_fw_table_check(gt->uncore->fw_domains_table,
gt->uncore->fw_domains_table_entries,
- GRAPHICS_VER(gt->i915) >= 9);
+ GRAPHICS_VER(gt->i915) >= 9,
+ >->i915->drm);
}
int intel_uncore_live_selftests(struct drm_i915_private *i915)
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 4/8] drm/i915/selftests: Use drm_* prints in selftest helpers
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
` (2 preceding siblings ...)
2026-08-18 9:56 ` [PATCH v2 3/8] drm/i915/selftests: Use drm_* prints in live selftests Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 5/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests Krzysztof Karas
` (4 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
drivers/gpu/drm/i915/selftests/i915_active.c | 15 ++++++++++-----
drivers/gpu/drm/i915/selftests/igt_flush_test.c | 6 ++++--
drivers/gpu/drm/i915/selftests/igt_live_test.c | 5 ++---
drivers/gpu/drm/i915/selftests/igt_reset.c | 4 +++-
.../drm/i915/selftests/intel_scheduler_helpers.c | 7 +++++--
drivers/gpu/drm/i915/selftests/mock_gem_device.c | 4 +++-
6 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_active.c b/drivers/gpu/drm/i915/selftests/i915_active.c
index 9fea2fabeac4..105de5d0d3b5 100644
--- a/drivers/gpu/drm/i915/selftests/i915_active.c
+++ b/drivers/gpu/drm/i915/selftests/i915_active.c
@@ -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,11 @@ 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");
+ struct drm_printer p = drm_err_printer(&i915->drm, __func__);
+
+ drm_printf(&p, "i915_active not retired after flushing barriers!\n");
+ i915_active_print(&active->base, &p);
+
err = -EINVAL;
}
diff --git a/drivers/gpu/drm/i915/selftests/igt_flush_test.c b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
index c383d31d46b0..b981d06c3f32 100644
--- a/drivers/gpu/drm/i915/selftests/igt_flush_test.c
+++ b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
@@ -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,8 @@ 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(>->i915->drm, "%pS timed out, cancelling all further testing.\n",
+ __builtin_return_address(0));
GEM_TRACE("%pS timed out.\n",
__builtin_return_address(0));
diff --git a/drivers/gpu/drm/i915/selftests/igt_live_test.c b/drivers/gpu/drm/i915/selftests/igt_live_test.c
index 7d41874a49c5..fa93f9720dad 100644
--- a/drivers/gpu/drm/i915/selftests/igt_live_test.c
+++ b/drivers/gpu/drm/i915/selftests/igt_live_test.c
@@ -59,9 +59,8 @@ 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;
}
diff --git a/drivers/gpu/drm/i915/selftests/igt_reset.c b/drivers/gpu/drm/i915/selftests/igt_reset.c
index a2838c65f8a5..0ab280db7dd4 100644
--- a/drivers/gpu/drm/i915/selftests/igt_reset.c
+++ b/drivers/gpu/drm/i915/selftests/igt_reset.c
@@ -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,7 @@ 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(>->i915->drm, "%s: current gpu_error=%08lx\n", __func__, gt->reset.flags);
while (test_and_set_bit(I915_RESET_BACKOFF, >->reset.flags))
wait_event(gt->reset.queue,
diff --git a/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c b/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c
index e14ac0ab1314..a5f379f27352 100644
--- a/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c
+++ b/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c
@@ -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(>->i915->drm, "No valid engine found!\n");
return NULL;
}
@@ -60,7 +62,8 @@ 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;
}
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 796c9b070e41..c0dadcd961bb 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -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);
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 5/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
` (3 preceding siblings ...)
2026-08-18 9:56 ` [PATCH v2 4/8] drm/i915/selftests: Use drm_* prints in selftest helpers Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 6/8] drm/i915/gt/selftests: Use drm_* prints in gt standalone tests Krzysztof Karas
` (3 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
drivers/gpu/drm/i915/gt/selftest_context.c | 27 +-
drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 35 +--
drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 50 +--
drivers/gpu/drm/i915/gt/selftest_execlists.c | 294 +++++++++---------
drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 25 +-
drivers/gpu/drm/i915/gt/selftest_migrate.c | 51 ++-
drivers/gpu/drm/i915/gt/selftest_mocs.c | 12 +-
drivers/gpu/drm/i915/gt/selftest_reset.c | 27 +-
drivers/gpu/drm/i915/gt/selftest_slpc.c | 86 ++---
drivers/gpu/drm/i915/gt/selftest_tlb.c | 34 +-
.../gpu/drm/i915/gt/selftest_workarounds.c | 91 +++---
11 files changed, 396 insertions(+), 336 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c b/drivers/gpu/drm/i915/gt/selftest_context.c
index ab76703f6e8b..e91617771b59 100644
--- a/drivers/gpu/drm/i915/gt/selftest_context.c
+++ b/drivers/gpu/drm/i915/gt/selftest_context.c
@@ -136,7 +136,8 @@ 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;
}
@@ -221,8 +222,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(&engine->i915->drm, "%s is awake before starting %s!\n",
+ engine->name, __func__);
return -EINVAL;
}
@@ -250,15 +251,16 @@ 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(&engine->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(&engine->i915->drm, "%s is asleep before idle-barrier\n",
+ engine->name);
err = -EINVAL;
goto out_engine;
}
@@ -280,7 +282,7 @@ 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(&engine->i915->drm, "context is still active!");
err = -EINVAL;
}
@@ -374,8 +376,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(&engine->i915->drm, "%s is awake before starting %s!\n",
+ engine->name, __func__);
return -EINVAL;
}
@@ -403,8 +405,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(&engine->i915->drm,
+ "remote context is not active; expected idle-barrier (%s pass %d)\n",
+ engine->name, pass);
err = -EINVAL;
break;
}
diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_cs.c b/drivers/gpu/drm/i915/gt/selftest_engine_cs.c
index 5ffa5e30f419..583b56956634 100644
--- a/drivers/gpu/drm/i915/gt/selftest_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/selftest_engine_cs.c
@@ -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(>->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(>->i915->drm, "%s: 16K MI_NOOP cycles: %u\n",
+ engine->name, trifilter(cycles));
}
if (perf_end(gt, wakeref))
err = -EIO;
@@ -400,11 +400,10 @@ static int intel_mmio_bases_check(void *arg)
u32 base = info->mmio_bases[j].base;
if (ver >= prev) {
- pr_err("%s(%s, class:%d, instance:%d): mmio base for graphics ver %u is before the one for ver %u\n",
- __func__,
- intel_engine_class_repr(info->class),
- info->class, info->instance,
- prev, ver);
+ drm_err(NULL,
+ "%s(%s, class:%d, instance:%d): mmio base for graphics ver %u is before the one for ver %u\n",
+ __func__, intel_engine_class_repr(info->class),
+ info->class, info->instance, prev, ver);
return -EINVAL;
}
@@ -412,22 +411,20 @@ static int intel_mmio_bases_check(void *arg)
break;
if (!base) {
- pr_err("%s(%s, class:%d, instance:%d): invalid mmio base (%x) for graphics ver %u at entry %u\n",
- __func__,
- intel_engine_class_repr(info->class),
- info->class, info->instance,
- base, ver, j);
+ drm_err(NULL,
+ "%s(%s, class:%d, instance:%d): invalid mmio base (%x) for graphics ver %u at entry %u\n",
+ __func__, intel_engine_class_repr(info->class),
+ info->class, info->instance, base, ver, j);
return -EINVAL;
}
prev = ver;
}
- pr_debug("%s: min graphics version supported for %s%d is %u\n",
- __func__,
- intel_engine_class_repr(info->class),
- info->instance,
- prev);
+ drm_dbg(NULL,
+ "%s: min graphics version supported for %s%d is %u\n",
+ __func__, intel_engine_class_repr(info->class),
+ info->instance, prev);
}
return 0;
diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
index 10e556a7eac4..3545a86956f4 100644
--- a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
+++ b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
@@ -5,6 +5,8 @@
#include <linux/sort.h>
+#include <drm/drm_print.h>
+
#include "gt/intel_gt_print.h"
#include "i915_selftest.h"
#include "intel_engine_regs.h"
@@ -128,8 +130,9 @@ static int __measure_timestamps(struct intel_context *ce,
}
i915_request_put(rq);
- pr_debug("%s CTX_TIMESTAMP: [%x, %x], RING_TIMESTAMP: [%x, %x]\n",
- engine->name, sema[1], sema[3], sema[0], sema[4]);
+ drm_dbg(&engine->i915->drm,
+ "%s CTX_TIMESTAMP: [%x, %x], RING_TIMESTAMP: [%x, %x]\n",
+ engine->name, sema[1], sema[3], sema[0], sema[4]);
*d_ctx = sema[3] - sema[1];
*d_ring = sema[4] - sema[0];
@@ -159,15 +162,16 @@ static int __live_engine_timestamps(struct intel_engine_cs *engine)
d_ring = trifilter(s_ring);
d_ctx = trifilter(s_ctx);
- pr_info("%s elapsed:%lldns, CTX_TIMESTAMP:%lldns, RING_TIMESTAMP:%lldns\n",
- engine->name, dt,
- intel_gt_clock_interval_to_ns(engine->gt, d_ctx),
- intel_gt_clock_interval_to_ns(engine->gt, d_ring));
+ drm_info(&engine->i915->drm,
+ "%s elapsed:%lldns, CTX_TIMESTAMP:%lldns, RING_TIMESTAMP:%lldns\n",
+ engine->name, dt, intel_gt_clock_interval_to_ns(engine->gt, d_ctx),
+ intel_gt_clock_interval_to_ns(engine->gt, d_ring));
d_ring = intel_gt_clock_interval_to_ns(engine->gt, d_ring);
if (3 * dt > 4 * d_ring || 4 * dt < 3 * d_ring) {
- pr_err("%s Mismatch between ring timestamp and walltime!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s Mismatch between ring timestamp and walltime!\n",
+ engine->name);
return -EINVAL;
}
@@ -181,8 +185,9 @@ static int __live_engine_timestamps(struct intel_engine_cs *engine)
d_ring *= engine->gt->clock_frequency;
if (3 * d_ctx > 4 * d_ring || 4 * d_ctx < 3 * d_ring) {
- pr_err("%s Mismatch between ring and context timestamps!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s Mismatch between ring and context timestamps!\n",
+ engine->name);
return -EINVAL;
}
@@ -232,7 +237,7 @@ static int __spin_until_busier(struct intel_engine_cs *engine, ktime_t busyness)
while (intel_engine_get_busy_time(engine, &unused) == busyness) {
dt = ktime_get() - start;
if (dt > 10000000) {
- pr_err("active wait timed out %lld\n", dt);
+ drm_err(&engine->i915->drm, "active wait timed out %lld\n", dt);
ENGINE_TRACE(engine, "active wait time out %lld\n", dt);
return -ETIME;
}
@@ -284,9 +289,9 @@ static int live_engine_busy_stats(void *arg)
preempt_enable();
dt = ktime_sub(t[1], t[0]);
if (de < 0 || de > 10) {
- pr_err("%s: reported %lldns [%d%%] busyness while sleeping [for %lldns]\n",
- engine->name,
- de, (int)div64_u64(100 * de, dt), dt);
+ drm_err(&engine->i915->drm,
+ "%s: reported %lldns [%d%%] busyness while sleeping [for %lldns]\n",
+ engine->name, de, (int)div64_u64(100 * de, dt), dt);
GEM_TRACE_DUMP();
err = -EINVAL;
goto end;
@@ -323,9 +328,9 @@ static int live_engine_busy_stats(void *arg)
preempt_enable();
dt = ktime_sub(t[1], t[0]);
if (100 * de < 95 * dt || 95 * de > 100 * dt) {
- pr_err("%s: reported %lldns [%d%%] busyness while spinning [for %lldns]\n",
- engine->name,
- de, (int)div64_u64(100 * de, dt), dt);
+ drm_err(&engine->i915->drm,
+ "%s: reported %lldns [%d%%] busyness while spinning [for %lldns]\n",
+ engine->name, de, (int)div64_u64(100 * de, dt), dt);
GEM_TRACE_DUMP();
err = -EINVAL;
goto end;
@@ -358,7 +363,7 @@ static int live_engine_pm(void *arg)
* tell us.
*/
if (intel_gt_pm_wait_for_idle(gt)) {
- pr_err("Unable to flush GT pm before test\n");
+ drm_err(>->i915->drm, "Unable to flush GT pm before test\n");
return -EBUSY;
}
@@ -386,8 +391,9 @@ static int live_engine_pm(void *arg)
p->critical_section_begin();
if (!intel_engine_pm_get_if_awake(engine))
- pr_err("intel_engine_pm_get_if_awake(%s) failed under %s\n",
- engine->name, p->name);
+ drm_err(&engine->i915->drm,
+ "intel_engine_pm_get_if_awake(%s) failed under %s\n",
+ engine->name, p->name);
else
intel_engine_pm_put_async(engine);
intel_engine_pm_put_async(engine);
@@ -396,8 +402,8 @@ static int live_engine_pm(void *arg)
intel_engine_pm_flush(engine);
if (intel_engine_pm_is_awake(engine)) {
- pr_err("%s is still awake after flushing pm\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s is still awake after flushing pm\n", engine->name);
return -EINVAL;
}
diff --git a/drivers/gpu/drm/i915/gt/selftest_execlists.c b/drivers/gpu/drm/i915/gt/selftest_execlists.c
index 21e5ed9f72a3..83667c38340a 100644
--- a/drivers/gpu/drm/i915/gt/selftest_execlists.c
+++ b/drivers/gpu/drm/i915/gt/selftest_execlists.c
@@ -89,20 +89,16 @@ 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(&engine->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(&engine->i915->drm, "%s: hanging request %llx:%lld did not complete\n",
+ engine->name, rq->fence.context, rq->fence.seqno);
return -ETIME;
}
@@ -419,12 +415,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,
- ce[0]->ring->tail,
- ce[0]->ring->emit,
- rq->tail);
+ drm_dbg(&engine->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);
@@ -444,15 +438,15 @@ 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(&engine->i915->drm, "%s: preemption request was not submitted\n",
+ engine->name);
err = -ETIME;
}
- 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(&engine->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);
err_ce:
intel_engine_flush_submission(engine);
@@ -644,8 +638,8 @@ static int live_hold_reset(void *arg)
/* Check that we do not resubmit the held request */
if (!i915_request_wait(rq, 0, HZ / 5)) {
- pr_err("%s: on hold request completed!\n",
- engine->name);
+ drm_err(&engine->i915->drm, "%s: on hold request completed!\n",
+ engine->name);
i915_request_put(rq);
err = -EIO;
goto out;
@@ -655,8 +649,8 @@ static int live_hold_reset(void *arg)
/* But is resubmitted on release */
execlists_unhold(engine, rq);
if (i915_request_wait(rq, 0, HZ / 5) < 0) {
- pr_err("%s: held request did not complete!\n",
- engine->name);
+ drm_err(&engine->i915->drm, "%s: held request did not complete!\n",
+ engine->name);
intel_gt_set_wedged(gt);
err = -ETIME;
}
@@ -764,22 +758,21 @@ static int live_error_interrupt(void *arg)
err = wait_for_submit(engine, client[0], HZ / 2);
if (err) {
- pr_err("%s: first request did not start within time!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: first request did not start within time!\n",
+ engine->name);
err = -ETIME;
goto out;
}
for (i = 0; i < ARRAY_SIZE(client); i++) {
if (i915_request_wait(client[i], 0, HZ / 5) < 0)
- pr_debug("%s: %s request incomplete!\n",
- engine->name,
- error_repr(p->error[i]));
+ drm_dbg(&engine->i915->drm, "%s: %s request incomplete!\n",
+ engine->name, error_repr(p->error[i]));
if (!i915_request_started(client[i])) {
- pr_err("%s: %s request not started!\n",
- engine->name,
- error_repr(p->error[i]));
+ drm_err(&engine->i915->drm, "%s: %s request not started!\n",
+ engine->name, error_repr(p->error[i]));
err = -ETIME;
goto out;
}
@@ -787,11 +780,12 @@ static int live_error_interrupt(void *arg)
/* Kick the tasklet to process the error */
intel_engine_flush_submission(engine);
if (client[i]->fence.error != p->error[i]) {
- pr_err("%s: %s request (%s) with wrong error code: %d\n",
- engine->name,
- error_repr(p->error[i]),
- i915_request_completed(client[i]) ? "completed" : "running",
- client[i]->fence.error);
+ drm_err(&engine->i915->drm,
+ "%s: %s request (%s) with wrong error code: %d\n",
+ engine->name, error_repr(p->error[i]),
+ i915_request_completed(
+ client[i]) ? "completed" : "running",
+ client[i]->fence.error);
err = -EINVAL;
goto out;
}
@@ -802,9 +796,10 @@ static int live_error_interrupt(void *arg)
if (client[i])
i915_request_put(client[i]);
if (err) {
- pr_err("%s: failed at phase[%zd] { %d, %d }\n",
- engine->name, p - phases,
- p->error[0], p->error[1]);
+ drm_err(&engine->i915->drm,
+ "%s: failed at phase[%zd] { %d, %d }\n",
+ engine->name, p - phases,
+ p->error[0], p->error[1]);
break;
}
}
@@ -964,8 +959,9 @@ slice_semaphore_queue(struct intel_engine_cs *outer,
if (i915_request_wait(head, 0,
2 * outer->gt->info.num_engines * (count + 2) * (count + 3)) < 0) {
- pr_err("%s: Failed to slice along semaphore chain of length (%d, %d)!\n",
- outer->name, count, n);
+ drm_err(&outer->gt->i915->drm,
+ "%s: Failed to slice along semaphore chain of length (%d, %d)!\n",
+ outer->name, count, n);
GEM_TRACE_DUMP();
intel_gt_set_wedged(outer->gt);
err = -EIO;
@@ -1174,8 +1170,8 @@ static int live_timeslice_rewind(void *arg)
err = wait_for_submit(engine, rq[A2], HZ / 2);
if (err) {
- pr_err("%s: failed to submit first context\n",
- engine->name);
+ drm_err(&engine->i915->drm, "%s: failed to submit first context\n",
+ engine->name);
goto err;
}
@@ -1192,8 +1188,8 @@ static int live_timeslice_rewind(void *arg)
err = wait_for_submit(engine, rq[B1], HZ / 2);
if (err) {
- pr_err("%s: failed to submit second context\n",
- engine->name);
+ drm_err(&engine->i915->drm, "%s: failed to submit second context\n",
+ engine->name);
goto err;
}
@@ -1222,21 +1218,21 @@ static int live_timeslice_rewind(void *arg)
;
if (!time_before(jiffies, timeout)) {
- pr_err("%s: rq[%d] timed out\n",
- engine->name, i - 1);
+ drm_err(&engine->i915->drm, "%s: rq[%d] timed out\n",
+ engine->name, i - 1);
err = -ETIME;
goto err;
}
- pr_debug("%s: slot[%d]:%x\n", engine->name, i, slot[i]);
+ drm_dbg(&engine->i915->drm, "%s: slot[%d]:%x\n", engine->name,
+ i, slot[i]);
}
/* XZY: XZ < XY */
if (slot[Z] - slot[X] >= slot[Y] - slot[X]) {
- pr_err("%s: timeslicing did not run context B [%u] before A [%u]!\n",
- engine->name,
- slot[Z] - slot[X],
- slot[Y] - slot[X]);
+ drm_err(&engine->i915->drm,
+ "%s: timeslicing did not run context B [%u] before A [%u]!\n",
+ engine->name, slot[Z] - slot[X], slot[Y] - slot[X]);
err = -EINVAL;
}
@@ -1347,8 +1343,9 @@ static int live_timeslice_queue(void *arg)
engine->sched_engine->schedule(rq, &attr);
err = wait_for_submit(engine, rq, HZ / 2);
if (err) {
- pr_err("%s: Timed out trying to submit semaphores\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Timed out trying to submit semaphores\n",
+ engine->name);
goto err_rq;
}
@@ -1361,8 +1358,8 @@ static int live_timeslice_queue(void *arg)
err = wait_for_submit(engine, nop, HZ / 2);
i915_request_put(nop);
if (err) {
- pr_err("%s: Timed out trying to submit nop\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Timed out trying to submit nop\n", engine->name);
goto err_rq;
}
@@ -1385,8 +1382,8 @@ static int live_timeslice_queue(void *arg)
struct drm_printer p =
drm_info_printer(gt->i915->drm.dev);
- pr_err("%s: Failed to timeslice into queue\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Failed to timeslice into queue\n", engine->name);
intel_engine_dump(engine, &p,
"%s\n", engine->name);
@@ -1501,8 +1498,9 @@ static int live_timeslice_nopreempt(void *arg)
* enough to see if it is timesliced in by mistake.
*/
if (i915_request_wait(rq, 0, slice_timeout(engine)) >= 0) {
- pr_err("%s: I915_PRIORITY_BARRIER request completed, bypassing no-preempt request\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: I915_PRIORITY_BARRIER request completed, bypassing no-preempt request\n",
+ engine->name);
err = -EINVAL;
}
i915_request_put(rq);
@@ -1648,8 +1646,8 @@ static int live_busywait_preempt(void *arg)
/* Low priority request should be busywaiting now */
if (i915_request_wait(lo, 0, 1) != -ETIME) {
i915_request_put(lo);
- pr_err("%s: Busywaiting request did not!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Busywaiting request did not!\n", engine->name);
err = -EIO;
goto err_vma;
}
@@ -1680,8 +1678,9 @@ static int live_busywait_preempt(void *arg)
if (i915_request_wait(lo, 0, HZ / 5) < 0) {
struct drm_printer p = drm_info_printer(gt->i915->drm.dev);
- pr_err("%s: Failed to preempt semaphore busywait!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Failed to preempt semaphore busywait!\n",
+ engine->name);
intel_engine_dump(engine, &p, "%s\n", engine->name);
GEM_TRACE_DUMP();
@@ -1871,7 +1870,7 @@ static int live_late_preempt(void *arg)
i915_request_add(rq);
if (!igt_wait_for_spinner(&spin_lo, rq)) {
- pr_err("First context failed to start\n");
+ drm_err(&engine->i915->drm, "First context failed to start\n");
goto err_wedged;
}
@@ -1885,7 +1884,7 @@ static int live_late_preempt(void *arg)
i915_request_add(rq);
if (igt_wait_for_spinner(&spin_hi, rq)) {
- pr_err("Second context overtook first?\n");
+ drm_err(&engine->i915->drm, "Second context overtook first?\n");
goto err_wedged;
}
@@ -1893,7 +1892,8 @@ static int live_late_preempt(void *arg)
engine->sched_engine->schedule(rq, &attr);
if (!igt_wait_for_spinner(&spin_hi, rq)) {
- pr_err("High priority context failed to preempt the low priority context\n");
+ drm_err(&engine->i915->drm,
+ "High priority context failed to preempt the low priority context\n");
GEM_TRACE_DUMP();
goto err_wedged;
}
@@ -1993,7 +1993,7 @@ static int live_nopreempt(void *arg)
i915_request_add(rq_a);
if (!igt_wait_for_spinner(&a.spin, rq_a)) {
- pr_err("First client failed to start\n");
+ drm_err(&engine->i915->drm, "First client failed to start\n");
goto err_wedged;
}
@@ -2012,22 +2012,23 @@ static int live_nopreempt(void *arg)
/* Wait long enough for preemption and timeslicing */
if (igt_wait_for_spinner(&b.spin, rq_b)) {
- pr_err("Second client started too early!\n");
+ drm_err(&engine->i915->drm, "Second client started too early!\n");
goto err_wedged;
}
igt_spinner_end(&a.spin);
if (!igt_wait_for_spinner(&b.spin, rq_b)) {
- pr_err("Second client failed to start\n");
+ drm_err(&engine->i915->drm, "Second client failed to start\n");
goto err_wedged;
}
igt_spinner_end(&b.spin);
if (engine->execlists.preempt_hang.count) {
- pr_err("Preemption recorded x%d; should have been suppressed!\n",
- engine->execlists.preempt_hang.count);
+ drm_err(&engine->i915->drm,
+ "Preemption recorded x%d; should have been suppressed!\n",
+ engine->execlists.preempt_hang.count);
err = -EINVAL;
goto err_wedged;
}
@@ -2089,7 +2090,8 @@ static int __cancel_active0(struct live_preempt_cancel *arg)
err = wait_for_reset(arg->engine, rq, HZ / 2);
if (err) {
- pr_err("Cancelled inflight0 request did not reset\n");
+ drm_err(&arg->engine->i915->drm,
+ "Cancelled inflight0 request did not reset\n");
goto out;
}
@@ -2152,13 +2154,15 @@ static int __cancel_active1(struct live_preempt_cancel *arg)
goto out;
if (rq[0]->fence.error != 0) {
- pr_err("Normal inflight0 request did not complete\n");
+ drm_err(&arg->engine->i915->drm,
+ "Normal inflight0 request did not complete\n");
err = -EINVAL;
goto out;
}
if (rq[1]->fence.error != -EIO) {
- pr_err("Cancelled inflight1 request did not report -EIO\n");
+ drm_err(&arg->engine->i915->drm,
+ "Cancelled inflight1 request did not report -EIO\n");
err = -EINVAL;
goto out;
}
@@ -2234,7 +2238,8 @@ static int __cancel_queued(struct live_preempt_cancel *arg)
goto out;
if (rq[0]->fence.error != -EIO) {
- pr_err("Cancelled inflight0 request did not report -EIO\n");
+ drm_err(&arg->engine->i915->drm,
+ "Cancelled inflight0 request did not report -EIO\n");
err = -EINVAL;
goto out;
}
@@ -2246,13 +2251,15 @@ static int __cancel_queued(struct live_preempt_cancel *arg)
*/
if (intel_engine_has_semaphores(rq[1]->engine) &&
rq[1]->fence.error != 0) {
- pr_err("Normal inflight1 request did not complete\n");
+ drm_err(&arg->engine->i915->drm,
+ "Normal inflight1 request did not complete\n");
err = -EINVAL;
goto out;
}
if (rq[2]->fence.error != -EIO) {
- pr_err("Cancelled queued request did not report -EIO\n");
+ drm_err(&arg->engine->i915->drm,
+ "Cancelled queued request did not report -EIO\n");
err = -EINVAL;
goto out;
}
@@ -2300,7 +2307,8 @@ static int __cancel_hostile(struct live_preempt_cancel *arg)
err = wait_for_reset(arg->engine, rq, HZ / 2);
if (err) {
- pr_err("Cancelled inflight0 request did not reset\n");
+ drm_err(&arg->engine->i915->drm,
+ "Cancelled inflight0 request did not reset\n");
goto out;
}
@@ -2371,7 +2379,8 @@ static int __cancel_fail(struct live_preempt_cancel *arg)
intel_engine_set_heartbeat(engine,
engine->defaults.heartbeat_interval_ms);
if (err) {
- pr_err("Cancelled inflight0 request did not reset\n");
+ drm_err(&engine->i915->drm,
+ "Cancelled inflight0 request did not reset\n");
goto out;
}
@@ -2490,7 +2499,7 @@ static int live_suppress_self_preempt(void *arg)
i915_request_add(rq_a);
if (!igt_wait_for_spinner(&a.spin, rq_a)) {
- pr_err("First client failed to start\n");
+ drm_err(&engine->i915->drm, "First client failed to start\n");
st_engine_heartbeat_enable(engine);
goto err_wedged;
}
@@ -2513,7 +2522,7 @@ static int live_suppress_self_preempt(void *arg)
igt_spinner_end(&a.spin);
if (!igt_wait_for_spinner(&b.spin, rq_b)) {
- pr_err("Second client failed to start\n");
+ drm_err(&engine->i915->drm, "Second client failed to start\n");
st_engine_heartbeat_enable(engine);
goto err_wedged;
}
@@ -2524,10 +2533,9 @@ static int live_suppress_self_preempt(void *arg)
igt_spinner_end(&a.spin);
if (engine->execlists.preempt_hang.count) {
- pr_err("Preemption on %s recorded x%d, depth %d; should have been suppressed!\n",
- engine->name,
- engine->execlists.preempt_hang.count,
- depth);
+ drm_err(&engine->i915->drm,
+ "Preemption on %s recorded x%d, depth %d; should have been suppressed!\n",
+ engine->name, engine->execlists.preempt_hang.count, depth);
st_engine_heartbeat_enable(engine);
err = -EINVAL;
goto err_client_b;
@@ -2595,12 +2603,13 @@ static int live_chain_preempt(void *arg)
if (ring_size < 0)
ring_size += rq->ring->size;
ring_size = rq->ring->size / ring_size;
- pr_debug("%s(%s): Using maximum of %d requests\n",
- __func__, engine->name, ring_size);
+ drm_dbg(&engine->i915->drm, "%s(%s): Using maximum of %d requests\n",
+ __func__, engine->name, ring_size);
igt_spinner_end(&lo.spin);
if (i915_request_wait(rq, 0, HZ / 2) < 0) {
- pr_err("Timed out waiting to flush %s\n", engine->name);
+ drm_err(&engine->i915->drm, "Timed out waiting to flush %s\n",
+ engine->name);
i915_request_put(rq);
goto err_wedged;
}
@@ -2648,8 +2657,8 @@ static int live_chain_preempt(void *arg)
struct drm_printer p =
drm_info_printer(gt->i915->drm.dev);
- pr_err("Failed to preempt over chain of %d\n",
- count);
+ drm_err(&engine->i915->drm,
+ "Failed to preempt over chain of %d\n", count);
intel_engine_dump(engine, &p,
"%s\n", engine->name);
i915_request_put(rq);
@@ -2669,8 +2678,9 @@ static int live_chain_preempt(void *arg)
struct drm_printer p =
drm_info_printer(gt->i915->drm.dev);
- pr_err("Failed to flush low priority chain of %d requests\n",
- count);
+ drm_err(&engine->i915->drm,
+ "Failed to flush low priority chain of %d requests\n",
+ count);
intel_engine_dump(engine, &p,
"%s\n", engine->name);
@@ -2867,12 +2877,10 @@ static int __live_preempt_ring(struct intel_engine_cs *engine,
n++;
}
intel_engine_flush_submission(engine);
- 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(&engine->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);
i915_request_put(rq);
/* Create a second request to preempt the first ring */
@@ -2889,15 +2897,15 @@ 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(&engine->i915->drm,
+ "%s: preemption request was not submitted\n", engine->name);
err = -ETIME;
}
- 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(&engine->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);
err_ce:
intel_engine_flush_submission(engine);
@@ -2999,8 +3007,8 @@ static int live_preempt_gang(void *arg)
engine->sched_engine->schedule(rq, &attr);
} while (prio <= I915_PRIORITY_MAX &&
!__igt_timeout(end_time, NULL));
- pr_debug("%s: Preempt chain of %d requests\n",
- engine->name, prio);
+ drm_dbg(&engine->i915->drm, "%s: Preempt chain of %d requests\n",
+ engine->name, prio);
/*
* Such that the last spinner is the highest priority and
@@ -3024,8 +3032,9 @@ static int live_preempt_gang(void *arg)
struct drm_printer p =
drm_info_printer(engine->i915->drm.dev);
- pr_err("Failed to flush chain of %d requests, at %d\n",
- prio, rq_prio(rq));
+ drm_err(&engine->i915->drm,
+ "Failed to flush chain of %d requests, at %d\n",
+ prio, rq_prio(rq));
intel_engine_dump(engine, &p,
"%s\n", engine->name);
@@ -3319,8 +3328,8 @@ static int live_preempt_user(void *arg)
}
if (READ_ONCE(result[0]) != NUM_GPR) {
- pr_err("%s: Failed to release semaphore\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Failed to release semaphore\n", engine->name);
err = -EIO;
goto end_test;
}
@@ -3335,9 +3344,9 @@ static int live_preempt_user(void *arg)
for (gpr = 1; gpr < NUM_GPR; gpr++) {
if (result[NUM_GPR * i + gpr] != 1) {
- pr_err("%s: Invalid result, client %d, gpr %d, result: %d\n",
- engine->name,
- i, gpr, result[NUM_GPR * i + gpr]);
+ drm_err(&engine->i915->drm,
+ "%s: Invalid result, client %d, gpr %d, result: %d\n",
+ engine->name, i, gpr, result[NUM_GPR * i + gpr]);
err = -EINVAL;
goto end_test;
}
@@ -3601,8 +3610,9 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
kthread_destroy_worker(worker[id]);
}
- pr_info("Submitted %lu crescendo:%x requests across %d engines and %d contexts\n",
- count, flags, smoke->gt->info.num_engines, smoke->ncontext);
+ drm_info(&smoke->gt->i915->drm,
+ "Submitted %lu crescendo:%x requests across %d engines and %d contexts\n",
+ count, flags, smoke->gt->info.num_engines, smoke->ncontext);
kfree(arg);
return 0;
@@ -3630,8 +3640,9 @@ static int smoke_random(struct preempt_smoke *smoke, unsigned int flags)
}
} while (count < smoke->ncontext && !__igt_timeout(end_time, NULL));
- pr_info("Submitted %lu random:%x requests across %d engines and %d contexts\n",
- count, flags, smoke->gt->info.num_engines, smoke->ncontext);
+ drm_info(&smoke->gt->i915->drm,
+ "Submitted %lu random:%x requests across %d engines and %d contexts\n",
+ count, flags, smoke->gt->info.num_engines, smoke->ncontext);
return 0;
}
@@ -3787,10 +3798,11 @@ static int nop_virtual_engine(struct intel_gt *gt,
for (nc = 0; nc < nctx; nc++) {
if (i915_request_wait(request[nc], 0, HZ / 10) < 0) {
- pr_err("%s(%s): wait for %llx:%lld timed out\n",
- __func__, ve[0]->engine->name,
- request[nc]->fence.context,
- request[nc]->fence.seqno);
+ drm_err(>->i915->drm,
+ "%s(%s): wait for %llx:%lld timed out\n",
+ __func__, ve[0]->engine->name,
+ request[nc]->fence.context,
+ request[nc]->fence.seqno);
GEM_TRACE("%s(%s) failed at request %llx:%lld\n",
__func__, ve[0]->engine->name,
@@ -3819,9 +3831,9 @@ static int nop_virtual_engine(struct intel_gt *gt,
if (err)
goto out;
- pr_info("Requestx%d latencies on %s: 1 = %lluns, %lu = %lluns\n",
- nctx, ve[0]->engine->name, ktime_to_ns(times[0]),
- prime, div64_u64(ktime_to_ns(times[1]), prime));
+ drm_info(>->i915->drm, "Requestx%d latencies on %s: 1 = %lluns, %lu = %lluns\n",
+ nctx, ve[0]->engine->name, ktime_to_ns(times[0]),
+ prime, div64_u64(ktime_to_ns(times[1]), prime));
out:
if (igt_flush_test(gt->i915))
@@ -3880,8 +3892,8 @@ static int live_virtual_engine(void *arg)
for_each_engine(engine, gt, id) {
err = nop_virtual_engine(gt, &engine, 1, 1, 0);
if (err) {
- pr_err("Failed to wrap engine %s: err=%d\n",
- engine->name, err);
+ drm_err(&engine->i915->drm, "Failed to wrap engine %s: err=%d\n",
+ engine->name, err);
return err;
}
}
@@ -3954,10 +3966,9 @@ static int mask_virtual_engine(struct intel_gt *gt,
for (n = 0; n < nsibling; n++) {
if (i915_request_wait(request[n], 0, HZ / 10) < 0) {
- pr_err("%s(%s): wait for %llx:%lld timed out\n",
- __func__, ve->engine->name,
- request[n]->fence.context,
- request[n]->fence.seqno);
+ drm_err(>->i915->drm, "%s(%s): wait for %llx:%lld timed out\n",
+ __func__, ve->engine->name, request[n]->fence.context,
+ request[n]->fence.seqno);
GEM_TRACE("%s(%s) failed at request %llx:%lld\n",
__func__, ve->engine->name,
@@ -3970,9 +3981,10 @@ static int mask_virtual_engine(struct intel_gt *gt,
}
if (request[n]->engine != siblings[nsibling - n - 1]) {
- pr_err("Executed on wrong sibling '%s', expected '%s'\n",
- request[n]->engine->name,
- siblings[nsibling - n - 1]->name);
+ drm_err(>->i915->drm,
+ "Executed on wrong sibling '%s', expected '%s'\n",
+ request[n]->engine->name,
+ siblings[nsibling - n - 1]->name);
err = -EINVAL;
goto out;
}
@@ -4272,8 +4284,8 @@ static int preserved_virtual_engine(struct intel_gt *gt,
for (n = 0; n < NUM_GPR_DW; n++) {
if (cs[n] != n) {
- pr_err("Incorrect value[%d] found for GPR[%d]\n",
- cs[n], n);
+ drm_err(>->i915->drm, "Incorrect value[%d] found for GPR[%d]\n",
+ cs[n], n);
err = -EINVAL;
break;
}
@@ -4400,8 +4412,8 @@ static int reset_virtual_engine(struct intel_gt *gt,
/* Check that we do not resubmit the held request */
i915_request_get(rq);
if (!i915_request_wait(rq, 0, HZ / 5)) {
- pr_err("%s: on hold request completed!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: on hold request completed!\n", engine->name);
intel_gt_set_wedged(gt);
err = -EIO;
goto out_rq;
@@ -4411,8 +4423,8 @@ static int reset_virtual_engine(struct intel_gt *gt,
/* But is resubmitted on release */
execlists_unhold(engine, rq);
if (i915_request_wait(rq, 0, HZ / 5) < 0) {
- pr_err("%s: held request did not complete!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: held request did not complete!\n", engine->name);
intel_gt_set_wedged(gt);
err = -ETIME;
}
diff --git a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
index 07eaf71955c4..3a0a7580ab58 100644
--- a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
@@ -5,6 +5,8 @@
#include <linux/sort.h>
+#include <drm/drm_print.h>
+
#include "intel_engine_regs.h"
#include "intel_gt_clock_utils.h"
@@ -85,7 +87,7 @@ static int live_gt_clocks(void *arg)
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 +111,21 @@ 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(&engine->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(&engine->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(&engine->i915->drm, "%s: walltime did not match CS ticks!\n",
+ engine->name);
err = -EINVAL;
break;
}
@@ -146,7 +149,7 @@ 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 +160,7 @@ 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 +168,7 @@ static int live_gt_resume(void *arg)
err = st_llc_verify(>->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;
}
diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index 5b986a7687d9..3df6e231a698 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -5,6 +5,8 @@
#include <linux/sort.h>
+#include <drm/drm_print.h>
+
#include "gem/i915_gem_internal.h"
#include "gem/i915_gem_lmem.h"
@@ -92,7 +94,7 @@ static int copy(struct intel_migrate *migrate,
continue;
if (err != -EDEADLK && err != -EINTR && err != -ERESTARTSYS)
- pr_err("%ps failed, size: %u\n", fn, sz);
+ drm_err(&i915->drm, "%ps failed, size: %u\n", fn, sz);
if (rq) {
i915_request_wait(rq, 0, HZ);
i915_request_put(rq);
@@ -106,7 +108,7 @@ static int copy(struct intel_migrate *migrate,
if (rq) {
if (i915_request_wait(rq, 0, HZ) < 0) {
- pr_err("%ps timed out, size: %u\n", fn, sz);
+ drm_err(&i915->drm, "%ps timed out, size: %u\n", fn, sz);
err = -ETIME;
}
i915_request_put(rq);
@@ -116,8 +118,8 @@ static int copy(struct intel_migrate *migrate,
int x = i * 1024 + i915_prandom_u32_max_state(1024, prng);
if (vaddr[x] != x) {
- pr_err("%ps failed, size: %u, offset: %zu\n",
- fn, sz, x * sizeof(u32));
+ drm_err(&i915->drm, "%ps failed, size: %u, offset: %zu\n",
+ fn, sz, x * sizeof(u32));
igt_hexdump(vaddr + i * 1024, 4096);
err = -EINVAL;
}
@@ -304,8 +306,7 @@ static int clear(struct intel_migrate *migrate,
true, &rq);
if (rq && !err) {
if (i915_request_wait(rq, 0, HZ) < 0) {
- pr_err("%ps timed out, size: %u\n",
- fn, sz);
+ drm_err(&i915->drm, "%ps timed out, size: %u\n", fn, sz);
err = -ETIME;
}
i915_request_put(rq);
@@ -318,7 +319,7 @@ static int clear(struct intel_migrate *migrate,
err = fn(migrate, &ww, obj, val, &rq);
if (rq && !err) {
if (i915_request_wait(rq, 0, HZ) < 0) {
- pr_err("%ps timed out, size: %u\n", fn, sz);
+ drm_err(&i915->drm, "%ps timed out, size: %u\n", fn, sz);
err = -ETIME;
}
i915_request_put(rq);
@@ -335,8 +336,8 @@ static int clear(struct intel_migrate *migrate,
i915_prandom_u32_max_state(1024, prng);
if (vaddr[x] != val) {
- pr_err("%ps failed, (%u != %u), offset: %zu\n",
- fn, vaddr[x], val, x * sizeof(u32));
+ drm_err(&i915->drm, "%ps failed, (%u != %u), offset: %zu\n",
+ fn, vaddr[x], val, x * sizeof(u32));
igt_hexdump(vaddr + i * 1024, 4096);
err = -EINVAL;
}
@@ -355,8 +356,7 @@ static int clear(struct intel_migrate *migrate,
false, &rq);
if (rq && !err) {
if (i915_request_wait(rq, 0, HZ) < 0) {
- pr_err("%ps timed out, size: %u\n",
- fn, sz);
+ drm_err(&i915->drm, "%ps timed out, size: %u\n", fn, sz);
err = -ETIME;
}
i915_request_put(rq);
@@ -377,8 +377,9 @@ static int clear(struct intel_migrate *migrate,
ccs_bytes_left), prng);
if (vaddr[offset + x]) {
- pr_err("%ps ccs clearing failed, offset: %ld/%d\n",
- fn, i * PAGE_SIZE + x * sizeof(u32), ccs_bytes);
+ drm_err(&i915->drm,
+ "%ps ccs clearing failed, offset: %ld/%d\n",
+ fn, i * PAGE_SIZE + x * sizeof(u32), ccs_bytes);
igt_hexdump(vaddr + offset,
min_t(int, 4096,
ccs_bytes_left * sizeof(u32)));
@@ -394,7 +395,7 @@ static int clear(struct intel_migrate *migrate,
if (err) {
if (err != -EDEADLK && err != -EINTR && err != -ERESTARTSYS)
- pr_err("%ps failed, size: %u\n", fn, sz);
+ drm_err(&i915->drm, "%ps failed, size: %u\n", fn, sz);
if (rq && err != -EINVAL) {
i915_request_wait(rq, 0, HZ);
i915_request_put(rq);
@@ -540,7 +541,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");
}
static int live_emit_pte_full_ring(void *arg)
@@ -633,7 +634,7 @@ static int live_emit_pte_full_ring(void *arg)
cs += sz;
intel_ring_advance(rq, cs);
- pr_info("%s emit=%u sz=%d\n", __func__, rq->ring->emit, sz);
+ drm_info(&i915->drm, "%s emit=%u sz=%d\n", __func__, rq->ring->emit, sz);
prev = rq;
} while (rq->ring->space > (rq->reserved_space +
@@ -646,7 +647,7 @@ static int live_emit_pte_full_ring(void *arg)
* This should wait for the spinner to be killed, otherwise we should go
* down in flames when doing i915_request_add().
*/
- pr_info("%s emite_pte ring space=%u\n", __func__, rq->ring->space);
+ drm_info(&i915->drm, "%s emite_pte ring space=%u\n", __func__, rq->ring->space);
it = sg_sgt(obj->mm.pages->sgl);
len = emit_pte(rq, &it, obj->pat_index, false, 0, CHUNK_SZ);
if (!len) {
@@ -880,11 +881,9 @@ static int __perf_clear_blt(struct intel_context *ce,
return err;
sort(t, ARRAY_SIZE(t), sizeof(*t), wrap_ktime_compare, NULL);
- pr_info("%s: %zd KiB fill: %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 fill: %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);
return 0;
}
@@ -963,11 +962,9 @@ static int __perf_copy_blt(struct intel_context *ce,
return err;
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", 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;
}
diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt/selftest_mocs.c
index d73e438fb85f..770516c6c7da 100644
--- a/drivers/gpu/drm/i915/gt/selftest_mocs.c
+++ b/drivers/gpu/drm/i915/gt/selftest_mocs.c
@@ -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;
diff --git a/drivers/gpu/drm/i915/gt/selftest_reset.c b/drivers/gpu/drm/i915/gt/selftest_reset.c
index 2cfc23c58e90..4744f08692c5 100644
--- a/drivers/gpu/drm/i915/gt/selftest_reset.c
+++ b/drivers/gpu/drm/i915/gt/selftest_reset.c
@@ -14,6 +14,8 @@
#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,
@@ -147,8 +149,9 @@ __igt_reset_stolen(struct intel_gt *gt,
!__drm_mm_interval_first(>->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 +163,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 +228,7 @@ static int igt_global_reset(void *arg)
intel_gt_reset(gt, ALL_ENGINES, NULL);
if (i915_reset_count(>->i915->gpu_error) == reset_count) {
- pr_err("No GPU reset recorded!\n");
+ drm_err(>->i915->drm, "No GPU reset recorded!\n");
err = -EINVAL;
}
@@ -287,7 +292,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(>->i915->drm,
+ "__intel_gt_reset failed under %s\n", p->name);
break;
}
}
@@ -347,8 +353,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;
}
}
diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
index c3c918248989..543aeef4fa35 100644
--- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
@@ -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,21 @@ 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(>->i915->drm, "Could not set min frequency to [%u]\n", freq);
else /* Delay to ensure h2g completes */
delay_for_h2g();
@@ -38,12 +50,12 @@ 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)
{
+ 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(>->i915->drm, "Could not set maximum frequency [%u]\n", freq);
else /* Delay to ensure h2g completes */
delay_for_h2g();
@@ -57,13 +69,13 @@ static int slpc_set_freq(struct intel_gt *gt, u32 freq)
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");
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;
}
@@ -72,23 +84,24 @@ static int slpc_set_freq(struct intel_gt *gt, u32 freq)
static int slpc_restore_freq(struct intel_guc_slpc *slpc, u32 min, u32 max)
{
+ struct intel_gt *gt = selftest_slpc_to_gt(slpc);
int err;
err = slpc_set_max_freq(slpc, max);
if (err) {
- pr_err("Unable to restore max freq");
+ drm_err(>->i915->drm, "Unable to restore max freq");
return err;
}
err = slpc_set_min_freq(slpc, min);
if (err) {
- pr_err("Unable to restore min freq");
+ drm_err(>->i915->drm, "Unable to restore min freq");
return err;
}
err = intel_guc_slpc_set_ignore_eff_freq(slpc, false);
if (err) {
- pr_err("Unable to restore efficient freq");
+ drm_err(>->i915->drm, "Unable to restore efficient freq");
return err;
}
@@ -143,8 +156,8 @@ static int vary_max_freq(struct intel_guc_slpc *slpc, struct intel_rps *rps,
/* GuC requests freq in multiples of 50/3 MHz */
if (req_freq > (max_freq + FREQUENCY_REQ_UNIT)) {
- pr_err("SWReq is %d, should be at most %d\n", req_freq,
- max_freq + FREQUENCY_REQ_UNIT);
+ drm_err(&rps_to_i915(rps)->drm, "SWReq is %d, should be at most %d\n",
+ req_freq, max_freq + FREQUENCY_REQ_UNIT);
err = -EINVAL;
}
@@ -179,8 +192,8 @@ static int vary_min_freq(struct intel_guc_slpc *slpc, struct intel_rps *rps,
/* GuC requests freq in multiples of 50/3 MHz */
if (req_freq < (min_freq - FREQUENCY_REQ_UNIT)) {
- pr_err("SWReq is %d, should be at least %d\n", req_freq,
- min_freq - FREQUENCY_REQ_UNIT);
+ drm_err(&rps_to_i915(rps)->drm, "SWReq is %d, should be at least %d\n",
+ req_freq, min_freq - FREQUENCY_REQ_UNIT);
err = -EINVAL;
}
@@ -224,19 +237,19 @@ static int slpc_power(struct intel_gt *gt, struct intel_engine_cs *engine)
if (err)
return err;
- pr_info("%s: min:%llumW @ %uMHz, max:%llumW @ %uMHz\n",
- engine->name,
- min.power, min.freq,
- max.power, max.freq);
+ drm_info(&engine->i915->drm, "%s: min:%llumW @ %uMHz, max:%llumW @ %uMHz\n",
+ engine->name, min.power, min.freq, max.power, max.freq);
if (10 * min.freq >= 9 * max.freq) {
- pr_notice("Could not control frequency, ran at [%uMHz, %uMhz]\n",
- min.freq, max.freq);
+ drm_notice(&engine->i915->drm,
+ "Could not control frequency, ran at [%uMHz, %uMhz]\n",
+ min.freq, max.freq);
}
if (11 * min.power > 10 * max.power) {
- pr_err("%s: did not conserve power when setting lower frequency!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: did not conserve power when setting lower frequency!\n",
+ engine->name);
err = -EINVAL;
}
@@ -265,10 +278,11 @@ static int max_granted_freq(struct intel_guc_slpc *slpc, struct intel_rps *rps,
/* If not, this is an error */
if (!(perf_limit_reasons & GT0_PERF_LIMIT_REASONS_MASK)) {
- pr_err("Pcode did not grant max freq\n");
+ drm_err(>->i915->drm, "Pcode did not grant max freq\n");
err = -EINVAL;
} else {
- pr_info("Pcode throttled frequency 0x%x\n", perf_limit_reasons);
+ drm_info(>->i915->drm, "Pcode throttled frequency 0x%x\n",
+ perf_limit_reasons);
}
}
@@ -290,7 +304,7 @@ static int run_test(struct intel_gt *gt, int test_type)
return 0;
if (slpc->min_freq == slpc->rp0_freq) {
- pr_err("Min/Max are fused to the same value\n");
+ drm_err(>->i915->drm, "Min/Max are fused to the same value\n");
return -EINVAL;
}
@@ -298,12 +312,12 @@ static int run_test(struct intel_gt *gt, int test_type)
return -ENOMEM;
if (intel_guc_slpc_get_max_freq(slpc, &slpc_max_freq)) {
- pr_err("Could not get SLPC max freq\n");
+ drm_err(>->i915->drm, "Could not get SLPC max freq\n");
return -EIO;
}
if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq)) {
- pr_err("Could not get SLPC min freq\n");
+ drm_err(>->i915->drm, "Could not get SLPC min freq\n");
return -EIO;
}
@@ -313,7 +327,7 @@ static int run_test(struct intel_gt *gt, int test_type)
*/
err = slpc_set_min_freq(slpc, slpc->min_freq);
if (err) {
- pr_err("Unable to update min freq!");
+ drm_err(>->i915->drm, "Unable to update min freq!");
return err;
}
@@ -322,7 +336,7 @@ static int run_test(struct intel_gt *gt, int test_type)
*/
err = intel_guc_slpc_set_ignore_eff_freq(slpc, true);
if (err) {
- pr_err("Unable to turn off efficient freq!");
+ drm_err(>->i915->drm, "Unable to turn off efficient freq!");
return err;
}
@@ -349,8 +363,7 @@ static int run_test(struct intel_gt *gt, int test_type)
i915_request_add(rq);
if (!igt_wait_for_spinner(&spin, rq)) {
- pr_err("%s: Spinner did not start\n",
- engine->name);
+ drm_err(&engine->i915->drm, "%s: Spinner did not start\n", engine->name);
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
intel_gt_set_wedged(engine->gt);
@@ -387,15 +400,16 @@ static int run_test(struct intel_gt *gt, int test_type)
}
if (test_type != SLPC_POWER) {
- pr_info("Max actual frequency for %s was %d\n",
- engine->name, max_act_freq);
+ drm_info(&engine->i915->drm, "%s: Max actual frequency was %d\n",
+ engine->name, max_act_freq);
/* Actual frequency should rise above min */
if (max_act_freq <= slpc->min_freq) {
- pr_err("Actual freq did not rise above min\n");
- pr_err("Perf Limit Reasons: 0x%x\n",
- intel_uncore_read(gt->uncore,
- intel_gt_perf_limit_reasons_reg(gt)));
+ drm_err(&engine->i915->drm,
+ "Actual freq did not rise above min\n");
+ drm_err(&engine->i915->drm, "Perf Limit Reasons: 0x%x\n",
+ intel_uncore_read(gt->uncore,
+ intel_gt_perf_limit_reasons_reg(gt)));
err = -EINVAL;
}
}
@@ -525,7 +539,7 @@ static int live_slpc_tile_interaction(void *arg)
kthread_flush_work(&threads[i].work);
status = READ_ONCE(threads[i].result);
if (status && !ret) {
- pr_err("%s GT %d failed ", __func__, gt->info.id);
+ drm_err(>->i915->drm, "%s GT %d failed ", __func__, gt->info.id);
ret = status;
}
kthread_destroy_worker(threads[i].worker);
diff --git a/drivers/gpu/drm/i915/gt/selftest_tlb.c b/drivers/gpu/drm/i915/gt/selftest_tlb.c
index a5184f09d1de..dd5054e99582 100644
--- a/drivers/gpu/drm/i915/gt/selftest_tlb.c
+++ b/drivers/gpu/drm/i915/gt/selftest_tlb.c
@@ -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));
@@ -68,7 +70,7 @@ 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(&ce->engine->i915->drm, "Cannot pin at %llx+%llx\n", addr, va->size);
goto out;
}
GEM_BUG_ON(i915_vma_offset(va) != addr);
@@ -91,11 +93,11 @@ 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(&ce->engine->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 +149,11 @@ 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(&ce->engine->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 +174,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(&ce->engine->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(&ce->engine->i915->drm, "Spinner ended unexpectedly\n");
err = -EIO;
}
i915_request_put(rq);
@@ -271,8 +275,8 @@ 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(>->i915->drm,
+ "Failed to allocate contiguous pages for size %zx\n", A->base.size);
ppgtt = i915_ppgtt_create(gt, 0);
if (IS_ERR(ppgtt)) {
diff --git a/drivers/gpu/drm/i915/gt/selftest_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
index 4e4c420ae67f..4c96b143f09b 100644
--- a/drivers/gpu/drm/i915/gt/selftest_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
@@ -16,6 +16,8 @@
#include "selftests/intel_scheduler_helpers.h"
#include "selftests/mock_drm.h"
+#include <drm/drm_print.h>
+
#include "gem/selftests/igt_gem_utils.h"
#include "gem/selftests/mock_context.h"
@@ -193,8 +195,9 @@ print_results(const struct intel_engine_cs *engine, const u32 *results)
u32 expected = get_whitelist_reg(engine, i);
u32 actual = results[i];
- pr_info("RING_NONPRIV[%d]: expected 0x%08x, found 0x%08x\n",
- i, expected, actual);
+ drm_info(&engine->i915->drm,
+ "RING_NONPRIV[%d]: expected 0x%08x, found 0x%08x\n",
+ i, expected, actual);
}
}
@@ -233,8 +236,9 @@ static int check_whitelist(struct intel_context *ce)
if (expected != actual) {
print_results(engine, vaddr);
- pr_err("Invalid RING_NONPRIV[%d], expected 0x%08x, found 0x%08x\n",
- i, expected, actual);
+ drm_err(&engine->i915->drm,
+ "Invalid RING_NONPRIV[%d], expected 0x%08x, found 0x%08x\n",
+ i, expected, actual);
err = -EINVAL;
break;
@@ -304,8 +308,9 @@ static int check_whitelist_across_reset(struct intel_engine_cs *engine,
intel_wakeref_t wakeref;
int err;
- pr_info("Checking %d whitelisted registers on %s (RING_NONPRIV) [%s]\n",
- engine->whitelist.count, engine->name, name);
+ drm_info(&engine->i915->drm,
+ "Checking %d whitelisted registers on %s (RING_NONPRIV) [%s]\n",
+ engine->whitelist.count, engine->name, name);
ce = intel_context_create(engine);
if (IS_ERR(ce))
@@ -317,7 +322,7 @@ static int check_whitelist_across_reset(struct intel_engine_cs *engine,
err = check_whitelist(ce);
if (err) {
- pr_err("Invalid whitelist *before* %s reset!\n", name);
+ drm_err(&engine->i915->drm, "Invalid whitelist *before* %s reset!\n", name);
goto out_spin;
}
@@ -327,7 +332,7 @@ static int check_whitelist_across_reset(struct intel_engine_cs *engine,
/* Ensure the spinner hasn't aborted */
if (i915_request_completed(rq)) {
- pr_err("%s spinner failed to start\n", name);
+ drm_err(&engine->i915->drm, "%s spinner failed to start\n", name);
err = -ETIMEDOUT;
goto out_spin;
}
@@ -342,14 +347,14 @@ static int check_whitelist_across_reset(struct intel_engine_cs *engine,
igt_spinner_end(&spin);
if (err) {
- pr_err("%s reset failed\n", name);
+ drm_err(&engine->i915->drm, "%s reset failed\n", name);
goto out_spin;
}
err = check_whitelist(ce);
if (err) {
- pr_err("Whitelist not preserved in context across %s reset!\n",
- name);
+ drm_err(&engine->i915->drm,
+ "Whitelist not preserved in context across %s reset!\n", name);
goto out_spin;
}
@@ -363,8 +368,8 @@ static int check_whitelist_across_reset(struct intel_engine_cs *engine,
err = check_whitelist(ce);
if (err) {
- pr_err("Invalid whitelist *after* %s reset in fresh context!\n",
- name);
+ drm_err(&engine->i915->drm,
+ "Invalid whitelist *after* %s reset in fresh context!\n", name);
goto out_spin;
}
@@ -565,8 +570,7 @@ static int check_dirty_whitelist(struct intel_context *ce)
if (GRAPHICS_VER(engine->i915) >= 8)
lrm++, srm++;
- pr_debug("%s: Writing garbage to %x\n",
- engine->name, reg);
+ drm_dbg(&engine->i915->drm, "%s: Writing garbage to %x\n", engine->name, reg);
/* SRM original */
*cs++ = srm;
@@ -646,8 +650,8 @@ static int check_dirty_whitelist(struct intel_context *ce)
err_request:
err = request_add_sync(rq, err);
if (err) {
- pr_err("%s: Futzing %x timedout; cancelling test\n",
- engine->name, reg);
+ drm_err(&engine->i915->drm, "%s: Futzing %x timedout; cancelling test\n",
+ engine->name, reg);
intel_gt_set_wedged(engine->gt);
goto out_unmap_scratch;
}
@@ -657,8 +661,9 @@ static int check_dirty_whitelist(struct intel_context *ce)
/* detect write masking */
rsvd = results[ARRAY_SIZE(values)];
if (!rsvd) {
- pr_err("%s: Unable to write to whitelisted register %x\n",
- engine->name, reg);
+ drm_err(&engine->i915->drm,
+ "%s: Unable to write to whitelisted register %x\n",
+ engine->name, reg);
err = -EINVAL;
goto out_unmap_scratch;
}
@@ -689,15 +694,18 @@ static int check_dirty_whitelist(struct intel_context *ce)
idx++;
}
if (err) {
- pr_err("%s: %d mismatch between values written to whitelisted register [%x], and values read back!\n",
- engine->name, err, reg);
+ drm_err(&engine->i915->drm,
+ "%s: %d mismatch between values written to whitelisted register [%x], and values read back!\n",
+ engine->name, err, reg);
if (ro_reg)
- pr_info("%s: Whitelisted read-only register: %x, original value %08x\n",
- engine->name, reg, results[0]);
+ drm_info(&engine->i915->drm,
+ "%s: Whitelisted read-only register: %x, original value %08x\n",
+ engine->name, reg, results[0]);
else
- pr_info("%s: Whitelisted register: %x, original value %08x, rsvd %08x\n",
- engine->name, reg, results[0], rsvd);
+ drm_info(&engine->i915->drm,
+ "%s: Whitelisted register: %x, original value %08x, rsvd %08x\n",
+ engine->name, reg, results[0], rsvd);
expect = results[0];
idx = 1;
@@ -708,8 +716,9 @@ static int check_dirty_whitelist(struct intel_context *ce)
expect = results[0];
else
expect = reg_write(expect, w, rsvd);
- pr_info("Wrote %08x, read %08x, expect %08x\n",
- w, results[idx], expect);
+ drm_info(&engine->i915->drm,
+ "Wrote %08x, read %08x, expect %08x\n",
+ w, results[idx], expect);
idx++;
}
for (v = 0; v < ARRAY_SIZE(values); v++) {
@@ -719,8 +728,9 @@ static int check_dirty_whitelist(struct intel_context *ce)
expect = results[0];
else
expect = reg_write(expect, w, rsvd);
- pr_info("Wrote %08x, read %08x, expect %08x\n",
- w, results[idx], expect);
+ drm_info(&engine->i915->drm,
+ "Wrote %08x, read %08x, expect %08x\n",
+ w, results[idx], expect);
idx++;
}
@@ -985,8 +995,9 @@ static bool result_eq(struct intel_engine_cs *engine,
u32 a, u32 b, i915_reg_t reg)
{
if (a != b && !pardon_reg(engine->i915, reg)) {
- pr_err("Whitelisted register 0x%4x not context saved: A=%08x, B=%08x\n",
- i915_mmio_reg_offset(reg), a, b);
+ drm_err(&engine->i915->drm,
+ "Whitelisted register 0x%4x not context saved: A=%08x, B=%08x\n",
+ i915_mmio_reg_offset(reg), a, b);
return false;
}
@@ -1007,8 +1018,9 @@ static bool result_neq(struct intel_engine_cs *engine,
u32 a, u32 b, i915_reg_t reg)
{
if (a == b && !writeonly_reg(engine->i915, reg)) {
- pr_err("Whitelist register 0x%4x:%08x was unwritable\n",
- i915_mmio_reg_offset(reg), a);
+ drm_err(&engine->i915->drm,
+ "Whitelist register 0x%4x:%08x was unwritable\n",
+ i915_mmio_reg_offset(reg), a);
return false;
}
@@ -1211,7 +1223,7 @@ live_gpu_reset_workarounds(void *arg)
if (!lists)
return -ENOMEM;
- pr_info("Verifying after GPU reset...\n");
+ drm_info(>->i915->drm, "Verifying after GPU reset...\n");
igt_global_reset_lock(gt);
wakeref = intel_runtime_pm_get(gt->uncore->rpm);
@@ -1266,7 +1278,7 @@ live_engine_reset_workarounds(void *arg)
bool ok;
int ret2;
- pr_info("Verifying after %s reset...\n", engine->name);
+ drm_info(&engine->i915->drm, "Verifying after %s reset...\n", engine->name);
ret = intel_selftest_modify_policy(engine, &saved,
SELFTEST_SCHEDULER_MODIFY_FAST_RESET);
if (ret)
@@ -1287,7 +1299,8 @@ live_engine_reset_workarounds(void *arg)
ret = intel_engine_reset(engine, "live_workarounds:idle");
if (ret) {
- pr_err("%s: Reset failed while idle\n", engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Reset failed while idle\n", engine->name);
goto err;
}
@@ -1311,7 +1324,7 @@ live_engine_reset_workarounds(void *arg)
ret = request_add_spin(rq, &spin);
if (ret) {
- pr_err("%s: Spinner failed to start\n", engine->name);
+ drm_err(&engine->i915->drm, "%s: Spinner failed to start\n", engine->name);
igt_spinner_fini(&spin);
goto err;
}
@@ -1325,8 +1338,8 @@ live_engine_reset_workarounds(void *arg)
if (!using_guc) {
ret = intel_engine_reset(engine, "live_workarounds:active");
if (ret) {
- pr_err("%s: Reset failed on an active spinner\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: Reset failed on an active spinner\n", engine->name);
igt_spinner_fini(&spin);
goto err;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 6/8] drm/i915/gt/selftests: Use drm_* prints in gt standalone tests
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
` (4 preceding siblings ...)
2026-08-18 9:56 ` [PATCH v2 5/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 7/8] drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers Krzysztof Karas
` (2 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
drivers/gpu/drm/i915/gt/selftest_rc6.c | 55 +++---
drivers/gpu/drm/i915/gt/selftest_rps.c | 252 +++++++++++++------------
2 files changed, 164 insertions(+), 143 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.c b/drivers/gpu/drm/i915/gt/selftest_rc6.c
index 90f30b988d68..c46a95fa4ed9 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rc6.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rc6.c
@@ -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;
@@ -80,8 +82,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 +95,12 @@ int live_rc6_manual(void *arg)
if (!rc0_power) {
if (rc0_freq)
- pr_debug("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 +119,36 @@ 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;
}
@@ -265,13 +274,13 @@ 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(&engine->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(&engine->i915->drm,
+ "%s: GPU reset required\n", engine->name);
add_taint_for_CI(gt->i915, TAINT_WARN);
err = -EIO;
goto out;
diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c b/drivers/gpu/drm/i915/gt/selftest_rps.c
index be77fba2ec49..27435560c64b 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rps.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rps.c
@@ -6,6 +6,8 @@
#include <linux/pm_qos.h>
#include <linux/sort.h>
+#include <drm/drm_print.h>
+
#include "gem/i915_gem_internal.h"
#include "i915_reg.h"
@@ -204,15 +206,15 @@ static void show_pstate_limits(struct intel_rps *rps)
struct drm_i915_private *i915 = rps_to_i915(rps);
if (IS_BROXTON(i915)) {
- pr_info("P_STATE_CAP[%x]: 0x%08x\n",
- i915_mmio_reg_offset(BXT_RP_STATE_CAP),
- intel_uncore_read(rps_to_uncore(rps),
- BXT_RP_STATE_CAP));
+ drm_info(&i915->drm, "P_STATE_CAP[%x]: 0x%08x\n",
+ i915_mmio_reg_offset(BXT_RP_STATE_CAP),
+ intel_uncore_read(rps_to_uncore(rps),
+ BXT_RP_STATE_CAP));
} else if (GRAPHICS_VER(i915) == 9) {
- pr_info("P_STATE_LIMITS[%x]: 0x%08x\n",
- i915_mmio_reg_offset(GEN9_RP_STATE_LIMITS),
- intel_uncore_read(rps_to_uncore(rps),
- GEN9_RP_STATE_LIMITS));
+ drm_info(&i915->drm, "P_STATE_LIMITS[%x]: 0x%08x\n",
+ i915_mmio_reg_offset(GEN9_RP_STATE_LIMITS),
+ intel_uncore_read(rps_to_uncore(rps),
+ GEN9_RP_STATE_LIMITS));
}
}
@@ -264,8 +266,8 @@ int live_rps_clock_interval(void *arg)
i915_request_add(rq);
if (!igt_wait_for_spinner(&spin, rq)) {
- pr_err("%s: RPS spinner did not start\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS spinner did not start\n", engine->name);
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
intel_gt_set_wedged(engine->gt);
@@ -290,8 +292,9 @@ int live_rps_clock_interval(void *arg)
GEN6_RP_CUR_UP_EI),
10)) {
/* Just skip the test; assume lack of HW support */
- pr_notice("%s: rps evaluation interval not ticking\n",
- engine->name);
+ drm_notice(&engine->i915->drm,
+ "%s: rps evaluation interval not ticking\n",
+ engine->name);
err = -ENODEV;
} else {
ktime_t dt_[5];
@@ -330,21 +333,24 @@ int live_rps_clock_interval(void *arg)
u32 expected =
intel_gt_ns_to_pm_interval(gt, dt);
- pr_info("%s: rps counted %d C0 cycles [%lldns] in %lldns [%d cycles], using GT clock frequency of %uKHz\n",
- engine->name, cycles, time, dt, expected,
- gt->clock_frequency / 1000);
+ drm_info(&engine->i915->drm,
+ "%s: rps counted %d C0 cycles [%lldns] in %lldns [%d cycles], using GT clock frequency of %uKHz\n",
+ engine->name, cycles, time, dt, expected,
+ gt->clock_frequency / 1000);
if (10 * time < 8 * dt ||
8 * time > 10 * dt) {
- pr_err("%s: rps clock time does not match walltime!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: rps clock time does not match walltime!\n",
+ engine->name);
err = -EINVAL;
}
if (10 * expected < 8 * cycles ||
8 * expected > 10 * cycles) {
- pr_err("%s: walltime does not match rps clock ticks!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: walltime does not match rps clock ticks!\n",
+ engine->name);
err = -EINVAL;
}
}
@@ -424,8 +430,8 @@ int live_rps_control(void *arg)
i915_request_add(rq);
if (!igt_wait_for_spinner(&spin, rq)) {
- pr_err("%s: RPS spinner did not start\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS spinner did not start\n", engine->name);
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
intel_gt_set_wedged(engine->gt);
@@ -434,8 +440,9 @@ int live_rps_control(void *arg)
}
if (rps_set_check(rps, rps->min_freq) != rps->min_freq) {
- pr_err("%s: could not set minimum frequency [%x], only %x!\n",
- engine->name, rps->min_freq, read_cagf(rps));
+ drm_err(&engine->i915->drm,
+ "%s: could not set minimum frequency [%x], only %x!\n",
+ engine->name, rps->min_freq, read_cagf(rps));
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
show_pstate_limits(rps);
@@ -451,8 +458,9 @@ int live_rps_control(void *arg)
limit = rps_set_check(rps, f);
if (rps_set_check(rps, rps->min_freq) != rps->min_freq) {
- pr_err("%s: could not restore minimum frequency [%x], only %x!\n",
- engine->name, rps->min_freq, read_cagf(rps));
+ drm_err(&engine->i915->drm,
+ "%s: could not restore minimum frequency [%x], only %x!\n",
+ engine->name, rps->min_freq, read_cagf(rps));
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
show_pstate_limits(rps);
@@ -474,7 +482,8 @@ int live_rps_control(void *arg)
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
- pr_info("%s: range:[%x:%uMHz, %x:%uMHz] limit:[%x:%uMHz], %x:%x response %lluns:%lluns\n",
+ drm_info(&engine->i915->drm,
+ "%s: range:[%x:%uMHz, %x:%uMHz] limit:[%x:%uMHz], %x:%x response %lluns:%lluns\n",
engine->name,
rps->min_freq, intel_gpu_freq(rps, rps->min_freq),
rps->max_freq, intel_gpu_freq(rps, rps->max_freq),
@@ -483,8 +492,9 @@ int live_rps_control(void *arg)
if (limit != rps->max_freq) {
if (throttle)
- pr_warn("%s: GPU throttled with reasons 0x%08x\n",
- engine->name, throttle);
+ drm_warn(&engine->i915->drm,
+ "%s: GPU throttled with reasons 0x%08x\n",
+ engine->name, throttle);
show_pstate_limits(rps);
}
@@ -523,17 +533,16 @@ static void show_pcu_config(struct intel_rps *rps)
wakeref = intel_runtime_pm_get(rps_to_uncore(rps)->rpm);
- pr_info("%5s %5s %5s\n", "GPU", "eCPU", "eRing");
+ drm_info(&i915->drm, "%5s %5s %5s\n", "GPU", "eCPU", "eRing");
for (gpu_freq = min_gpu_freq; gpu_freq <= max_gpu_freq; gpu_freq++) {
int ia_freq = gpu_freq;
snb_pcode_read(rps_to_gt(rps)->uncore, GEN6_PCODE_READ_MIN_FREQ_TABLE,
&ia_freq, NULL);
- pr_info("%5d %5d %5d\n",
- gpu_freq * 50,
- ((ia_freq >> 0) & 0xff) * 100,
- ((ia_freq >> 8) & 0xff) * 100);
+ drm_info(&i915->drm, "%5d %5d %5d\n", gpu_freq * 50,
+ ((ia_freq >> 0) & 0xff) * 100,
+ ((ia_freq >> 8) & 0xff) * 100);
}
intel_runtime_pm_put(rps_to_uncore(rps)->rpm, wakeref);
@@ -669,8 +678,8 @@ int live_rps_frequency_cs(void *arg)
if (wait_for(intel_uncore_read(engine->uncore, CS_GPR(0)),
10)) {
- pr_err("%s: timed loop did not start\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: timed loop did not start\n", engine->name);
goto err_vma;
}
@@ -680,22 +689,21 @@ int live_rps_frequency_cs(void *arg)
max.freq = rps->max_freq;
max.count = measure_cs_frequency_at(rps, engine, &max.freq);
- pr_info("%s: min:%lluKHz @ %uMHz, max:%lluKHz @ %uMHz [%d%%]\n",
- engine->name,
- min.count, intel_gpu_freq(rps, min.freq),
- max.count, intel_gpu_freq(rps, max.freq),
- (int)DIV64_U64_ROUND_CLOSEST(100 * min.freq * max.count,
- max.freq * min.count));
+ drm_info(&engine->i915->drm,
+ "%s: min:%lluKHz @ %uMHz, max:%lluKHz @ %uMHz [%d%%]\n", engine->name,
+ min.count, intel_gpu_freq(rps, min.freq),
+ max.count, intel_gpu_freq(rps, max.freq),
+ (int)DIV64_U64_ROUND_CLOSEST(100 * min.freq * max.count,
+ max.freq * min.count));
if (!scaled_within(max.freq * min.count,
min.freq * max.count,
2, 3)) {
int f;
- pr_err("%s: CS did not scale with frequency! scaled min:%llu, max:%llu\n",
- engine->name,
- max.freq * min.count,
- min.freq * max.count);
+ drm_err(&engine->i915->drm,
+ "%s: CS did not scale with frequency! scaled min:%llu, max:%llu\n",
+ engine->name, max.freq * min.count, min.freq * max.count);
show_pcu_config(rps);
for (f = min.freq + 1; f <= rps->max_freq; f++) {
@@ -706,11 +714,10 @@ int live_rps_frequency_cs(void *arg)
if (act < f)
break;
- pr_info("%s: %x:%uMHz: %lluKHz [%d%%]\n",
- engine->name,
- act, intel_gpu_freq(rps, act), count,
- (int)DIV64_U64_ROUND_CLOSEST(100 * min.freq * count,
- act * min.count));
+ drm_info(&engine->i915->drm, "%s: %x:%uMHz: %lluKHz [%d%%]\n",
+ engine->name, act, intel_gpu_freq(rps, act), count,
+ (int)DIV64_U64_ROUND_CLOSEST(100 * min.freq * count,
+ act * min.count));
f = act; /* may skip ahead [pcu granularity] */
}
@@ -807,8 +814,8 @@ int live_rps_frequency_srm(void *arg)
goto err_vma;
if (wait_for(READ_ONCE(*cntr), 10)) {
- pr_err("%s: timed loop did not start\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: timed loop did not start\n", engine->name);
goto err_vma;
}
@@ -818,7 +825,8 @@ int live_rps_frequency_srm(void *arg)
max.freq = rps->max_freq;
max.count = measure_frequency_at(rps, cntr, &max.freq);
- pr_info("%s: min:%lluKHz @ %uMHz, max:%lluKHz @ %uMHz [%d%%]\n",
+ drm_info(&engine->i915->drm,
+ "%s: min:%lluKHz @ %uMHz, max:%lluKHz @ %uMHz [%d%%]\n",
engine->name,
min.count, intel_gpu_freq(rps, min.freq),
max.count, intel_gpu_freq(rps, max.freq),
@@ -830,10 +838,9 @@ int live_rps_frequency_srm(void *arg)
1, 2)) {
int f;
- pr_err("%s: CS did not scale with frequency! scaled min:%llu, max:%llu\n",
- engine->name,
- max.freq * min.count,
- min.freq * max.count);
+ drm_err(&engine->i915->drm,
+ "%s: CS did not scale with frequency! scaled min:%llu, max:%llu\n",
+ engine->name, max.freq * min.count, min.freq * max.count);
show_pcu_config(rps);
for (f = min.freq + 1; f <= rps->max_freq; f++) {
@@ -844,11 +851,10 @@ int live_rps_frequency_srm(void *arg)
if (act < f)
break;
- pr_info("%s: %x:%uMHz: %lluKHz [%d%%]\n",
- engine->name,
- act, intel_gpu_freq(rps, act), count,
- (int)DIV64_U64_ROUND_CLOSEST(100 * min.freq * count,
- act * min.count));
+ drm_info(&engine->i915->drm, "%s: %x:%uMHz: %lluKHz [%d%%]\n",
+ engine->name, act, intel_gpu_freq(rps, act), count,
+ (int)DIV64_U64_ROUND_CLOSEST(100 * min.freq * count,
+ act * min.count));
f = act; /* may skip ahead [pcu granularity] */
}
@@ -915,31 +921,31 @@ static int __rps_up_interrupt(struct intel_rps *rps,
i915_request_add(rq);
if (!igt_wait_for_spinner(spin, rq)) {
- pr_err("%s: RPS spinner did not start\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS spinner did not start\n", engine->name);
i915_request_put(rq);
intel_gt_set_wedged(engine->gt);
return -EIO;
}
if (!intel_rps_is_active(rps)) {
- pr_err("%s: RPS not enabled on starting spinner\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS not enabled on starting spinner\n", engine->name);
igt_spinner_end(spin);
i915_request_put(rq);
return -EINVAL;
}
if (!(rps->pm_events & GEN6_PM_RP_UP_THRESHOLD)) {
- pr_err("%s: RPS did not register UP interrupt\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS did not register UP interrupt\n", engine->name);
i915_request_put(rq);
return -EINVAL;
}
if (rps->last_freq != rps->min_freq) {
- pr_err("%s: RPS did not program min frequency\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS did not program min frequency\n", engine->name);
i915_request_put(rq);
return -EINVAL;
}
@@ -955,17 +961,19 @@ static int __rps_up_interrupt(struct intel_rps *rps,
i915_request_put(rq);
if (rps->cur_freq != rps->min_freq) {
- pr_err("%s: Frequency unexpectedly changed [up], now %d!\n",
- engine->name, intel_rps_read_actual_frequency(rps));
+ drm_err(&engine->i915->drm,
+ "%s: Frequency unexpectedly changed [up], now %d!\n",
+ engine->name, intel_rps_read_actual_frequency(rps));
return -EINVAL;
}
if (!(rps->pm_iir & GEN6_PM_RP_UP_THRESHOLD)) {
- pr_err("%s: UP interrupt not recorded for spinner, pm_iir:%x, prev_up:%x, up_threshold:%x, up_ei:%x\n",
- engine->name, rps->pm_iir,
- intel_uncore_read(uncore, GEN6_RP_PREV_UP),
- intel_uncore_read(uncore, GEN6_RP_UP_THRESHOLD),
- intel_uncore_read(uncore, GEN6_RP_UP_EI));
+ drm_err(&engine->i915->drm,
+ "%s: UP interrupt not recorded for spinner, pm_iir:%x, prev_up:%x, up_threshold:%x, up_ei:%x\n",
+ engine->name, rps->pm_iir,
+ intel_uncore_read(uncore, GEN6_RP_PREV_UP),
+ intel_uncore_read(uncore, GEN6_RP_UP_THRESHOLD),
+ intel_uncore_read(uncore, GEN6_RP_UP_EI));
return -EINVAL;
}
@@ -981,14 +989,14 @@ static int __rps_down_interrupt(struct intel_rps *rps,
rps_set_check(rps, rps->max_freq);
if (!(rps->pm_events & GEN6_PM_RP_DOWN_THRESHOLD)) {
- pr_err("%s: RPS did not register DOWN interrupt\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS did not register DOWN interrupt\n", engine->name);
return -EINVAL;
}
if (rps->last_freq != rps->max_freq) {
- pr_err("%s: RPS did not program max frequency\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS did not program max frequency\n", engine->name);
return -EINVAL;
}
@@ -999,21 +1007,22 @@ static int __rps_down_interrupt(struct intel_rps *rps,
sleep_for_ei(rps, timeout);
if (rps->cur_freq != rps->max_freq) {
- pr_err("%s: Frequency unexpectedly changed [down], now %d!\n",
- engine->name,
- intel_rps_read_actual_frequency(rps));
+ drm_err(&engine->i915->drm,
+ "%s: Frequency unexpectedly changed [down], now %d!\n",
+ engine->name, intel_rps_read_actual_frequency(rps));
return -EINVAL;
}
if (!(rps->pm_iir & (GEN6_PM_RP_DOWN_THRESHOLD | GEN6_PM_RP_DOWN_TIMEOUT))) {
- pr_err("%s: DOWN interrupt not recorded for idle, pm_iir:%x, prev_down:%x, down_threshold:%x, down_ei:%x [prev_up:%x, up_threshold:%x, up_ei:%x]\n",
- engine->name, rps->pm_iir,
- intel_uncore_read(uncore, GEN6_RP_PREV_DOWN),
- intel_uncore_read(uncore, GEN6_RP_DOWN_THRESHOLD),
- intel_uncore_read(uncore, GEN6_RP_DOWN_EI),
- intel_uncore_read(uncore, GEN6_RP_PREV_UP),
- intel_uncore_read(uncore, GEN6_RP_UP_THRESHOLD),
- intel_uncore_read(uncore, GEN6_RP_UP_EI));
+ drm_err(&engine->i915->drm,
+ "%s: DOWN interrupt not recorded for idle, pm_iir:%x, prev_down:%x, down_threshold:%x, down_ei:%x [prev_up:%x, up_threshold:%x, up_ei:%x]\n",
+ engine->name, rps->pm_iir,
+ intel_uncore_read(uncore, GEN6_RP_PREV_DOWN),
+ intel_uncore_read(uncore, GEN6_RP_DOWN_THRESHOLD),
+ intel_uncore_read(uncore, GEN6_RP_DOWN_EI),
+ intel_uncore_read(uncore, GEN6_RP_PREV_UP),
+ intel_uncore_read(uncore, GEN6_RP_UP_THRESHOLD),
+ intel_uncore_read(uncore, GEN6_RP_UP_EI));
return -EINVAL;
}
@@ -1043,7 +1052,8 @@ int live_rps_interrupt(void *arg)
with_intel_gt_pm(gt, wakeref)
pm_events = rps->pm_events;
if (!pm_events) {
- pr_err("No RPS PM events registered, but RPS is enabled?\n");
+ drm_err(>->i915->drm,
+ "No RPS PM events registered, but RPS is enabled?\n");
return -ENODEV;
}
@@ -1186,8 +1196,8 @@ int live_rps_power(void *arg)
i915_request_add(rq);
if (!igt_wait_for_spinner(&spin, rq)) {
- pr_err("%s: RPS spinner did not start\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: RPS spinner did not start\n", engine->name);
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
intel_gt_set_wedged(engine->gt);
@@ -1207,29 +1217,32 @@ int live_rps_power(void *arg)
igt_spinner_end(&spin);
st_engine_heartbeat_enable(engine);
- pr_info("%s: min:%llumW @ %uMHz, max:%llumW @ %uMHz\n",
- engine->name,
- min.power, intel_gpu_freq(rps, min.freq),
- max.power, intel_gpu_freq(rps, max.freq));
+ drm_info(&engine->i915->drm, "%s: min:%llumW @ %uMHz, max:%llumW @ %uMHz\n",
+ engine->name, min.power, intel_gpu_freq(rps, min.freq),
+ max.power, intel_gpu_freq(rps, max.freq));
if (10 * min.freq >= 9 * max.freq) {
- pr_notice("Could not control frequency, ran at [%d:%uMHz, %d:%uMhz]\n",
- min.freq, intel_gpu_freq(rps, min.freq),
- max.freq, intel_gpu_freq(rps, max.freq));
+ drm_notice(&engine->i915->drm,
+ "Could not control frequency, ran at [%d:%uMHz, %d:%uMhz]\n",
+ min.freq, intel_gpu_freq(rps, min.freq),
+ max.freq, intel_gpu_freq(rps, max.freq));
if (throttle)
- pr_warn("%s: GPU throttled with reasons 0x%08x\n",
- engine->name, throttle);
+ drm_warn(&engine->i915->drm,
+ "%s: GPU throttled with reasons 0x%08x\n",
+ engine->name, throttle);
continue;
}
if (11 * min.power > 10 * max.power) {
- pr_err("%s: did not conserve power when setting lower frequency!\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: did not conserve power when setting lower frequency!\n",
+ engine->name);
if (throttle)
- pr_warn("%s: GPU throttled with reasons 0x%08x\n",
- engine->name, throttle);
+ drm_warn(&engine->i915->drm,
+ "%s: GPU throttled with reasons 0x%08x\n",
+ engine->name, throttle);
err = -EINVAL;
break;
@@ -1273,9 +1286,9 @@ int live_rps_dynamic(void *arg)
return -ENOMEM;
if (intel_rps_has_interrupts(rps))
- pr_info("RPS has interrupt support\n");
+ drm_info(>->i915->drm, "RPS has interrupt support\n");
if (intel_rps_uses_timer(rps))
- pr_info("RPS has timer support\n");
+ drm_info(>->i915->drm, "RPS has timer support\n");
for_each_engine(engine, gt, id) {
struct i915_request *rq;
@@ -1318,19 +1331,18 @@ int live_rps_dynamic(void *arg)
min.freq = wait_for_freq(rps, rps->min_freq, 2000);
min.dt = ktime_sub(ktime_get(), min.dt);
- pr_info("%s: dynamically reclocked to %u:%uMHz while busy in %lluns, and %u:%uMHz while idle in %lluns\n",
- engine->name,
- max.freq, intel_gpu_freq(rps, max.freq),
- ktime_to_ns(max.dt),
- min.freq, intel_gpu_freq(rps, min.freq),
- ktime_to_ns(min.dt));
+ drm_info(&engine->i915->drm,
+ "%s: dynamically reclocked to %u:%uMHz while busy in %lluns, and %u:%uMHz while idle in %lluns\n",
+ engine->name, max.freq, intel_gpu_freq(rps, max.freq), ktime_to_ns(max.dt),
+ min.freq, intel_gpu_freq(rps, min.freq), ktime_to_ns(min.dt));
if (min.freq >= max.freq) {
- pr_err("%s: dynamic reclocking of spinner failed\n!",
- engine->name);
+ drm_err(&engine->i915->drm, "%s: dynamic reclocking of spinner failed\n!",
+ engine->name);
if (throttle)
- pr_warn("%s: GPU throttled with reasons 0x%08x\n",
- engine->name, throttle);
+ drm_warn(&engine->i915->drm,
+ "%s: GPU throttled with reasons 0x%08x\n",
+ engine->name, throttle);
err = -EINVAL;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 7/8] drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
` (5 preceding siblings ...)
2026-08-18 9:56 ` [PATCH v2 6/8] drm/i915/gt/selftests: Use drm_* prints in gt standalone tests Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 9:56 ` [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers Krzysztof Karas
2026-08-18 11:42 ` ✗ i915.CI.BAT: failure for drm/i915/selftests: Modernize printing in i915 selftests (rev3) Patchwork
8 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
.../drm/i915/gt/selftest_engine_heartbeat.c | 18 ++++++++-----
drivers/gpu/drm/i915/gt/selftest_llc.c | 26 ++++++++++++-------
2 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
index b893a8fde895..6f5962eaca3b 100644
--- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
+++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
@@ -202,8 +202,10 @@ 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);
+ struct drm_printer m = drm_err_printer(&engine->i915->drm, "heartbeat off");
+
+ drm_printf(&m, "%s: heartbeat not running\n", engine->name);
+
err = -EINVAL;
goto err_pm;
}
@@ -215,15 +217,19 @@ 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);
+ struct drm_printer m = drm_err_printer(&engine->i915->drm, "heartbeat off");
+
+ drm_printf(&m, "%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);
+ struct drm_printer m = drm_err_printer(&engine->i915->drm, "heartbeat off");
+
+ drm_printf(&m, "%s: heartbeat still allocated\n", engine->name);
+
err = -EINVAL;
goto err_beat;
}
diff --git a/drivers/gpu/drm/i915/gt/selftest_llc.c b/drivers/gpu/drm/i915/gt/selftest_llc.c
index 779fadcec7c4..6f204b4346f4 100644
--- a/drivers/gpu/drm/i915/gt/selftest_llc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_llc.c
@@ -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,31 @@ 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;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
` (6 preceding siblings ...)
2026-08-18 9:56 ` [PATCH v2 7/8] drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers Krzysztof Karas
@ 2026-08-18 9:56 ` Krzysztof Karas
2026-08-18 10:08 ` sashiko-bot
2026-08-18 10:09 ` Krzysztof Karas
2026-08-18 11:42 ` ✗ i915.CI.BAT: failure for drm/i915/selftests: Modernize printing in i915 selftests (rev3) Patchwork
8 siblings, 2 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 9:56 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec, Krzysztof Karas
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
v2:
* Derive drm device from i915 context instead of passing
another argument to selftests.
drivers/gpu/drm/i915/i915_selftest.h | 2 +
.../gpu/drm/i915/selftests/i915_selftest.c | 56 ++++++++++---------
2 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_selftest.h b/drivers/gpu/drm/i915/i915_selftest.h
index e29ca298e7eb..66707d7b35d3 100644
--- a/drivers/gpu/drm/i915/i915_selftest.h
+++ b/drivers/gpu/drm/i915/i915_selftest.h
@@ -29,6 +29,7 @@
#define STACK_MAGIC 0xdeadbeef
struct pci_dev;
+struct drm_device;
struct drm_i915_private;
struct i915_selftest {
@@ -84,6 +85,7 @@ int __intel_gt_live_setup(void *data);
int __intel_gt_live_teardown(int err, void *data);
int __i915_subtests(const char *caller,
+ const struct drm_device *drm,
int (*setup)(void *data),
int (*teardown)(int err, void *data),
const struct i915_subtest *st,
diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c
index 3adcfdab75ae..6550b05e7636 100644
--- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
+++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
@@ -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"
@@ -41,13 +43,13 @@ struct i915_selftest i915_selftest __read_mostly = {
int i915_mock_sanitycheck(void)
{
- pr_info(DRIVER_NAME ": %s() - ok!\n", __func__);
+ drm_info(NULL, "%s() - ok!\n", __func__);
return 0;
}
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,10 +180,10 @@ __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)
+static struct mm_struct *get_selftest_mm(const struct drm_device *drm, int u_pid_nr)
{
struct task_struct *task = NULL;
struct mm_struct *mm = NULL;
@@ -192,19 +194,19 @@ static struct mm_struct *get_selftest_mm(int u_pid_nr)
u_pid = find_get_pid(u_pid_nr);
if (!u_pid) {
- pr_warn("Could not find PID: %d\n", u_pid_nr);
+ drm_warn(drm, "Could not find PID: %d\n", u_pid_nr);
return NULL;
}
task = get_pid_task(u_pid, PIDTYPE_PID);
put_pid(u_pid);
if (!task) {
- pr_warn("Could not find task for PID: %d\n", u_pid_nr);
+ drm_warn(drm, "Could not find task for PID: %d\n", u_pid_nr);
return NULL;
}
if (task->flags & PF_KTHREAD) {
- pr_warn("Task not in userspace: %d\n", u_pid_nr);
+ drm_warn(drm, "Task not in userspace: %d\n", u_pid_nr);
put_task_struct(task);
return NULL;
}
@@ -212,7 +214,7 @@ static struct mm_struct *get_selftest_mm(int u_pid_nr)
mm = get_task_mm(task);
put_task_struct(task);
if (!mm) {
- pr_warn("Could not find address space of task with PID: %d\n", u_pid_nr);
+ drm_warn(drm, "Could not find address space of task with PID: %d\n", u_pid_nr);
return NULL;
}
@@ -224,6 +226,8 @@ static int __run_selftests(const char *name,
unsigned int count,
void *data)
{
+ struct drm_i915_private *i915 = data;
+ struct drm_device *drm = i915 ? &i915->drm : NULL;
struct mm_struct *mm = NULL;
int u_pid_nr = -1;
int err = 0;
@@ -241,8 +245,8 @@ static int __run_selftests(const char *name,
set_default_test_all(st, count);
- pr_info(DRIVER_NAME ": Performing %s selftests with st_random_seed=0x%x st_timeout=%u\n",
- name, i915_selftest.random_seed, i915_selftest.timeout_ms);
+ drm_info(drm, "Performing %s selftests with st_random_seed=0x%x st_timeout=%u\n",
+ name, i915_selftest.random_seed, i915_selftest.timeout_ms);
/*
* If we are running in a kthread on a multi NUMA system and the user passed
@@ -250,13 +254,13 @@ static int __run_selftests(const char *name,
* to prepare a safe environment for the mmap selftests.
*/
if (!current->mm && u_pid_nr > 0) {
- mm = get_selftest_mm(u_pid_nr);
+ mm = get_selftest_mm(drm, u_pid_nr);
if (mm) {
kthread_use_mm(mm);
if (unlikely(!current->mm)) {
mmput(mm);
mm = NULL;
- pr_warn("Could not set mm as current->mm\n");
+ drm_warn(drm, "Could not set mm as current->mm\n");
}
}
}
@@ -275,7 +279,7 @@ static int __run_selftests(const char *name,
return -EINTR;
}
- pr_info(DRIVER_NAME ": Running %s\n", st->name);
+ drm_info(drm, "Running %s\n", st->name);
if (data)
err = st->live(data);
else
@@ -299,8 +303,8 @@ static int __run_selftests(const char *name,
return err;
}
-#define run_selftests(x, data) \
- __run_selftests(#x, x##_selftests, ARRAY_SIZE(x##_selftests), data)
+#define run_selftests(x, drm, data) \
+ __run_selftests(#x, drm, x##_selftests, ARRAY_SIZE(x##_selftests), data)
int i915_mock_selftests(void)
{
@@ -309,7 +313,7 @@ int i915_mock_selftests(void)
if (!i915_selftest.mock)
return 0;
- err = run_selftests(mock, NULL);
+ err = run_selftests(mock, NULL, NULL);
if (err) {
i915_selftest.mock = err;
return 1;
@@ -350,7 +354,7 @@ int i915_live_selftests(struct pci_dev *pdev)
__wait_gsc_proxy_completed(i915);
__wait_gsc_huc_load_completed(i915);
- err = run_selftests(live, i915);
+ err = run_selftests(live, &i915->drm, i915);
if (err) {
i915_selftest.live = err;
return err;
@@ -375,7 +379,7 @@ int i915_perf_selftests(struct pci_dev *pdev)
__wait_gsc_proxy_completed(i915);
__wait_gsc_huc_load_completed(i915);
- err = run_selftests(perf, i915);
+ err = run_selftests(perf, &i915->drm, i915);
if (err) {
i915_selftest.perf = err;
return err;
@@ -495,6 +499,8 @@ int __i915_subtests(const char *caller,
unsigned int count,
void *data)
{
+ struct drm_i915_private *i915 = data;
+ struct drm_device *drm = i915 ? &i915->drm : NULL;
int err;
for (; count--; st++) {
@@ -507,18 +513,16 @@ int __i915_subtests(const char *caller,
err = setup(data);
if (err) {
- pr_err(DRIVER_NAME "/%s: setup failed for %s\n",
- caller, st->name);
+ drm_err(drm, "%s: setup failed for %s\n", caller, st->name);
return err;
}
- pr_info(DRIVER_NAME ": Running %s/%s\n", caller, st->name);
+ drm_info(drm, "Running %s/%s\n", caller, st->name);
GEM_TRACE("Running %s/%s\n", caller, st->name);
err = teardown(st->func(data), data);
if (err && err != -EINTR) {
- pr_err(DRIVER_NAME "/%s: %s failed with error %d\n",
- caller, st->name, err);
+ drm_err(drm, "%s: %s failed with error %d\n", caller, st->name, err);
return err;
}
}
@@ -557,7 +561,7 @@ void igt_hexdump(const void *buf, size_t len)
if (prev && !memcmp(prev, buf + pos, rowsize)) {
if (!skip) {
- pr_info("*\n");
+ drm_info(NULL, "*\n");
skip = true;
}
continue;
@@ -567,7 +571,7 @@ void igt_hexdump(const void *buf, size_t len)
rowsize, sizeof(u32),
line, sizeof(line),
false) >= sizeof(line));
- pr_info("[%04zx] %s\n", pos, line);
+ drm_info(NULL, "[%04zx] %s\n", pos, line);
prev = buf + pos;
skip = false;
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers
2026-08-18 9:56 ` [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers Krzysztof Karas
@ 2026-08-18 10:08 ` sashiko-bot
2026-08-18 10:09 ` Krzysztof Karas
1 sibling, 0 replies; 13+ messages in thread
From: sashiko-bot @ 2026-08-18 10:08 UTC (permalink / raw)
To: Krzysztof Karas; +Cc: dri-devel, intel-gfx
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] Invalid pointer cast in `__i915_subtests()` causes type confusion and kernel panics when tests pass non-i915 context objects.
- [Low] The `run_selftests` macro calls `__run_selftests` with 5 arguments, but the function signature expects 4 arguments.
- [Low] Conflicting function signatures for `__i915_subtests` between the header and source file.
- [Low] Passing `NULL` to `drm_info()` mangles log formatting in mock selftests and destroys `igt_hexdump()` alignment.
--
--- Patch [8]: [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers ---
commit a417b9a673aa26bae15031a5fc6e3dc6e4262012
Author: Krzysztof Karas <krzysztof.karas@intel.com>
Subject: drm/i915/selftests: Use drm_* prints in selftest headers
This commit moves away from generic pr_ prints to device context aware drm
versions in the i915 selftests.
> diff --git a/drivers/gpu/drm/i915/i915_selftest.h b/drivers/gpu/drm/i915/i915_selftest.h
> index e29ca298e7eb1..66707d7b35d31 100644
> --- a/drivers/gpu/drm/i915/i915_selftest.h
> +++ b/drivers/gpu/drm/i915/i915_selftest.h
> @@ -84,6 +85,7 @@ int __intel_gt_live_setup(void *data);
> int __intel_gt_live_teardown(int err, void *data);
>
> int __i915_subtests(const char *caller,
> + const struct drm_device *drm,
> int (*setup)(void *data),
[Severity: Low]
Does this introduce a conflicting function signature?
The header file defines __i915_subtests() with 7 arguments here, but the source
file defines it with 6 arguments without the new drm parameter, which will
result in a conflicting types error during compilation.
> diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c
> index 3adcfdab75ae1..6550b05e76360 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
> @@ -41,13 +43,13 @@ struct i915_selftest i915_selftest __read_mostly = {
>
> int i915_mock_sanitycheck(void)
> {
> - pr_info(DRIVER_NAME ": %s() - ok!\n", __func__);
> + drm_info(NULL, "%s() - ok!\n", __func__);
[Severity: Low]
Will passing NULL to drm_info() mangle the log formatting?
drm_info(NULL, ...) resolves to dev_info(NULL, ...), which prepends
"(NULL device *): [drm] " to the logs. This replaces the clean logs from the
previous pr_info() calls.
[ ... ]
> @@ -224,6 +226,8 @@ static int __run_selftests(const char *name,
> unsigned int count,
> void *data)
> {
> + struct drm_i915_private *i915 = data;
> + struct drm_device *drm = i915 ? &i915->drm : NULL;
> struct mm_struct *mm = NULL;
[ ... ]
> @@ -299,8 +303,8 @@ static int __run_selftests(const char *name,
> return err;
> }
>
> -#define run_selftests(x, data) \
> - __run_selftests(#x, x##_selftests, ARRAY_SIZE(x##_selftests), data)
> +#define run_selftests(x, drm, data) \
> + __run_selftests(#x, drm, x##_selftests, ARRAY_SIZE(x##_selftests), data)
[Severity: Low]
Is the run_selftests macro passing the correct number of arguments?
The run_selftests macro was updated to pass 5 arguments including the new drm
parameter, but the static function __run_selftests() was not modified to accept
it and still expects 4 arguments. This causes a build failure.
[ ... ]
> @@ -495,6 +499,8 @@ int __i915_subtests(const char *caller,
> unsigned int count,
> void *data)
> {
> + struct drm_i915_private *i915 = data;
> + struct drm_device *drm = i915 ? &i915->drm : NULL;
[Severity: High]
Can this cast cause a kernel panic when testing non-i915 context objects?
This blindly casts the void *data argument to struct drm_i915_private * to
derive a drm pointer. However, callers often pass other types like
struct intel_gt *.
For intel_gt, offset 8 contains a string pointer (const char *name), which
perfectly aliases with drm->dev. When drm_info(drm, ...) passes this to
dev_info(), the kernel will attempt to dereference the string literal as a
struct device *, resulting in a fatal page fault.
[ ... ]
> @@ -557,7 +561,7 @@ void igt_hexdump(const void *buf, size_t len)
>
> if (prev && !memcmp(prev, buf + pos, rowsize)) {
> if (!skip) {
> - pr_info("*\n");
> + drm_info(NULL, "*\n");
> skip = true;
> }
> continue;
> @@ -567,7 +571,7 @@ void igt_hexdump(const void *buf, size_t len)
> rowsize, sizeof(u32),
> line, sizeof(line),
> false) >= sizeof(line));
> - pr_info("[%04zx] %s\n", pos, line);
> + drm_info(NULL, "[%04zx] %s\n", pos, line);
[Severity: Low]
Does passing NULL here break the formatting of the hex dump output?
Similar to the mock selftest above, dev_info() will prepend
"(NULL device *): [drm] " to the prints, which destroys the clean column
alignment expected in igt_hexdump() output.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818095624.3254368-1-krzysztof.karas@intel.com?part=8
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers
2026-08-18 9:56 ` [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers Krzysztof Karas
2026-08-18 10:08 ` sashiko-bot
@ 2026-08-18 10:09 ` Krzysztof Karas
1 sibling, 0 replies; 13+ messages in thread
From: Krzysztof Karas @ 2026-08-18 10:09 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, Jani Nikula, Andi Shyti, Janusz Krzysztofik,
Sebastian Brzezinka, Krzysztof Niemiec
Hi,
This last patch got mangled on my end. It should be:
[PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest
headers
Move away from generic pr prints to device context aware drm
versions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
drivers/gpu/drm/i915/i915_selftest.h | 1 +
.../gpu/drm/i915/selftests/i915_selftest.c | 46 ++++++++++---------
2 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_selftest.h b/drivers/gpu/drm/i915/i915_selftest.h
index e29ca298e7eb..2e7155eff752 100644
--- a/drivers/gpu/drm/i915/i915_selftest.h
+++ b/drivers/gpu/drm/i915/i915_selftest.h
@@ -29,6 +29,7 @@
#define STACK_MAGIC 0xdeadbeef
struct pci_dev;
+struct drm_device;
struct drm_i915_private;
struct i915_selftest {
diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c
index 3adcfdab75ae..6792669dae46 100644
--- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
+++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
@@ -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"
@@ -41,13 +43,13 @@ struct i915_selftest i915_selftest __read_mostly = {
int i915_mock_sanitycheck(void)
{
- pr_info(DRIVER_NAME ": %s() - ok!\n", __func__);
+ drm_info(NULL, "%s() - ok!\n", __func__);
return 0;
}
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,10 +180,10 @@ __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)
+static struct mm_struct *get_selftest_mm(const struct drm_device *drm, int u_pid_nr)
{
struct task_struct *task = NULL;
struct mm_struct *mm = NULL;
@@ -192,19 +194,19 @@ static struct mm_struct *get_selftest_mm(int u_pid_nr)
u_pid = find_get_pid(u_pid_nr);
if (!u_pid) {
- pr_warn("Could not find PID: %d\n", u_pid_nr);
+ drm_warn(drm, "Could not find PID: %d\n", u_pid_nr);
return NULL;
}
task = get_pid_task(u_pid, PIDTYPE_PID);
put_pid(u_pid);
if (!task) {
- pr_warn("Could not find task for PID: %d\n", u_pid_nr);
+ drm_warn(drm, "Could not find task for PID: %d\n", u_pid_nr);
return NULL;
}
if (task->flags & PF_KTHREAD) {
- pr_warn("Task not in userspace: %d\n", u_pid_nr);
+ drm_warn(drm, "Task not in userspace: %d\n", u_pid_nr);
put_task_struct(task);
return NULL;
}
@@ -212,7 +214,7 @@ static struct mm_struct *get_selftest_mm(int u_pid_nr)
mm = get_task_mm(task);
put_task_struct(task);
if (!mm) {
- pr_warn("Could not find address space of task with PID: %d\n", u_pid_nr);
+ drm_warn(drm, "Could not find address space of task with PID: %d\n", u_pid_nr);
return NULL;
}
@@ -224,6 +226,8 @@ static int __run_selftests(const char *name,
unsigned int count,
void *data)
{
+ struct drm_i915_private *i915 = data;
+ struct drm_device *drm = i915 ? &i915->drm : NULL;
struct mm_struct *mm = NULL;
int u_pid_nr = -1;
int err = 0;
@@ -241,8 +245,8 @@ static int __run_selftests(const char *name,
set_default_test_all(st, count);
- pr_info(DRIVER_NAME ": Performing %s selftests with st_random_seed=0x%x st_timeout=%u\n",
- name, i915_selftest.random_seed, i915_selftest.timeout_ms);
+ drm_info(drm, "Performing %s selftests with st_random_seed=0x%x st_timeout=%u\n",
+ name, i915_selftest.random_seed, i915_selftest.timeout_ms);
/*
* If we are running in a kthread on a multi NUMA system and the user passed
@@ -250,13 +254,13 @@ static int __run_selftests(const char *name,
* to prepare a safe environment for the mmap selftests.
*/
if (!current->mm && u_pid_nr > 0) {
- mm = get_selftest_mm(u_pid_nr);
+ mm = get_selftest_mm(drm, u_pid_nr);
if (mm) {
kthread_use_mm(mm);
if (unlikely(!current->mm)) {
mmput(mm);
mm = NULL;
- pr_warn("Could not set mm as current->mm\n");
+ drm_warn(drm, "Could not set mm as current->mm\n");
}
}
}
@@ -275,7 +279,7 @@ static int __run_selftests(const char *name,
return -EINTR;
}
- pr_info(DRIVER_NAME ": Running %s\n", st->name);
+ drm_info(drm, "Running %s\n", st->name);
if (data)
err = st->live(data);
else
@@ -495,6 +499,8 @@ int __i915_subtests(const char *caller,
unsigned int count,
void *data)
{
+ struct drm_i915_private *i915 = data;
+ struct drm_device *drm = i915 ? &i915->drm : NULL;
int err;
for (; count--; st++) {
@@ -507,18 +513,16 @@ int __i915_subtests(const char *caller,
err = setup(data);
if (err) {
- pr_err(DRIVER_NAME "/%s: setup failed for %s\n",
- caller, st->name);
+ drm_err(drm, "%s: setup failed for %s\n", caller, st->name);
return err;
}
- pr_info(DRIVER_NAME ": Running %s/%s\n", caller, st->name);
+ drm_info(drm, "Running %s/%s\n", caller, st->name);
GEM_TRACE("Running %s/%s\n", caller, st->name);
err = teardown(st->func(data), data);
if (err && err != -EINTR) {
- pr_err(DRIVER_NAME "/%s: %s failed with error %d\n",
- caller, st->name, err);
+ drm_err(drm, "%s: %s failed with error %d\n", caller, st->name, err);
return err;
}
}
@@ -557,7 +561,7 @@ void igt_hexdump(const void *buf, size_t len)
if (prev && !memcmp(prev, buf + pos, rowsize)) {
if (!skip) {
- pr_info("*\n");
+ drm_info(NULL, "*\n");
skip = true;
}
continue;
@@ -567,7 +571,7 @@ void igt_hexdump(const void *buf, size_t len)
rowsize, sizeof(u32),
line, sizeof(line),
false) >= sizeof(line));
- pr_info("[%04zx] %s\n", pos, line);
+ drm_info(NULL, "[%04zx] %s\n", pos, line);
prev = buf + pos;
skip = false;
--
2.34.1
Sorry for the noise.
--
Best Regards,
Krzysztof
^ permalink raw reply related [flat|nested] 13+ messages in thread
* ✗ i915.CI.BAT: failure for drm/i915/selftests: Modernize printing in i915 selftests (rev3)
2026-08-18 9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
` (7 preceding siblings ...)
2026-08-18 9:56 ` [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers Krzysztof Karas
@ 2026-08-18 11:42 ` Patchwork
8 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2026-08-18 11:42 UTC (permalink / raw)
To: Krzysztof Karas; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 13202 bytes --]
== Series Details ==
Series: drm/i915/selftests: Modernize printing in i915 selftests (rev3)
URL : https://patchwork.freedesktop.org/series/171991/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_19010 -> Patchwork_171991v3
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_171991v3 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_171991v3, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/index.html
Participating hosts (40 -> 38)
------------------------------
Missing (2): bat-dg2-13 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_171991v3:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live:
- fi-kbl-x1275: [PASS][1] -> [ABORT][2] +1 other test abort
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-kbl-x1275/igt@i915_selftest@live.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-kbl-x1275/igt@i915_selftest@live.html
- bat-adlp-11: [PASS][3] -> [ABORT][4] +1 other test abort
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-adlp-11/igt@i915_selftest@live.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-adlp-11/igt@i915_selftest@live.html
- fi-hsw-4770: [PASS][5] -> [ABORT][6] +1 other test abort
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-hsw-4770/igt@i915_selftest@live.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-hsw-4770/igt@i915_selftest@live.html
- fi-cfl-8109u: [PASS][7] -> [ABORT][8] +1 other test abort
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-cfl-8109u/igt@i915_selftest@live.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-cfl-8109u/igt@i915_selftest@live.html
- fi-kbl-8809g: [PASS][9] -> [ABORT][10] +1 other test abort
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-kbl-8809g/igt@i915_selftest@live.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-kbl-8809g/igt@i915_selftest@live.html
- fi-ivb-3770: [PASS][11] -> [ABORT][12] +1 other test abort
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-ivb-3770/igt@i915_selftest@live.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-ivb-3770/igt@i915_selftest@live.html
- bat-mtlp-8: [PASS][13] -> [ABORT][14] +1 other test abort
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-mtlp-8/igt@i915_selftest@live.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-mtlp-8/igt@i915_selftest@live.html
- bat-dg1-6: [PASS][15] -> [ABORT][16] +1 other test abort
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-dg1-6/igt@i915_selftest@live.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-dg1-6/igt@i915_selftest@live.html
- fi-elk-e7500: [PASS][17] -> [ABORT][18] +1 other test abort
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-elk-e7500/igt@i915_selftest@live.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-elk-e7500/igt@i915_selftest@live.html
- bat-dg2-8: [PASS][19] -> [ABORT][20] +1 other test abort
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-dg2-8/igt@i915_selftest@live.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-dg2-8/igt@i915_selftest@live.html
- bat-adls-6: [PASS][21] -> [ABORT][22] +1 other test abort
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-adls-6/igt@i915_selftest@live.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-adls-6/igt@i915_selftest@live.html
- fi-ilk-650: [PASS][23] -> [ABORT][24] +1 other test abort
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-ilk-650/igt@i915_selftest@live.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-ilk-650/igt@i915_selftest@live.html
- fi-tgl-1115g4: [PASS][25] -> [ABORT][26] +1 other test abort
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-tgl-1115g4/igt@i915_selftest@live.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-tgl-1115g4/igt@i915_selftest@live.html
- fi-bsw-n3050: [PASS][27] -> [ABORT][28] +1 other test abort
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-bsw-n3050/igt@i915_selftest@live.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-bsw-n3050/igt@i915_selftest@live.html
- bat-adlp-6: [PASS][29] -> [ABORT][30] +1 other test abort
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-adlp-6/igt@i915_selftest@live.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-adlp-6/igt@i915_selftest@live.html
- fi-skl-6600u: [PASS][31] -> [ABORT][32] +1 other test abort
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-skl-6600u/igt@i915_selftest@live.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-skl-6600u/igt@i915_selftest@live.html
- bat-arlh-3: [PASS][33] -> [ABORT][34] +1 other test abort
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-arlh-3/igt@i915_selftest@live.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-arlh-3/igt@i915_selftest@live.html
- fi-pnv-d510: [PASS][35] -> [ABORT][36] +1 other test abort
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-pnv-d510/igt@i915_selftest@live.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-pnv-d510/igt@i915_selftest@live.html
* igt@i915_selftest@live@uncore:
- bat-dg1-7: [PASS][37] -> [ABORT][38] +1 other test abort
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-dg1-7/igt@i915_selftest@live@uncore.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-dg1-7/igt@i915_selftest@live@uncore.html
- fi-glk-j4005: [PASS][39] -> [ABORT][40] +1 other test abort
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-glk-j4005/igt@i915_selftest@live@uncore.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-glk-j4005/igt@i915_selftest@live@uncore.html
- bat-twl-2: [PASS][41] -> [ABORT][42] +1 other test abort
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-twl-2/igt@i915_selftest@live@uncore.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-twl-2/igt@i915_selftest@live@uncore.html
- bat-rpls-4: [PASS][43] -> [ABORT][44] +1 other test abort
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-rpls-4/igt@i915_selftest@live@uncore.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-rpls-4/igt@i915_selftest@live@uncore.html
- fi-kbl-7567u: [PASS][45] -> [ABORT][46] +1 other test abort
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-kbl-7567u/igt@i915_selftest@live@uncore.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-kbl-7567u/igt@i915_selftest@live@uncore.html
- fi-cfl-8700k: [PASS][47] -> [ABORT][48] +1 other test abort
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-cfl-8700k/igt@i915_selftest@live@uncore.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-cfl-8700k/igt@i915_selftest@live@uncore.html
- bat-twl-1: [PASS][49] -> [ABORT][50] +1 other test abort
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-twl-1/igt@i915_selftest@live@uncore.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-twl-1/igt@i915_selftest@live@uncore.html
- bat-jsl-5: [PASS][51] -> [ABORT][52] +1 other test abort
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-jsl-5/igt@i915_selftest@live@uncore.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-jsl-5/igt@i915_selftest@live@uncore.html
- bat-apl-1: [PASS][53] -> [ABORT][54] +1 other test abort
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-apl-1/igt@i915_selftest@live@uncore.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-apl-1/igt@i915_selftest@live@uncore.html
- bat-dg2-14: [PASS][55] -> [ABORT][56] +1 other test abort
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-dg2-14/igt@i915_selftest@live@uncore.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-dg2-14/igt@i915_selftest@live@uncore.html
- fi-bsw-nick: [PASS][57] -> [ABORT][58] +1 other test abort
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-bsw-nick/igt@i915_selftest@live@uncore.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-bsw-nick/igt@i915_selftest@live@uncore.html
- bat-kbl-2: [PASS][59] -> [ABORT][60] +1 other test abort
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-kbl-2/igt@i915_selftest@live@uncore.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-kbl-2/igt@i915_selftest@live@uncore.html
- bat-rplp-1: [PASS][61] -> [ABORT][62] +1 other test abort
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-rplp-1/igt@i915_selftest@live@uncore.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-rplp-1/igt@i915_selftest@live@uncore.html
- bat-arlh-2: [PASS][63] -> [ABORT][64] +1 other test abort
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-arlh-2/igt@i915_selftest@live@uncore.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-arlh-2/igt@i915_selftest@live@uncore.html
- fi-rkl-11600: [PASS][65] -> [ABORT][66] +1 other test abort
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-rkl-11600/igt@i915_selftest@live@uncore.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-rkl-11600/igt@i915_selftest@live@uncore.html
- bat-atsm-1: [PASS][67] -> [ABORT][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-atsm-1/igt@i915_selftest@live@uncore.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-atsm-1/igt@i915_selftest@live@uncore.html
- fi-cfl-guc: [PASS][69] -> [ABORT][70] +1 other test abort
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/fi-cfl-guc/igt@i915_selftest@live@uncore.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/fi-cfl-guc/igt@i915_selftest@live@uncore.html
- bat-mtlp-9: [PASS][71] -> [ABORT][72] +1 other test abort
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-mtlp-9/igt@i915_selftest@live@uncore.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-mtlp-9/igt@i915_selftest@live@uncore.html
- bat-dg2-9: [PASS][73] -> [ABORT][74] +1 other test abort
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-dg2-9/igt@i915_selftest@live@uncore.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-dg2-9/igt@i915_selftest@live@uncore.html
- bat-arls-6: [PASS][75] -> [ABORT][76] +1 other test abort
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-arls-6/igt@i915_selftest@live@uncore.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-arls-6/igt@i915_selftest@live@uncore.html
Known issues
------------
Here are the changes found in Patchwork_171991v3 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live:
- bat-atsm-1: [PASS][77] -> [ABORT][78] ([i915#14564])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19010/bat-atsm-1/igt@i915_selftest@live.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/bat-atsm-1/igt@i915_selftest@live.html
[i915#14564]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14564
Build changes
-------------
* Linux: CI_DRM_19010 -> Patchwork_171991v3
CI-20190529: 20190529
CI_DRM_19010: 275df33dcf4c5d018717867a0b29ed1d3b62c1ef @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_9059: f5a4ff79434df36db1d6b13deb37c90a6602565e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_171991v3: 275df33dcf4c5d018717867a0b29ed1d3b62c1ef @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_171991v3/index.html
[-- Attachment #2: Type: text/html, Size: 14019 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread