[Intel-gfx] [PATCH 0/5] drm/i915: Get rid of fence error propagation

2021-06-02 Thread Jason Ekstrand
#x27;m not 100% sure where the Linux release cuts land. In any case, I'm happy to make a version of this series per-release if needed for Greg to back-port. Cc: Daniel Vetter Cc: Jon Bloomfield Jason Ekstrand (5): drm/i915: Revert "drm/i915/gem: Asynchronous cmdpar

[Intel-gfx] [PATCH 1/5] drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"

2021-06-02 Thread Jason Ekstrand
. Now that everything is synchronous, we don't need it. Signed-off-by: Jason Ekstrand Cc: Maarten Lankhorst Reviewed-by: Jon Bloomfield --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 227 +- .../i915/gem/selftests/i915_gem_execbuffer.c | 4 + drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 2/5] drm/i915: Remove allow_alloc from i915_gem_object_get_sg*

2021-06-02 Thread Jason Ekstrand
ned-off-by: Jason Ekstrand Cc: Maarten Lankhorst Reviewed-by: Jon Bloomfield --- drivers/gpu/drm/i915/gem/i915_gem_object.h | 10 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 21 - drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- 3 files changed, 10 insertions(+), 23

[Intel-gfx] [PATCH 3/5] drm/i915: Drop error handling from dma_fence_work

2021-06-02 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand Reviewed-by: Jon Bloomfield --- drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 4 +--- drivers/gpu/drm/i915/i915_sw_fence_work.c | 5 + drivers/gpu/drm/i915/i915_sw_fence_work.h | 2 +- drivers/gpu/drm/i915/i915_vma.c | 3 +-- 4 files changed, 4

[Intel-gfx] [PATCH 4/5] Revert "drm/i915: Propagate errors on awaiting already signaled fences"

2021-06-02 Thread Jason Ekstrand
Jason Ekstrand Reported-by: Marcin Slusarz Cc: # v5.6+ Cc: Jason Ekstrand Cc: Marcin Slusarz Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3080 Fixes: 9e31c1fe45d5 ("drm/i915: Propagate errors on awaiting already signaled fences") Signed-off-by: Daniel Vetter Reviewed-by:

[Intel-gfx] [PATCH 5/5] Revert "drm/i915: Skip over MI_NOOP when parsing"

2021-06-02 Thread Jason Ekstrand
that's not a case we should optimize for in the kernel. We should optimize for code clarity instead. Signed-off-by: Jason Ekstrand Reviewed-by: Jon Bloomfield --- drivers/gpu/drm/i915/i915_cmd_parser.c | 67 +- 1 file changed, 34 insertions(+), 33 deletions(-) diff

Re: [Intel-gfx] [PATCH 16/29] drm/i915/gem: Add an intermediate proto_context struct

2021-06-02 Thread Jason Ekstrand
On Mon, May 31, 2021 at 3:47 AM Daniel Vetter wrote: > > On Thu, May 27, 2021 at 11:26:37AM -0500, Jason Ekstrand wrote: > > The current context uAPI allows for two methods of setting context > > parameters: SET_CONTEXT_PARAM and CONTEXT_CREATE_EXT_SETPARAM. The > >

Re: [Intel-gfx] [PATCH 16/27] drm/i915/gem: Add an intermediate proto_context struct

2021-06-02 Thread Jason Ekstrand
On Tue, May 4, 2021 at 11:13 AM Daniel Vetter wrote: > > On Mon, May 03, 2021 at 10:57:37AM -0500, Jason Ekstrand wrote: > > The current context uAPI allows for two methods of setting context > > parameters: SET_CONTEXT_PARAM and CONTEXT_CREATE_EXT_SETPARAM. The > >

Re: [Intel-gfx] [PATCH 18/29] drm/i915/gem: Optionally set SSEU in intel_context_set_gem

2021-06-02 Thread Jason Ekstrand
On Mon, May 31, 2021 at 3:48 AM Daniel Vetter wrote: > > On Thu, May 27, 2021 at 11:26:39AM -0500, Jason Ekstrand wrote: > > For now this is a no-op because everyone passes in a null SSEU but it > > lets us get some of the error handling and selftest refactoring p

Re: [Intel-gfx] [PATCH 21/29] drm/i915/gem: Use the proto-context to handle create parameters (v2)

2021-06-02 Thread Jason Ekstrand
On Mon, May 31, 2021 at 4:12 AM Daniel Vetter wrote: > > On Thu, May 27, 2021 at 11:26:42AM -0500, Jason Ekstrand wrote: > > This means that the proto-context needs to grow support for engine > > configuration information as well as setparam logic. Fortunately, we'll &

Re: [Intel-gfx] [PATCH 24/29] drm/i915/gem: Delay context creation

