From: sashiko-bot@kernel.org
To: "Jani Nikula" <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 08/10] drm/i915/selftests: use intel_gtt_view_is_*() helpers more
Date: Tue, 15 Sep 2026 20:14:42 +0000 [thread overview]
Message-ID: <20260915201443.528661F000FF@smtp.kernel.org> (raw)
In-Reply-To: <c626ae37eed76d8b94333ba0202fdfe34ec88dd5.1789502902.git.jani.nikula@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/i915/selftests: incorrect view type check breaks igt_vma_remapped_gtt
--
commit b3029da419b0bcdce00e05ce10b2c3fff729069e
Author: Jani Nikula <jani.nikula@intel.com>
drm/i915/selftests: use intel_gtt_view_is_*() helpers more
This commit replaces direct view type comparisons with intel_gtt_view_is_*()
helpers.
> diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
> index b16297a6a4e8d..ca340a94f7728 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_vma.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
[ ... ]
> @@ -1057,7 +1057,7 @@ static int igt_vma_remapped_gtt(void *arg)
> goto out;
> }
>
> - GEM_BUG_ON(vma->gtt_view.type != I915_GTT_VIEW_NORMAL);
> + GEM_BUG_ON(!intel_gtt_view_is_normal(&vma->gtt_view));
>
> map = i915_vma_pin_iomap(vma);
> i915_vma_unpin(vma);
[ ... ]
> @@ -1072,7 +1072,7 @@ static int igt_vma_remapped_gtt(void *arg)
> u32 exp = y << 16 | x;
> u32 val;
>
> - if (*t == I915_GTT_VIEW_ROTATED)
> + if (intel_gtt_view_is_rotated(&vma->gtt_view))
> src_idx = rotated_index(&view.rotated, 0, x, y);
> else
> src_idx = remapped_index(&view.remapped, 0, x, y);
[Severity: Medium]
Will this check always evaluate to false? Earlier in igt_vma_remapped_gtt(),
the vma is pinned with a normal view, and verified with the GEM_BUG_ON
shown above. Because vma->gtt_view is normal, this condition will fail even
when testing a rotated view, incorrectly taking the remapped_index() path
and causing spurious test failures.
Should this check continue to evaluate the original test context instead,
such as by using intel_gtt_view_is_rotated(&view)?
> @@ -1081,7 +1081,7 @@ 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",
> + intel_gtt_view_is_rotated(&vma->gtt_view) ? "Rotated" : "Remapped",
> exp, val);
> i915_vma_unpin_iomap(vma);
> err = -EINVAL;
[Severity: Medium]
Does this error message also need to check the original view context? For
the same reason as above, if the test fails for a rotated view, it will
incorrectly print Remapped because vma->gtt_view is normal here.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1789502902.git.jani.nikula@intel.com?part=8
next prev parent reply other threads:[~2026-09-15 20:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
2026-09-15 20:09 ` [PATCH 01/10] drm/intel: move i915_gtt_view_types.h to include/drm/intel Jani Nikula
2026-09-30 13:34 ` Ville Syrjälä
2026-09-15 20:09 ` [PATCH 02/10] drm/intel: rename i915_gtt_view_is_*() helpers to intel_gtt_view_is_*() Jani Nikula
2026-09-15 20:09 ` [PATCH 03/10] drm/intel: rename i915_gtt_view* struct/enum to intel_gtt_view* Jani Nikula
2026-09-15 20:09 ` [PATCH 04/10] drm/intel: add intel_gtt_view_is_partial() for completeness Jani Nikula
2026-09-15 20:09 ` [PATCH 05/10] drm/xe/display: use intel_gtt_view_is_*() helpers more Jani Nikula
2026-09-15 20:09 ` [PATCH 06/10] drm/i915/gem: " Jani Nikula
2026-09-15 20:09 ` [PATCH 07/10] drm/i915/vma: " Jani Nikula
2026-09-15 20:09 ` [PATCH 08/10] drm/i915/selftests: " Jani Nikula
2026-09-15 20:14 ` sashiko-bot [this message]
2026-09-30 10:34 ` [PATCH v2] " Jani Nikula
2026-09-30 13:29 ` Ville Syrjälä
2026-09-15 20:09 ` [PATCH 09/10] drm/i915/debugfs: use the " Jani Nikula
2026-09-15 20:09 ` [PATCH 10/10] drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_* Jani Nikula
2026-09-29 14:00 ` Maarten Lankhorst
2026-09-15 21:48 ` ✗ i915.CI.BAT: failure for drm/{i915,xe}: use a shared gtt_view_types.h header Patchwork
2026-09-28 12:40 ` [PATCH 00/10] drm/{i915, xe}: " Jani Nikula
2026-09-30 12:51 ` ✓ i915.CI.BAT: success for drm/{i915,xe}: use a shared gtt_view_types.h header (rev2) Patchwork
2026-09-30 13:38 ` [PATCH 00/10] drm/{i915, xe}: use a shared gtt_view_types.h header Ville Syrjälä
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=20260915201443.528661F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox