All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.william.auld@gmail.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
	"Matthew Auld" <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 00/12] DG1/LMEM uAPI basics
Date: Wed, 19 May 2021 12:36:17 +0100	[thread overview]
Message-ID: <CAM0jSHMi3YFfyQkh8hqeCGr4DRGB=BfY+38dUZnVaynmABDtvw@mail.gmail.com> (raw)
In-Reply-To: <YKTwKjkUM7nhKmlD@platvala-desk.ger.corp.intel.com>

On Wed, 19 May 2021 at 12:00, Petri Latvala <petri.latvala@intel.com> wrote:
>
> On Wed, May 19, 2021 at 11:45:17AM +0100, Matthew Auld wrote:
> > On Wed, 19 May 2021 at 09:49, Petri Latvala <petri.latvala@intel.com> wrote:
> > >
> > > On Wed, May 19, 2021 at 09:13:37AM +0100, Matthew Auld wrote:
> > > > On Tue, 11 May 2021 at 17:52, Matthew Auld <matthew.auld@intel.com> wrote:
> > > > >
> > > > > Just the really basic stuff, which unlocks adding more interesting testcases
> > > > > later, like gem_lmem_swapping.
> > > > >
> > > > > On the kernel side we landed the uAPI bits[1] behind CONFIG_BROKEN, which is
> > > > > already enabled in CI builds, so it should be possible to get some more BAT
> > > > > testing(outside of just the selftests) on DG1 to the point where we can start to
> > > > > exercise the LMEM paths with the new bits of uAPI.
> > > > >
> > > > > [1] https://patchwork.freedesktop.org/series/89648/
> > > >
> > > > Petri, any thoughts on this series? As an initial step we just need
> > > > some way to start exercising the new bits of uAPI, and from that we
> > > > can add more interesting test cases.
> > >
> > > This series is in a confused state. First there's the addition of
> > > local definitions and ioctl tokens, then they are replaced with the
> > > proper stuff...
> >
> > Yeah, I think that's how it is internally. Maybe the idea with that
> > was to somehow land the igt changes first, before the kernel stuff
> > potentially landed? I can clean this up and just start with the proper
> > stuff.
> >
> > >
> > > When this was starting to get developed the idea was to avoid icky
> > > cases that break _testing_. Not tests, testing. Remember when engine
> > > discovery was being developed and we had cases where for_each_engine
> > > loop didn't progress, causing stuff like
> > >
> > > for_each_engine(...)
> > >  igt_subtest(...)
> > >
> > > to never enter a subtest?
> > >
> > > Pushing for stubbing memory regions ultimately wanted to avoid cases
> > > where for_each_combination(memregions) breaks test enumeration.
> > >
> > > It all boils down to: Can that break? Can we have cases where the
> > > query gives garbage? Can it give two million smem regions? Can it give
> > > 0 regions, or -1 regions? And what happens then?
> >
> > On integrated platforms it can only return one region: smem. If we
> > somehow don't have a smem region then the i915 module load would have
> > failed, since we must have been unable to populate the
> > i915->mm.regions. On DG1 we just get the extra lmem region, and for Xe
> > HP multi-tile we get a few more lmem regions, but again if we can't
> > populate the i915->mm.regions with the required regions then we fail
> > driver init. The only "optional" region is stolen memory, but for that
> > we don't expose it to userspace.
> >
> > The query will fail on !CONFIG_BROKEN kernels though, where it just
> > returns -ENODEV, or of course some other error if the user provided an
> > invalid query.
>
> Behaviour between success/failure is business as usual. The danger in
> the initial discussions for this was token value overloading or such,
> stuff like IGT thinking it's calling DRM_IOCTL_DISTANCE_TO_LUNCHTIME
> but that value was meanwhile taken by
> DRM_IOCTL_HALT_AND_CATCH_FIRE. Of course the query change is not a new
> ioctl but is value mismatch a possibility in a theoretical worst case
> and how does the breakage show in testing?