2021-06-02 Thread Jason Ekstrand
On Mon, May 31, 2021 at 4:50 AM Daniel Vetter wrote: > > On Thu, May 27, 2021 at 11:26:45AM -0500, Jason Ekstrand wrote: > > The current context uAPI allows for two methods of setting context > > parameters: SET_CONTEXT_PARAM and CONTEXT_CREATE_EXT_SETPARAM. The > >

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"

2021-06-03 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 3:22 AM Daniel Vetter wrote: > > On Wed, Jun 02, 2021 at 11:41:45AM -0500, Jason Ekstrand wrote: > > This reverts 686c7c35abc2 ("drm/i915/gem: Asynchronous cmdparser"). The > > justification for this commit in the git history was a vague comm

Re: [Intel-gfx] [PATCH 4/5] Revert "drm/i915: Propagate errors on awaiting already signaled fences"

2021-06-03 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 3:28 AM Daniel Vetter wrote: > > On Thu, Jun 03, 2021 at 10:25:00AM +0200, Daniel Vetter wrote: > > On Thu, Jun 03, 2021 at 10:24:21AM +0200, Daniel Vetter wrote: > > > On Wed, Jun 02, 2021 at 11:41:48AM -0500, Jason Ekstrand wrote: > &

[Intel-gfx] [PATCH 0/5] drm/i915: Get rid of fence error propagation (v2)

2021-06-03 Thread Jason Ekstrand
#x27;m not 100% sure where the Linux release cuts land. In any case, I'm happy to make a version of this series per-release if needed for Greg to back-port. v2 (Daniel Vetter): - Re-order to put the reverts first - Add ACKs from Daniel - Add better CC and Fixes tags Cc: Daniel Vetter Cc:

[Intel-gfx] [PATCH 1/5] drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"

2021-06-03 Thread Jason Ekstrand
. Now that everything is synchronous, we don't need it. v2 (Daniel Vetter): - Add stabel Cc and Fixes tag Signed-off-by: Jason Ekstrand Cc: # v5.6+ Fixes: 9e31c1fe45d5 ("drm/i915: Propagate errors on awaiting already signaled fences") Cc: Maarten Lankhorst Reviewed-by:

[Intel-gfx] [PATCH 2/5] Revert "drm/i915: Propagate errors on awaiting already signaled fences"

2021-06-03 Thread Jason Ekstrand
ri-devel/20210602164149.391653-2-ja...@jlekstrand.net/ for otherwise backporting just this patch opens up a security bug. v2: Augment commit message. Also restore Jason's sob that I accidentally lost. v3: Add a note for backporters Signed-off-by: Jason Ekstrand Reported-by: Marcin Slusarz Cc: # v5.6

[Intel-gfx] [PATCH 3/5] drm/i915: Remove allow_alloc from i915_gem_object_get_sg*

2021-06-03 Thread Jason Ekstrand
ned-off-by: Jason Ekstrand Cc: Maarten Lankhorst Reviewed-by: Jon Bloomfield Acked-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_object.h | 10 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 21 - drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- 3 files c

[Intel-gfx] [PATCH 4/5] drm/i915: Drop error handling from dma_fence_work

2021-06-03 Thread Jason Ekstrand
Asynchronous command parsing was the only thing which ever returned a non-zero error. With that gone, we can drop the error handling from dma_fence_work. Signed-off-by: Jason Ekstrand Reviewed-by: Jon Bloomfield Acked-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 4

[Intel-gfx] [PATCH 5/5] Revert "drm/i915: Skip over MI_NOOP when parsing"

2021-06-03 Thread Jason Ekstrand
that's not a case we should optimize for in the kernel. We should optimize for code clarity instead. Signed-off-by: Jason Ekstrand Reviewed-by: Jon Bloomfield Acked-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_cmd_parser.c | 67 +- 1 file changed, 34 insertions(+

Re: [Intel-gfx] [PATCH 21/29] drm/i915/gem: Use the proto-context to handle create parameters (v2)

2021-06-03 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 2:32 AM Daniel Vetter wrote: > > On Thu, Jun 3, 2021 at 12:23 AM Jason Ekstrand wrote: > > > > On Mon, May 31, 2021 at 4:12 AM Daniel Vetter wrote: > > > > > > On Thu, May 27, 2021 at 11:26:42AM -0500, Jason Ekstrand wrote: > > &g

Re: [Intel-gfx] [PATCH 9/9] drm/i915/doc: Add kernel doc for i915_sched_engine

2021-06-04 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost wrote: > > Signed-off-by: Matthew Brost > --- > Documentation/gpu/i915.rst | 6 > drivers/gpu/drm/i915/i915_scheduler_types.h | 37 ++--- > 2 files changed, 38 insertions(+), 5 deletions(-) > > diff --git a/Docum

Re: [Intel-gfx] [PATCH 1/9] drm/i915: Move priolist to new i915_sched_engine object

