From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 10/12] drm/i915/selftests: Eliminate duplicate vma size check
Date: Wed, 8 Apr 2026 14:28:19 +0300 [thread overview]
Message-ID: <adY700Bp2S4UMi-9@intel.com> (raw)
In-Reply-To: <818d1ebdafb20f3b5ed25e1349f2965948ab819b@intel.com>
On Wed, Apr 08, 2026 at 12:01:26PM +0300, Jani Nikula wrote:
> On Tue, 07 Apr 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Both remapped and rotated views need the exact same size check.
>
> This is misleading, see below. At the very least the commit message
> needs amending.
>
> > Currently that is being done separately for each type. Share
> > the code by just checking for !NORMAL view. This test doesn't
> > use I915_GTT_VIEW_PARTIAL so the inverse check is fine here.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/selftests/i915_vma.c | 10 +---------
> > 1 file changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
> > index 7c4111e60f2e..258557388a2d 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_vma.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
> > @@ -634,7 +634,7 @@ static int igt_vma_rotate_remap(void *arg)
> >
> > expected_pages = remapped_size(view.type, &plane_info[0], &plane_info[1]);
> >
> > - if (view.type == I915_GTT_VIEW_ROTATED &&
> > + if (view.type != I915_GTT_VIEW_NORMAL &&
> > vma->size != expected_pages * PAGE_SIZE) {
> > pr_err("VMA is wrong size, expected %lu, found %llu\n",
> > PAGE_SIZE * expected_pages, vma->size);
> > @@ -642,14 +642,6 @@ static int igt_vma_rotate_remap(void *arg)
> > goto out_object;
> > }
> >
> > - if (view.type == I915_GTT_VIEW_REMAPPED &&
> > - vma->size > expected_pages * PAGE_SIZE) {
>
> This check becomes stricter now, expecting exact match. Does it matter?
I didn't even notice tbh.
>
> History points at you! ;)
>
> e2e394bffa19 ("drm/i915/selftests: Add mock selftest for remapped vmas")
>
> If you think the change in the check is okay, and with the commit
> message amended,
Hmm. I don't actually know why I did the more relaxed check originally.
Can't think right now why the exact check wouldn't be correct for both.
I suppose actually running the test should tell us...
And now that I think about this, the strict check would be incorrect if
we were testing the plane_alignment stuff. But we seem to lack selftests
for that stuff for some reason. I should really add that, and switch
the size calculations to use the real intel_remapped_info_size()...
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
>
> > - pr_err("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);
>
> --
> Jani Nikula, Intel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-04-08 11:28 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 15:50 [PATCH 00/12] drm/i915/fb: Prep work for more generic remapping support Ville Syrjala
2026-04-07 15:50 ` [PATCH 01/12] drm/i915/fb: Nuke intel_tile_row_size() Ville Syrjala
2026-04-08 8:42 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 02/12] drm/i915/fb: Make intel_fb_needs_pot_stride_remap() static Ville Syrjala
2026-04-08 8:43 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 03/12] drm/i915/fb: Reject per-plane remapping with DPT Ville Syrjala
2026-04-08 8:43 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 04/12] drm/xe/fb: Use the correct gtt view for remapped FBs Ville Syrjala
2026-04-08 8:44 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 05/12] drm/xe/fb: Remove weird VMA end alignemnt Ville Syrjala
2026-04-08 8:45 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 06/12] drm/xe/fb: Extract xe_dpt_size() Ville Syrjala
2026-04-08 8:47 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 07/12] drm/i915/vma: Add helpers to check GTT view type Ville Syrjala
2026-04-08 8:50 ` Jani Nikula
2026-04-08 9:11 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 08/12] drm/xe/fb: Use i915_gtt_view_is_*() Ville Syrjala
2026-04-08 8:52 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 09/12] drm/i915/fb: " Ville Syrjala
2026-04-08 8:53 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 10/12] drm/i915/selftests: Eliminate duplicate vma size check Ville Syrjala
2026-04-08 9:01 ` Jani Nikula
2026-04-08 11:28 ` Ville Syrjälä [this message]
2026-04-07 15:50 ` [PATCH 11/12] drm/i915/selftests: Use i915_gtt_view_is_*() Ville Syrjala
2026-04-08 9:03 ` Jani Nikula
2026-04-08 9:04 ` Jani Nikula
2026-04-07 15:50 ` [PATCH 12/12] drm/i915/fb: Use intel_fb_needs_pot_stride_remap() in intel_fb_view_init() Ville Syrjala
2026-04-08 9:09 ` Jani Nikula
2026-04-07 15:57 ` ✗ CI.checkpatch: warning for drm/i915/fb: Prep work for more generic remapping support Patchwork
2026-04-07 15:58 ` ✓ CI.KUnit: success " Patchwork
2026-04-07 16:37 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-07 18:51 ` ✓ i915.CI.BAT: " Patchwork
2026-04-07 19:34 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-08 1:31 ` ✓ i915.CI.Full: " Patchwork
2026-04-10 11:25 ` [PATCH 00/12] " 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=adY700Bp2S4UMi-9@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.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.