Hmm, do you mean if we decide to change the uAPI before dropping the
CONFIG_BROKEN? That's for sure a possibility.

Maybe we can do something like the prelim thing?

/** XXX: these are subject to change, hence leaving some holes */
I915_GEM_CREATE_EXT_MEMORY_REGIONS 0xff
DRM_I915_QUERY_MEMORY_REGIONS 0xff

That way, if we do need to change anything here we can add the new
version(using the lowest available value at the time) and also keep
the old version which should be backwards compat, then migrate igt
over to the new and then drop the old from the kernel? And then at
some point also drop CONFIG_BROKEN once the uAPI is final?

I think it should be the case that all other related values are
effectively namespaced within that.

>
>
> --
> Petri Latvala
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Matthew Auld <matthew.william.auld@gmail.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Daniel Vetter" <daniel@ffwll.ch>
Subject: Re: [igt-dev] [PATCH i-g-t 00/12] DG1/LMEM uAPI basics
Date: Wed, 19 May 2021 12:36:17 +0100	[thread overview]
Message-ID: <CAM0jSHMi3YFfyQkh8hqeCGr4DRGB=BfY+38dUZnVaynmABDtvw@mail.gmail.com> (raw)
In-Reply-To: <YKTwKjkUM7nhKmlD@platvala-desk.ger.corp.intel.com>

On Wed, 19 May 2021 at 12:00, Petri Latvala <petri.latvala@intel.com> wrote:
>
> On Wed, May 19, 2021 at 11:45:17AM +0100, Matthew Auld wrote:
> > On Wed, 19 May 2021 at 09:49, Petri Latvala <petri.latvala@intel.com> wrote:
> > >
> > > On Wed, May 19, 2021 at 09:13:37AM +0100, Matthew Auld wrote:
> > > > On Tue, 11 May 2021 at 17:52, Matthew Auld <matthew.auld@intel.com> wrote:
> > > > >
> > > > > Just the really basic stuff, which unlocks adding more interesting testcases
> > > > > later, like gem_lmem_swapping.
> > > > >
> > > > > On the kernel side we landed the uAPI bits[1] behind CONFIG_BROKEN, which is
> > > > > already enabled in CI builds, so it should be possible to get some more BAT
> > > > > testing(outside of just the selftests) on DG1 to the point where we can start to
> > > > > exercise the LMEM paths with the new bits of uAPI.
> > > > >
> > > > > [1] https://patchwork.freedesktop.org/series/89648/
> > > >
> > > > Petri, any thoughts on this series? As an initial step we just need
> > > > some way to start exercising the new bits of uAPI, and from that we
> > > > can add more interesting test cases.
> > >
> > > This series is in a confused state. First there's the addition of
> > > local definitions and ioctl tokens, then they are replaced with the
> > > proper stuff...
> >
> > Yeah, I think that's how it is internally. Maybe the idea with that
> > was to somehow land the igt changes first, before the kernel stuff
> > potentially landed? I can clean this up and just start with the proper
> > stuff.
> >
> > >
> > > When this was starting to get developed the idea was to avoid icky
> > > cases that break _testing_. Not tests, testing. Remember when engine
> > > discovery was being developed and we had cases where for_each_engine
> > > loop didn't progress, causing stuff like
> > >
> > > for_each_engine(...)
> > >  igt_subtest(...)
> > >
> > > to never enter a subtest?
> > >
> > > Pushing for stubbing memory regions ultimately wanted to avoid cases
> > > where for_each_combination(memregions) breaks test enumeration.
> > >
> > > It all boils down to: Can that break? Can we have cases where the
> > > query gives garbage? Can it give two million smem regions? Can it give
> > > 0 regions, or -1 regions? And what happens then?
> >
> > On integrated platforms it can only return one region: smem. If we
> > somehow don't have a smem region then the i915 module load would have
> > failed, since we must have been unable to populate the
> > i915->mm.regions. On DG1 we just get the extra lmem region, and for Xe
> > HP multi-tile we get a few more lmem regions, but again if we can't
> > populate the i915->mm.regions with the required regions then we fail
> > driver init. The only "optional" region is stolen memory, but for that
> > we don't expose it to userspace.
> >
> > The query will fail on !CONFIG_BROKEN kernels though, where it just
> > returns -ENODEV, or of course some other error if the user provided an
> > invalid query.
>
> Behaviour between success/failure is business as usual. The danger in
> the initial discussions for this was token value overloading or such,
> stuff like IGT thinking it's calling DRM_IOCTL_DISTANCE_TO_LUNCHTIME
> but that value was meanwhile taken by
> DRM_IOCTL_HALT_AND_CATCH_FIRE. Of course the query change is not a new
> ioctl but is value mismatch a possibility in a theoretical worst case
> and how does the breakage show in testing?