2021-06-04 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost wrote: > > Introduce i915_sched_engine object which is lower level data structure > that i915_scheduler / generic code can operate on without touching > execlist specific structures. This allows additional submission backends > to be added without break

Re: [Intel-gfx] [PATCH 2/9] drm/i915: Add i915_sched_engine_is_empty function

2021-06-04 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost wrote: > > Add wrapper function around RB tree to determine if i915_sched_engine is > empty. > > Signed-off-by: Matthew Brost > --- > drivers/gpu/drm/i915/gt/intel_engine_cs.c| 2 +- >

Re: [Intel-gfx] [PATCH 1/9] drm/i915: Move priolist to new i915_sched_engine object

2021-06-04 Thread Jason Ekstrand
On Fri, Jun 4, 2021 at 12:42 PM Matthew Brost wrote: > > On Fri, Jun 04, 2021 at 12:38:22PM -0500, Jason Ekstrand wrote: > > On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost > > wrote: > > > > > > Introduce i915_sched_engine object which is lower level data

Re: [Intel-gfx] [PATCH 1/9] drm/i915: Move priolist to new i915_sched_engine object

2021-06-04 Thread Jason Ekstrand
On Fri, Jun 4, 2021 at 12:59 PM Matthew Brost wrote: > > On Fri, Jun 04, 2021 at 12:51:43PM -0500, Jason Ekstrand wrote: > > On Fri, Jun 4, 2021 at 12:42 PM Matthew Brost > > wrote: > > > > > > On Fri, Jun 04, 2021 at 12:38:22PM -0500, Jason Ekstrand wrote:

Re: [Intel-gfx] [PATCH 3/9] drm/i915: Add i915_sched_engine_reset_on_empty function

2021-06-04 Thread Jason Ekstrand
eems reasonable, I think. I'm by no means an expert but Reviewed-by: Jason Ekstrand anyway. My one suggestion would be to tweak the commit message to talk about the functional change rather than the helper. Something like drm/i915: Reset sched_engine.no_priolist immediately after dequeu

Re: [Intel-gfx] [PATCH 4/9] drm/i915: Move active tracking to i915_sched_engine

2021-06-04 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost wrote: > > Move active request tracking and its lock to i915_sched_engine. This > lock is also the submission lock so having it in the i915_sched_engine > is the correct place. > > Signed-off-by: Matthew Brost > --- > drivers/gpu/drm/i915/gt/intel_eng

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Move engine->schedule to i915_sched_engine

2021-06-04 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost wrote: > > The schedule function should be in the schedule object. > > Signed-off-by: Matthew Brost > --- > drivers/gpu/drm/i915/gem/i915_gem_wait.c | 4 ++-- > drivers/gpu/drm/i915/gt/intel_engine_cs.c| 3 --- > drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Add kick_backend function to i915_sched_engine

2021-06-04 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost wrote: > > Rather than touching execlist specific structures in the generic > scheduling code, add a callback function in the backend. Seems reasonable but why does the function that's there today do nothing for the ringbuffer and current GuC back-ends

Re: [Intel-gfx] [PATCH 7/9] drm/i915: Update i915_scheduler to operate on i915_sched_engine

2021-06-04 Thread Jason Ekstrand
t i915_sched_node *node, > * engine lock. The simple ploy we use is to take the lock then > * check that the rq still belongs to the newly locked engine. > */ > - while (locked != (engine = READ_ONCE(rq->engine))) { > -

Re: [Intel-gfx] [PATCH 8/9] drm/i915: Move submission tasklet to i915_sched_engine

2021-06-04 Thread Jason Ekstrand
On Thu, Jun 3, 2021 at 4:09 PM Matthew Brost wrote: > > The submission tasklet operates on i915_sched_engine, thus it is the > correct place for it. > > Signed-off-by: Matthew Brost > --- > drivers/gpu/drm/i915/gt/intel_engine.h| 14 --- > drivers/gpu/drm/i915/gt/intel_engine_cs.c |

[Intel-gfx] [PATCH 00/31] drm/i915/gem: ioctl clean-ups (v6)

2021-06-08 Thread Jason Ekstrand
xt. 3. Get rid of the separation between context close and context destroy 4. Get rid of the RCU on i915_gem_context However, these should probably be done as a separate patch series as this one is already starting to get longish, especially if you consider the 89 IGT patches that go along w

[Intel-gfx] [PATCH 01/31] drm/i915: Drop I915_CONTEXT_PARAM_RINGSIZE

2021-06-08 Thread Jason Ekstrand
really care about solving this problem, they can do it properly. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/gem/i915_gem_context.c | 85 +-- drivers/gpu/drm/i915/gt/intel_conte

[Intel-gfx] [PATCH 02/31] drm/i915: Stop storing the ring size in the ring pointer (v2)

2021-06-08 Thread Jason Ekstrand
patch adds a new ring_size field and makes everything use that. v2 (Daniel Vetter): - Replace 512 * SZ_4K with SZ_2M Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 3 +-- drivers/gpu/drm/i915/gt/intel_context.c | 3

[Intel-gfx] [PATCH 03/31] drm/i915: Drop I915_CONTEXT_PARAM_NO_ZEROMAP

2021-06-08 Thread Jason Ekstrand
ml [2]: https://lists.freedesktop.org/archives/intel-gfx/2015-May/067031.html Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 16 ++-- .../gpu/drm/i915/gem/i915_gem_context_types.h| 1 - drivers/gpu/drm/i91

[Intel-gfx] [PATCH 04/31] drm/i915/gem: Set the watchdog timeout directly in intel_context_set_gem (v2)

2021-06-08 Thread Jason Ekstrand
e races setting request_timeout_ms and context creation, they can theoretically end up with different timeouts. However, since both of these are fairly harmless and require changing kernel params, we don't care. v2 (Tvrtko Ursulin): - Add a comment about races with request_timeout_ms

[Intel-gfx] [PATCH 05/31] drm/i915/gem: Return void from context_apply_all

2021-06-08 Thread Jason Ekstrand
None of the callbacks we use with it return an error code anymore; they all return 0 unconditionally. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 26 +++-- 1 file changed, 8 insertions(+), 18 deletions(-) diff

[Intel-gfx] [PATCH 07/31] drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)

