From: Krzysztof Niemiec <krzysztof.niemiec@intel.com>
To: Krzysztof Karas <krzysztof.karas@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>,
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Subject: Re: [PATCH v3 2/8] drm/i915/selftests: Use drm_* prints in live selftests
Date: Fri, 28 Aug 2026 18:41:18 +0200 [thread overview]
Message-ID: <apGtyDcru1fptbcX@kniemiec-mobl1> (raw)
In-Reply-To: <20260828100339.72304-3-krzysztof.karas@intel.com>
Hi Krzysztof,
On 2026-08-28 at 10:03:33 +0000, Krzysztof Karas wrote:
> Move away from generic pr prints to device context aware drm
> versions.
>
> Assisted-by: GitHub-Copilot:claude-opus-5
> Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
> ---
> .../gpu/drm/i915/selftests/i915_gem_evict.c | 75 +++--
> i915_request_put(last);
<snip>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> index e6bd06774816..0c855f00c3ae 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"
Is the ../ really necessary here? It builds for me if i just switch to
#include "i915_drv.h", other includes treat driver/gpu/drm/i915 as the
working dir. I've seen both styles used in the selftests but it just
looks a bit out of place here.
<snip>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_perf.c b/drivers/gpu/drm/i915/selftests/i915_perf.c
> index e9469e27f42a..d2a1a901d47b 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>
> +
Giga nit, but should this be before the "" includes?
<snip>
> diff --git a/drivers/gpu/drm/i915/selftests/intel_uncore.c b/drivers/gpu/drm/i915/selftests/intel_uncore.c
> index 514d2200751b..1f58024150fa 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>
> +
Should this be before the "" includes?
<not snipping here, same file below>
> 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;
> }
>
> @@ -126,7 +129,8 @@ int intel_uncore_mock_selftests(void)
> for (i = 0; i < ARRAY_SIZE(fw); i++) {
> err = intel_fw_table_check(fw[i].ranges,
> fw[i].num_ranges,
> - fw[i].is_watertight);
> + fw[i].is_watertight,
> + NULL);
I'll join Andi here in that this looks a bit weird. Especially since the
next function in the file intel_shadow_table_check() keeps using
pr_err(). Either convert that too or don't do either.
<snippnig the rest>
Thanks
Krzysztof
next prev parent reply other threads:[~2026-08-28 16:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 10:03 [PATCH v3 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
2026-08-28 10:03 ` [PATCH v3 1/8] drm/i915/selftest: Fix a typo in alloc_workqueue call Krzysztof Karas
2026-08-28 14:24 ` Andi Shyti
2026-08-28 16:54 ` Andi Shyti
2026-08-28 10:03 ` [PATCH v3 2/8] drm/i915/selftests: Use drm_* prints in live selftests Krzysztof Karas
2026-08-28 14:34 ` Andi Shyti
2026-08-28 16:41 ` Krzysztof Niemiec [this message]
2026-08-28 10:03 ` [PATCH v3 3/8] drm/i915/selftests: Use drm_* prints in selftest helpers Krzysztof Karas
2026-08-28 15:58 ` Andi Shyti
2026-08-28 16:49 ` Krzysztof Niemiec
2026-08-28 10:03 ` [PATCH v3 4/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests Krzysztof Karas
2026-08-28 16:18 ` Andi Shyti
2026-08-28 17:40 ` Krzysztof Niemiec
2026-08-28 10:03 ` [PATCH v3 5/8] drm/i915/gt/selftests: Use drm_* prints in gt standalone tests Krzysztof Karas
2026-08-28 16:23 ` Andi Shyti
2026-08-28 18:02 ` Krzysztof Niemiec
2026-08-28 10:03 ` [PATCH v3 6/8] drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers Krzysztof Karas
2026-08-28 16:28 ` Andi Shyti
2026-08-28 18:06 ` Krzysztof Niemiec
2026-08-28 10:03 ` [PATCH v3 7/8] drm/i915/selftests: Use drm_* prints in selftest headers Krzysztof Karas
2026-08-28 16:30 ` Andi Shyti
2026-08-28 18:08 ` Krzysztof Niemiec
2026-08-28 10:03 ` [PATCH v3 8/8] drm/i915/selftests: Add drm_device to selftest wrappers Krzysztof Karas
2026-08-28 16:36 ` Andi Shyti
2026-08-28 11:31 ` ✗ i915.CI.BAT: failure for drm/i915/selftests: Modernize printing in i915 selftests (rev4) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apGtyDcru1fptbcX@kniemiec-mobl1 \
--to=krzysztof.niemiec@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=janusz.krzysztofik@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=sebastian.brzezinka@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.