Hmm, do you mean if we decide to change the uAPI before dropping the
CONFIG_BROKEN? That's for sure a possibility.

Maybe we can do something like the prelim thing?

/** XXX: these are subject to change, hence leaving some holes */
I915_GEM_CREATE_EXT_MEMORY_REGIONS 0xff
DRM_I915_QUERY_MEMORY_REGIONS 0xff

That way, if we do need to change anything here we can add the new
version(using the lowest available value at the time) and also keep
the old version which should be backwards compat, then migrate igt
over to the new and then drop the old from the kernel? And then at
some point also drop CONFIG_BROKEN once the uAPI is final?

I think it should be the case that all other related values are
effectively namespaced within that.

>
>
> --
> Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2021-05-19 11:36 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 16:51 [Intel-gfx] [PATCH i-g-t 00/12] DG1/LMEM uAPI basics Matthew Auld
2021-05-11 16:51 ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 01/12] lib/i915/gem_create: Add gem_create_ext Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 02/12] lib/i915/intel_memory_region: Add memory regions stubs Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 03/12] tests/gem_gpgpu_fill: Convert from simple to standard igt_main Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 04/12] tests/i915/gem_exec_basic: Use memory region interface Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 05/12] tests/i915/gem_gpgpu_fill: " Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 06/12] tests/i915/gem_media_fill: " Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 07/12] i915_drm.h sync Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-19  8:19   ` [Intel-gfx] " Petri Latvala
2021-05-19  8:19     ` [igt-dev] " Petri Latvala
2021-05-19  8:25     ` [Intel-gfx] " Jani Nikula
2021-05-19  8:25       ` [igt-dev] " Jani Nikula
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 08/12] Synchronize memory region uapi and tests with i915_drm.h Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 09/12] lib/i915/intel_memory_region/dg1: Add new lib to query memory region Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 10/12] tests/i915/gem_create: exercise placements extension Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 11/12] lib/i915/intel_memory_region: Add new macros and support for igt_collection Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 16:51 ` [Intel-gfx] [PATCH i-g-t 12/12] tests/i915/gem_exec_basic/dg1: Iterate over all memory regions Matthew Auld
2021-05-11 16:51   ` [igt-dev] " Matthew Auld
2021-05-11 17:52 ` [igt-dev] ✗ Fi.CI.BAT: failure for DG1/LMEM uAPI basics Patchwork
2021-05-19  8:13 ` [Intel-gfx] [igt-dev] [PATCH i-g-t 00/12] " Matthew Auld
2021-05-19  8:50   ` Petri Latvala
2021-05-19 10:45     ` Matthew Auld
2021-05-19 10:45       ` Matthew Auld
2021-05-19 11:02       ` [Intel-gfx] " Petri Latvala
2021-05-19 11:02         ` Petri Latvala
2021-05-19 11:36         ` Matthew Auld [this message]
2021-05-19 11:36           ` Matthew Auld
2021-05-19 12:07           ` [Intel-gfx] " Petri Latvala
2021-05-19 12:07             ` Petri Latvala

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='CAM0jSHMi3YFfyQkh8hqeCGr4DRGB=BfY+38dUZnVaynmABDtvw@mail.gmail.com' \
    --to=matthew.william.auld@gmail.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=petri.latvala@intel.com \
    --cc=thomas.hellstrom@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.