2021-06-08 Thread Jason Ekstrand
text::syncobj to mention that it's an emulation and the possible race if userspace calls execbuffer2 twice on the same context concurrently. v2 (Jason Ekstrand): - Wrap the checks for eb.gem_context->syncobj in unlikely() - Drop the dma_fence reference - Improved commit message v3

[Intel-gfx] [PATCH 06/31] drm/i915: Drop the CONTEXT_CLONE API (v2)

2021-06-08 Thread Jason Ekstrand
imeline, they can use a syncobj and set it as an in and out fence on every submit. v2 (Jason Ekstrand): - More detailed commit message Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 199 +- .../drm/i915/gt/

[Intel-gfx] [PATCH 08/31] drm/i915: Drop getparam support for I915_CONTEXT_PARAM_ENGINES

2021-06-08 Thread Jason Ekstrand
data so it's not useful for discovering what engines are in the context. It's also not a replacement for the recently removed I915_CONTEXT_CLONE_ENGINES because it doesn't return any of the balancing or bonding information. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter -

[Intel-gfx] [PATCH 09/31] drm/i915/gem: Disallow bonding of virtual engines (v3)

2021-06-08 Thread Jason Ekstrand
he bonding information. v2 (Jason Ekstrand): - Don't delete quite as much code. v3 (Tvrtko Ursulin): - Add some history to the commit message Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 18 +- .../drm/i915/gt/intel_execlists_subm

[Intel-gfx] [PATCH 10/31] drm/i915/gem: Remove engine auto-magic with FENCE_SUBMIT (v2)

2021-06-08 Thread Jason Ekstrand
Vetter): - Mention the exact IGT test this breaks Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_types.h| 7 --- .../drm/i915/gt/intel_execlists_submission.c| 17

[Intel-gfx] [PATCH 11/31] drm/i915/request: Remove the hook from await_execution

2021-06-08 Thread Jason Ekstrand
This was only ever used for FENCE_SUBMIT automatic engine selection which was removed in the previous commit. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 3 +- drivers/gpu/drm/i915/i915_request.c | 42

[Intel-gfx] [PATCH 12/31] drm/i915/gem: Disallow creating contexts with too many engines

2021-06-08 Thread Jason Ekstrand
There's no sense in allowing userspace to create more engines than it can possibly access via execbuf. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dr

[Intel-gfx] [PATCH 14/31] drm/i915/gem: Add a separate validate_priority helper

2021-06-08 Thread Jason Ekstrand
With the proto-context stuff added later in this series, we end up having to duplicate set_priority. This lets us avoid duplicating the validation logic. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 42 + 1 file

[Intel-gfx] [PATCH 13/31] drm/i915: Stop manually RCU banging in reset_stats_ioctl (v2)

2021-06-08 Thread Jason Ekstrand
hey can use set CONTEXT_PARAM_RECOVERABLE to false and look for -EIO coming from execbuf to check for hangs instead. v2 (Daniel Vetter): - Add a comment in the commit message about recoverable contexts Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem

[Intel-gfx] [PATCH 15/31] drm/i915: Add gem/i915_gem_context.h to the docs

2021-06-08 Thread Jason Ekstrand
In order to prevent kernel doc warnings, also fill out docs for any missing fields and fix those that forgot the "@". Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- Documentation/gpu/i915.rst| 2 + .../gpu/drm/i915/gem/i915_gem_context_ty

