From: Jordan Justen <jordan.l.justen@intel.com> To: Daniel Vetter <daniel@ffwll.ch>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, Andi Shyti <andi.shyti@linux.intel.com>, "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>, "Roper, Matthew D" <matthew.d.roper@intel.com>, Intel-gfx@lists.freedesktop.org, DRI Development <dri-devel@lists.freedesktop.org>, "Yang, Fei" <fei.yang@intel.com>, Chris Wilson <chris.p.wilson@linux.intel.com>, Faith Ekstrand <faith.ekstrand@collabora.com>, "Das, Nirmoy" <nirmoy.das@intel.com> Subject: Re: IOCTL feature detection (Was: Re: [Intel-gfx] [PATCH 8/8] drm/i915: Allow user to set cache at BO creation) Date: Wed, 26 Apr 2023 13:04:45 -0700 [thread overview] Message-ID: <168253948596.392286.2237664538921869335@jljusten-skl> (raw) In-Reply-To: <ZEkQi6Zrb6lR4DEm@phenom.ffwll.local> On 2023-04-26 04:52:43, Daniel Vetter wrote: > > Joonas asked me to put my thoughts here: > > - in general the "feature discovery by trying it out" approach is most > robust and hence preferred, but it's also not something that's required > when there's good reasons against it More robust in what sense? Userspace has to set up some scenario to use the interface, which hopefully is not too complex. It's difficult to predict what it may look like in the future since we are talking about undefined extensions. Userspace has to rely on the kernel making creating and destroying this thing essentially free. For I915_GEM_CREATE_EXT_PROTECTED_CONTENT, that did not work out. For I915_GEM_CREATE_EXT_SET_PAT, just wondering, since the PAT indices are platform specific, what might happen if we tried to choose some common index value to detect the extension in a generic manner? Could it potentially lead to unexpected behavior, or maybe just an error. I guess it's really extension specific what kind of issues potentially could arise. > tldr; prefer discovery, don't sweat it if not, definitely don't > overengineer this with some magic "give me all extensions" thing because > that results in guaranteed cross-component backporting pains sooner or > later. Or inconsistency, which defeats the point. I guess I don't know the full context of your concerns here. For returning the gem-create extensions, isn't this just a matter of returning the valid indices to the create_extensions array in i915_gem_create.c? Is that an over-engineered query? It seems weird that there's a reasonably well defined "extension" mechanism here, but no way for the kernel to just tell us what extensions it knows about. -Jordan
WARNING: multiple messages have this Message-ID (diff)
From: Jordan Justen <jordan.l.justen@intel.com> To: Daniel Vetter <daniel@ffwll.ch>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>, "Roper, Matthew D" <matthew.d.roper@intel.com>, Intel-gfx@lists.freedesktop.org, DRI Development <dri-devel@lists.freedesktop.org>, Chris Wilson <chris.p.wilson@linux.intel.com>, Faith Ekstrand <faith.ekstrand@collabora.com>, "Das, Nirmoy" <nirmoy.das@intel.com> Subject: Re: [Intel-gfx] IOCTL feature detection (Was: Re: [PATCH 8/8] drm/i915: Allow user to set cache at BO creation) Date: Wed, 26 Apr 2023 13:04:45 -0700 [thread overview] Message-ID: <168253948596.392286.2237664538921869335@jljusten-skl> (raw) In-Reply-To: <ZEkQi6Zrb6lR4DEm@phenom.ffwll.local> On 2023-04-26 04:52:43, Daniel Vetter wrote: > > Joonas asked me to put my thoughts here: > > - in general the "feature discovery by trying it out" approach is most > robust and hence preferred, but it's also not something that's required > when there's good reasons against it More robust in what sense? Userspace has to set up some scenario to use the interface, which hopefully is not too complex. It's difficult to predict what it may look like in the future since we are talking about undefined extensions. Userspace has to rely on the kernel making creating and destroying this thing essentially free. For I915_GEM_CREATE_EXT_PROTECTED_CONTENT, that did not work out. For I915_GEM_CREATE_EXT_SET_PAT, just wondering, since the PAT indices are platform specific, what might happen if we tried to choose some common index value to detect the extension in a generic manner? Could it potentially lead to unexpected behavior, or maybe just an error. I guess it's really extension specific what kind of issues potentially could arise. > tldr; prefer discovery, don't sweat it if not, definitely don't > overengineer this with some magic "give me all extensions" thing because > that results in guaranteed cross-component backporting pains sooner or > later. Or inconsistency, which defeats the point. I guess I don't know the full context of your concerns here. For returning the gem-create extensions, isn't this just a matter of returning the valid indices to the create_extensions array in i915_gem_create.c? Is that an over-engineered query? It seems weird that there's a reasonably well defined "extension" mechanism here, but no way for the kernel to just tell us what extensions it knows about. -Jordan
next prev parent reply other threads:[~2023-04-26 20:04 UTC|newest] Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-19 23:00 [PATCH 0/8] drm/i915/mtl: Define MOCS and PAT tables for MTL fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-19 23:00 ` [PATCH 1/8] drm/i915/mtl: Set has_llc=0 fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 10:20 ` Das, Nirmoy 2023-04-20 10:20 ` Das, Nirmoy 2023-04-19 23:00 ` [PATCH 2/8] drm/i915/mtl: Define MOCS and PAT tables for MTL fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 20:29 ` Matt Roper 2023-04-19 23:00 ` [PATCH 3/8] drm/i915/mtl: Add PTE encode function fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 20:40 ` Matt Roper 2023-04-21 17:27 ` Yang, Fei 2023-04-21 17:42 ` Matt Roper 2023-04-23 7:37 ` Yang, Fei 2023-04-23 7:37 ` Yang, Fei 2023-04-24 17:20 ` Matt Roper 2023-04-24 18:41 ` Yang, Fei 2023-04-19 23:00 ` [PATCH 4/8] drm/i915/mtl: workaround coherency issue for Media fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 8:26 ` Andrzej Hajda 2023-04-20 11:36 ` Das, Nirmoy 2023-04-20 11:36 ` Das, Nirmoy 2023-04-20 20:52 ` Matt Roper 2023-04-19 23:00 ` [PATCH 5/8] drm/i915/mtl: end support for set caching ioctl fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 21:05 ` Matt Roper 2023-04-19 23:00 ` [PATCH 6/8] drm/i915: preparation for using PAT index fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 8:45 ` Andrzej Hajda 2023-04-20 21:14 ` Matt Roper 2023-04-19 23:00 ` [PATCH 7/8] drm/i915: use pat_index instead of cache_level fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 10:13 ` Andrzej Hajda 2023-04-20 12:39 ` Tvrtko Ursulin 2023-04-20 20:34 ` Yang, Fei 2023-04-21 8:43 ` Tvrtko Ursulin 2023-04-21 10:17 ` Tvrtko Ursulin 2023-04-23 6:12 ` Yang, Fei 2023-04-23 6:12 ` Yang, Fei 2023-04-24 8:41 ` Tvrtko Ursulin 2023-04-21 11:39 ` Tvrtko Ursulin 2023-04-23 6:52 ` Yang, Fei 2023-04-23 6:52 ` Yang, Fei 2023-04-24 9:22 ` Tvrtko Ursulin 2023-04-19 23:00 ` [PATCH 8/8] drm/i915: Allow user to set cache at BO creation fei.yang 2023-04-19 23:00 ` [Intel-gfx] " fei.yang 2023-04-20 11:39 ` Andi Shyti 2023-04-20 11:39 ` [Intel-gfx] " Andi Shyti 2023-04-20 13:06 ` Tvrtko Ursulin 2023-04-20 16:11 ` Yang, Fei 2023-04-20 16:29 ` Andi Shyti 2023-04-20 16:29 ` Andi Shyti 2023-04-21 20:48 ` Jordan Justen 2023-04-21 20:48 ` Jordan Justen [not found] ` <BYAPR11MB2567F03AD43D7E2DE2628D5D9A669@BYAPR11MB2567.namprd11.prod.outlook.com> [not found] ` <168232538771.392286.3227368099155268955@jljusten-skl> 2023-04-24 9:08 ` Tvrtko Ursulin 2023-04-24 9:08 ` Tvrtko Ursulin 2023-04-24 17:13 ` Jordan Justen 2023-04-24 17:13 ` Jordan Justen 2023-04-25 13:41 ` IOCTL feature detection (Was: Re: [Intel-gfx] [PATCH 8/8] drm/i915: Allow user to set cache at BO creation) Joonas Lahtinen 2023-04-25 13:41 ` [Intel-gfx] IOCTL feature detection (Was: " Joonas Lahtinen 2023-04-25 17:21 ` IOCTL feature detection (Was: Re: [Intel-gfx] " Teres Alexis, Alan Previn 2023-04-25 17:21 ` [Intel-gfx] IOCTL feature detection (Was: " Teres Alexis, Alan Previn 2023-04-25 18:19 ` IOCTL feature detection (Was: Re: [Intel-gfx] " Jordan Justen 2023-04-25 18:19 ` [Intel-gfx] IOCTL feature detection (Was: " Jordan Justen 2023-04-26 11:52 ` IOCTL feature detection (Was: Re: [Intel-gfx] " Daniel Vetter 2023-04-26 11:52 ` [Intel-gfx] IOCTL feature detection (Was: " Daniel Vetter 2023-04-26 16:48 ` IOCTL feature detection (Was: Re: [Intel-gfx] " Teres Alexis, Alan Previn 2023-04-26 16:48 ` [Intel-gfx] IOCTL feature detection (Was: " Teres Alexis, Alan Previn 2023-04-26 18:10 ` IOCTL feature detection (Was: Re: [Intel-gfx] " Ceraolo Spurio, Daniele 2023-04-26 18:10 ` [Intel-gfx] IOCTL feature detection (Was: " Ceraolo Spurio, Daniele 2023-04-26 20:04 ` Jordan Justen [this message] 2023-04-26 20:04 ` Jordan Justen 2023-04-19 23:29 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/mtl: Define MOCS and PAT tables for MTL (rev8) Patchwork 2023-04-19 23:51 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork 2023-04-20 11:30 ` [Intel-gfx] [PATCH 0/8] drm/i915/mtl: Define MOCS and PAT tables for MTL Andi Shyti
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=168253948596.392286.2237664538921869335@jljusten-skl \ --to=jordan.l.justen@intel.com \ --cc=Intel-gfx@lists.freedesktop.org \ --cc=alan.previn.teres.alexis@intel.com \ --cc=andi.shyti@linux.intel.com \ --cc=chris.p.wilson@linux.intel.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=faith.ekstrand@collabora.com \ --cc=fei.yang@intel.com \ --cc=joonas.lahtinen@linux.intel.com \ --cc=matthew.d.roper@intel.com \ --cc=nirmoy.das@intel.com \ --cc=tvrtko.ursulin@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: linkBe 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.