[Intel-gfx] [PATCH 16/31] drm/i915/gem: Add an intermediate proto_context struct (v4)

2021-06-08 Thread Jason Ekstrand
anual bitops and BIT() instead of __set_bit v4 (Daniel Vetter): - Add a changelog to the commit message - Better hyperlinking in docs - Create the default PPGTT in i915_gem_create_context Signed-off-by: Jason Ekstrand --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 124 +++---

[Intel-gfx] [PATCH 17/31] drm/i915/gem: Rework error handling in default_engines

2021-06-08 Thread Jason Ekstrand
Since free_engines works for partially constructed engine sets, we can use the usual goto pattern. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH 18/31] drm/i915/gem: Optionally set SSEU in intel_context_set_gem

2021-06-08 Thread Jason Ekstrand
For now this is a no-op because everyone passes in a null SSEU but it lets us get some of the error handling and selftest refactoring plumbed through. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 41 +++ .../gpu

[Intel-gfx] [PATCH 19/31] drm/i915: Add an i915_gem_vm_lookup helper

2021-06-08 Thread Jason Ekstrand
This is the VM equivalent of i915_gem_context_lookup. It's only used once in this patch but future patches will need to duplicate this lookup code so it's better to have it in a helper. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem

[Intel-gfx] [PATCH 20/31] drm/i915/gem: Make an alignment check more sensible

2021-06-08 Thread Jason Ekstrand
UG_ON might be trying to implicitly check is that offsetof(user->engines) == sizeof(*user) and we don't have any weird padding throwing us off. However, that's not the check it's doing and it's not even a reliable way to do that check. Signed-off-by: Jason Ekstrand Reviewed-b

[Intel-gfx] [PATCH 22/31] drm/i915/gem: Return an error ptr from context_lookup

2021-06-08 Thread Jason Ekstrand
We're about to start doing lazy context creation which means contexts get created in i915_gem_context_lookup and we may start having more errors than -ENOENT. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c| 12 ++-- dr

[Intel-gfx] [PATCH 23/31] drm/i915/gt: Drop i915_address_space::file (v2)

2021-06-08 Thread Jason Ekstrand
per-client stats from debugfs/i915_gem_objects") v2 (Daniel Vetter): - Delete a struct drm_i915_file_private pre-declaration - Add a comment to the commit message about history Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 9

[Intel-gfx] [PATCH 25/31] drm/i915/gem: Don't allow changing the VM on running contexts (v2)

2021-06-08 Thread Jason Ekstrand
Jason Ekstrand): - Expand the commit message Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 262 -- .../gpu/drm/i915/gem/i915_gem_context_types.h | 2 +- .../drm/i915/gem/selftests/i915_gem_context.c

[Intel-gfx] [PATCH 26/31] drm/i915/gem: Don't allow changing the engine set on running contexts (v2)

2021-06-08 Thread Jason Ekstrand
client can hurt itself or try to get around kernel context banning. v2 (Jason Ekstrand): - Expand the commit mesage Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 303 1 file changed, 303 deletions(-) diff --gi

[Intel-gfx] [PATCH 24/31] drm/i915/gem: Delay context creation (v2)

2021-06-08 Thread Jason Ekstrand
. v2 (Daniel Vetter): - Commit message grammatical fixes. - Use WARN_ON instead of GEM_BUG_ON - Rename lazy_create_context_locked to finalize_create_context_locked - Rework the control-flow logic in the setparam ioctl - Better documentation all around Signed-off-by: Jason Ekstrand Reviewed

[Intel-gfx] [PATCH 21/31] drm/i915/gem: Use the proto-context to handle create parameters (v3)

2021-06-08 Thread Jason Ekstrand
't allow more resetting user engines - Rework initialization of UCONTEXT_PERSISTENCE Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 539 +- .../gpu/drm/i915/gem/i915_gem_context_types.h | 58 ++ 2 files changed, 579

[Intel-gfx] [PATCH 27/31] drm/i915/selftests: Take a VM in kernel_context()

2021-06-08 Thread Jason Ekstrand
This better models where we want to go with contexts in general where things like the VM and engine set are create parameters instead of being set after the fact. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- .../drm/i915/gem/selftests/i915_gem_context.c | 4 ++-- .../gpu/drm

[Intel-gfx] [PATCH 28/31] i915/gem/selftests: Assign the VM at context creation in igt_shared_ctx_exec

2021-06-08 Thread Jason Ekstrand
We want to delete __assign_ppgtt and, generally, stop setting the VM after context creation. This is the one place I could find in the selftests where we set a VM after the fact. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c

[Intel-gfx] [PATCH 30/31] drm/i915: Finalize contexts in GEM_CONTEXT_CREATE on version 13+

2021-06-08 Thread Jason Ekstrand
. Signed-off-by: Jason Ekstrand --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 33 +++-- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index d3c9c42dcae4d..5312142daa0c0

[Intel-gfx] [PATCH 29/31] drm/i915/gem: Roll all of context creation together

2021-06-08 Thread Jason Ekstrand
Now that we have the whole engine set and VM at context creation time, we can just assign those fields instead of creating first and handling the VM and engines later. This lets us avoid creating useless VMs and engine sets and lets us get rid of the complex VM setting code. Signed-off-by: Jason

[Intel-gfx] [PATCH 31/31] drm/i915: Drop some RCU usage around context VMs

2021-06-08 Thread Jason Ekstrand
This instance now only happens during context creation so there's no way we can race with a context close/destroy. We don't need to bother with the RCU and can access the pointer directly. Signed-off-by: Jason Ekstrand --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 13 +--

Re: [Intel-gfx] [PATCH 16/31] drm/i915/gem: Add an intermediate proto_context struct (v4)

2021-06-09 Thread Jason Ekstrand
On Wed, Jun 9, 2021 at 6:28 AM Daniel Vetter wrote: > > On Tue, Jun 08, 2021 at 11:35:58PM -0500, Jason Ekstrand wrote: > > The current context uAPI allows for two methods of setting context > > parameters: SET_CONTEXT_PARAM and CONTEXT_CREATE_EXT_SETPARAM. The > > former

Re: [Intel-gfx] [PATCH 25/31] drm/i915/gem: Don't allow changing the VM on running contexts (v2)

2021-06-09 Thread Jason Ekstrand
On Wed, Jun 9, 2021 at 6:34 AM Daniel Vetter wrote: > > On Tue, Jun 08, 2021 at 11:36:07PM -0500, Jason Ekstrand wrote: > > When the APIs were added to manage VMs more directly from userspace, the > > questionable choice was made to allow changing out the VM on a context > &g

Re: [Intel-gfx] [PATCH 31/31] drm/i915: Drop some RCU usage around context VMs

2021-06-09 Thread Jason Ekstrand
On Wed, Jun 9, 2021 at 6:41 AM Daniel Vetter wrote: > > On Tue, Jun 08, 2021 at 11:36:13PM -0500, Jason Ekstrand wrote: > > This instance now only happens during context creation so there's no way > > we can race with a context close/destroy. We don't need to bot

[Intel-gfx] [PATCH 00/31] drm/i915/gem: ioctl clean-ups (v6)

2021-06-09 Thread Jason Ekstrand
xt. 3. Get rid of the separation between context close and context destroy 4. Get rid of the RCU on i915_gem_context However, these should probably be done as a separate patch series as this one is already starting to get longish, especially if you consider the 89 IGT patches that go along w

[Intel-gfx] [PATCH 01/31] drm/i915: Drop I915_CONTEXT_PARAM_RINGSIZE

2021-06-09 Thread Jason Ekstrand
really care about solving this problem, they can do it properly. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/gem/i915_gem_context.c | 85 +-- drivers/gpu/drm/i915/gt/intel_conte

[Intel-gfx] [PATCH 02/31] drm/i915: Stop storing the ring size in the ring pointer (v2)

2021-06-09 Thread Jason Ekstrand
patch adds a new ring_size field and makes everything use that. v2 (Daniel Vetter): - Replace 512 * SZ_4K with SZ_2M Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 3 +-- drivers/gpu/drm/i915/gt/intel_context.c | 3

[Intel-gfx] [PATCH 03/31] drm/i915: Drop I915_CONTEXT_PARAM_NO_ZEROMAP

2021-06-09 Thread Jason Ekstrand
ml [2]: https://lists.freedesktop.org/archives/intel-gfx/2015-May/067031.html Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 16 ++-- .../gpu/drm/i915/gem/i915_gem_context_types.h| 1 - drivers/gpu/drm/i91

[Intel-gfx] [PATCH 04/31] drm/i915/gem: Set the watchdog timeout directly in intel_context_set_gem (v2)

2021-06-09 Thread Jason Ekstrand
e races setting request_timeout_ms and context creation, they can theoretically end up with different timeouts. However, since both of these are fairly harmless and require changing kernel params, we don't care. v2 (Tvrtko Ursulin): - Add a comment about races with request_timeout_ms

[Intel-gfx] [PATCH 05/31] drm/i915/gem: Return void from context_apply_all

2021-06-09 Thread Jason Ekstrand
None of the callbacks we use with it return an error code anymore; they all return 0 unconditionally. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 26 +++-- 1 file changed, 8 insertions(+), 18 deletions(-) diff

[Intel-gfx] [PATCH 06/31] drm/i915: Drop the CONTEXT_CLONE API (v2)

2021-06-09 Thread Jason Ekstrand
imeline, they can use a syncobj and set it as an in and out fence on every submit. v2 (Jason Ekstrand): - More detailed commit message Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 199 +- .../drm/i915/gt/

[Intel-gfx] [PATCH 08/31] drm/i915: Drop getparam support for I915_CONTEXT_PARAM_ENGINES

2021-06-09 Thread Jason Ekstrand
data so it's not useful for discovering what engines are in the context. It's also not a replacement for the recently removed I915_CONTEXT_CLONE_ENGINES because it doesn't return any of the balancing or bonding information. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter -

[Intel-gfx] [PATCH 07/31] drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)

2021-06-09 Thread Jason Ekstrand
text::syncobj to mention that it's an emulation and the possible race if userspace calls execbuffer2 twice on the same context concurrently. v2 (Jason Ekstrand): - Wrap the checks for eb.gem_context->syncobj in unlikely() - Drop the dma_fence reference - Improved commit message v3

[Intel-gfx] [PATCH 09/31] drm/i915/gem: Disallow bonding of virtual engines (v3)

2021-06-09 Thread Jason Ekstrand
he bonding information. v2 (Jason Ekstrand): - Don't delete quite as much code. v3 (Tvrtko Ursulin): - Add some history to the commit message Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 18 +- .../drm/i915/gt/intel_execlists_subm

[Intel-gfx] [PATCH 11/31] drm/i915/request: Remove the hook from await_execution

2021-06-09 Thread Jason Ekstrand
This was only ever used for FENCE_SUBMIT automatic engine selection which was removed in the previous commit. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 3 +- drivers/gpu/drm/i915/i915_request.c | 42

[Intel-gfx] [PATCH 10/31] drm/i915/gem: Remove engine auto-magic with FENCE_SUBMIT (v2)

2021-06-09 Thread Jason Ekstrand
Vetter): - Mention the exact IGT test this breaks Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_types.h| 7 --- .../drm/i915/gt/intel_execlists_submission.c| 17

[Intel-gfx] [PATCH 13/31] drm/i915: Stop manually RCU banging in reset_stats_ioctl (v2)

2021-06-09 Thread Jason Ekstrand
hey can use set CONTEXT_PARAM_RECOVERABLE to false and look for -EIO coming from execbuf to check for hangs instead. v2 (Daniel Vetter): - Add a comment in the commit message about recoverable contexts Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem

[Intel-gfx] [PATCH 12/31] drm/i915/gem: Disallow creating contexts with too many engines

2021-06-09 Thread Jason Ekstrand
There's no sense in allowing userspace to create more engines than it can possibly access via execbuf. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dr

[Intel-gfx] [PATCH 14/31] drm/i915/gem: Add a separate validate_priority helper

2021-06-09 Thread Jason Ekstrand
With the proto-context stuff added later in this series, we end up having to duplicate set_priority. This lets us avoid duplicating the validation logic. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 42 + 1 file

[Intel-gfx] [PATCH 15/31] drm/i915: Add gem/i915_gem_context.h to the docs

2021-06-09 Thread Jason Ekstrand
In order to prevent kernel doc warnings, also fill out docs for any missing fields and fix those that forgot the "@". Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- Documentation/gpu/i915.rst| 2 + .../gpu/drm/i915/gem/i915_gem_context_ty

[Intel-gfx] [PATCH 16/31] drm/i915/gem: Add an intermediate proto_context struct (v5)

2021-06-09 Thread Jason Ekstrand
anual bitops and BIT() instead of __set_bit v4 (Daniel Vetter): - Add a changelog to the commit message - Better hyperlinking in docs - Create the default PPGTT in i915_gem_create_context v5 (Daniel Vetter): - Hand-roll the initialization of UCONTEXT_PERSISTENCE Signed-off-by: Jason Ekstrand

[Intel-gfx] [PATCH 18/31] drm/i915/gem: Optionally set SSEU in intel_context_set_gem

2021-06-09 Thread Jason Ekstrand
For now this is a no-op because everyone passes in a null SSEU but it lets us get some of the error handling and selftest refactoring plumbed through. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 41 +++ .../gpu

[Intel-gfx] [PATCH 17/31] drm/i915/gem: Rework error handling in default_engines

2021-06-09 Thread Jason Ekstrand
Since free_engines works for partially constructed engine sets, we can use the usual goto pattern. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH 20/31] drm/i915/gem: Make an alignment check more sensible

2021-06-09 Thread Jason Ekstrand
UG_ON might be trying to implicitly check is that offsetof(user->engines) == sizeof(*user) and we don't have any weird padding throwing us off. However, that's not the check it's doing and it's not even a reliable way to do that check. Signed-off-by: Jason Ekstrand Reviewed-b

[Intel-gfx] [PATCH 21/31] drm/i915/gem: Use the proto-context to handle create parameters (v4)

2021-06-09 Thread Jason Ekstrand
't allow more resetting user engines - Rework initialization of UCONTEXT_PERSISTENCE v4 (Jason Ekstrand): - Move hand-rolled initialization of UCONTEXT_PERSISTENCE to an earlier patch Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem

[Intel-gfx] [PATCH 19/31] drm/i915: Add an i915_gem_vm_lookup helper

2021-06-09 Thread Jason Ekstrand
This is the VM equivalent of i915_gem_context_lookup. It's only used once in this patch but future patches will need to duplicate this lookup code so it's better to have it in a helper. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem

[Intel-gfx] [PATCH 22/31] drm/i915/gem: Return an error ptr from context_lookup

2021-06-09 Thread Jason Ekstrand
We're about to start doing lazy context creation which means contexts get created in i915_gem_context_lookup and we may start having more errors than -ENOENT. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c| 12 ++-- dr

[Intel-gfx] [PATCH 24/31] drm/i915/gem: Delay context creation (v3)

2021-06-09 Thread Jason Ekstrand
create_context_locked static Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 203 ++ drivers/gpu/drm/i915/gem/i915_gem_context.h | 3 + .../gpu/drm/i915/gem/i915_gem_context_types.h | 54 + .../gpu/drm

[Intel-gfx] [PATCH 25/31] drm/i915/gem: Don't allow changing the VM on running contexts (v4)

2021-06-09 Thread Jason Ekstrand
Jason Ekstrand): - Expand the commit message v3 (Daniel Vetter): - Don't drop the __rcu on the vm pointer v4 (Jason Ekstrand): - Make it more obvious that I915_CONTEXT_PARAM_VM returns -EINVAL Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem

[Intel-gfx] [PATCH 23/31] drm/i915/gt: Drop i915_address_space::file (v2)

2021-06-09 Thread Jason Ekstrand
per-client stats from debugfs/i915_gem_objects") v2 (Daniel Vetter): - Delete a struct drm_i915_file_private pre-declaration - Add a comment to the commit message about history Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 9

[Intel-gfx] [PATCH 27/31] drm/i915/selftests: Take a VM in kernel_context()

2021-06-09 Thread Jason Ekstrand
This better models where we want to go with contexts in general where things like the VM and engine set are create parameters instead of being set after the fact. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- .../drm/i915/gem/selftests/i915_gem_context.c | 4 ++-- .../gpu/drm

[Intel-gfx] [PATCH 29/31] drm/i915/gem: Roll all of context creation together

2021-06-09 Thread Jason Ekstrand
Now that we have the whole engine set and VM at context creation time, we can just assign those fields instead of creating first and handling the VM and engines later. This lets us avoid creating useless VMs and engine sets and lets us get rid of the complex VM setting code. Signed-off-by: Jason

[Intel-gfx] [PATCH 26/31] drm/i915/gem: Don't allow changing the engine set on running contexts (v3)

2021-06-09 Thread Jason Ekstrand
client can hurt itself or try to get around kernel context banning. v2 (Jason Ekstrand): - Expand the commit mesage v3 (Jason Ekstrand): - Make it more obvious that I915_CONTEXT_PARAM_ENGINES returns -EINVAL Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/g

[Intel-gfx] [PATCH 28/31] i915/gem/selftests: Assign the VM at context creation in igt_shared_ctx_exec

2021-06-09 Thread Jason Ekstrand
We want to delete __assign_ppgtt and, generally, stop setting the VM after context creation. This is the one place I could find in the selftests where we set a VM after the fact. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c

[Intel-gfx] [PATCH 31/31] HACK: Always finalize contexts

2021-06-09 Thread Jason Ekstrand
Only for verifying the previous patch with I-G-T. DO NOT MERGE! --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index 7d6f52d8a8012..9395d

[Intel-gfx] [PATCH 30/31] drm/i915: Finalize contexts in GEM_CONTEXT_CREATE on version 13+

2021-06-09 Thread Jason Ekstrand
. Signed-off-by: Jason Ekstrand Cc: Jon Bloomfield Cc: Carl Zhang Cc: Michal Mrozek --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 39 - 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH 0/5] dma-fence, i915: Stop allowing SLAB_TYPESAFE_BY_RCU for dma_fence

2021-06-09 Thread Jason Ekstrand
rely. Note: The last patch is labled DONOTMERGE. This was at Daniel Vetter's request as we may want to let this bake for a couple releases before we rip out dma_fence_get_rcu_safe entirely. Signed-off-by: Jason Ekstrand Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Christian König Cc: Dave Ai

[Intel-gfx] [PATCH 1/5] drm/i915: Move intel_engine_free_request_pool to i915_request.c

2021-06-09 Thread Jason Ekstrand
either way. Since i915_request's allocation scheme is far more subtle than the simple pointer that is intel_engine_cs.request_pool, it's probably better to keep i915_request's details to itself. Signed-off-by: Jason Ekstrand Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Matthew Au

  1   2   3   4   5   6   7   >