Re: [Intel-gfx] [PATCH 41/51] drm/i915/guc: Add golden context to GuC ADS

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 11:25:55AM -0700, John Harrison wrote: > On 7/19/2021 10:24, Matthew Brost wrote: > > On Fri, Jul 16, 2021 at 01:17:14PM -0700, Matthew Brost wrote: > > > From: John Harrison > > > > > > The media watchdog mechanism involves GuC doing

Re: [PATCH 04/51] drm/i915/guc: Implement GuC submission tasklet

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 04:01:56PM -0700, John Harrison wrote: > On 7/16/2021 13:16, Matthew Brost wrote: > > Implement GuC submission tasklet for new interface. The new GuC > > interface uses H2G to submit contexts to the GuC. Since H2G use a single > > channel, a single ta

Re: [PATCH 19/51] drm/i915/guc: GuC virtual engines

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 04:33:56PM -0700, Daniele Ceraolo Spurio wrote: > > > On 7/16/2021 1:16 PM, Matthew Brost wrote: > > Implement GuC virtual engines. Rather simple implementation, basically > > just allocate an engine, setup context enter / exit function to virtua

Re: [PATCH 19/51] drm/i915/guc: GuC virtual engines

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 04:42:50PM -0700, Daniele Ceraolo Spurio wrote: > > > On 7/19/2021 4:27 PM, Matthew Brost wrote: > > On Mon, Jul 19, 2021 at 04:33:56PM -0700, Daniele Ceraolo Spurio wrote: > > > > > > On 7/16/2021 1:16 PM, Matthew Brost wrote: >

Re: [PATCH 15/51] drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 06:03:05PM -0700, John Harrison wrote: > On 7/16/2021 13:16, Matthew Brost wrote: > > When running the GuC the GPU can't be considered idle if the GuC still > > has contexts pinned. As such, a call has been added in > > intel_gt_wait_for_idle to i

Re: [PATCH 20/51] drm/i915: Track 'serial' counts for virtual engines

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 06:28:47PM -0700, John Harrison wrote: > On 7/16/2021 13:16, Matthew Brost wrote: > > From: John Harrison > > > > The serial number tracking of engines happens at the backend of > > request submission and was expecting to only be given physic

Re: [Intel-gfx] [PATCH 24/47] drm/i915/guc: Add several request trace points

2021-07-19 Thread Matthew Brost
On Tue, Jul 13, 2021 at 10:06:17AM +0100, Tvrtko Ursulin wrote: > > On 24/06/2021 08:04, Matthew Brost wrote: > > Add trace points for request dependencies and GuC submit. Extended > > existing request trace points to include submit fence value,, guc_id, > > and ring tail

Re: [PATCH 17/51] drm/i915/guc: Add several request trace points

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 06:27:06PM -0700, John Harrison wrote: > On 7/16/2021 13:16, Matthew Brost wrote: > > Add trace points for request dependencies and GuC submit. Extended > > existing request trace points to include submit fence value,, guc_id, > Still has misplaced commas.

Re: [PATCH 06/51] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 05:23:55PM -0700, John Harrison wrote: > On 7/16/2021 13:16, Matthew Brost wrote: > > Implement GuC context operations which includes GuC specific operations > > alloc, pin, unpin, and destroy. > > > > v2: > > (Daniel Vetter) > >

Re: [PATCH 12/51] drm/i915/guc: Ensure request ordering via completion fences

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 04:46:57PM -0700, Daniele Ceraolo Spurio wrote: > > > On 7/16/2021 1:16 PM, Matthew Brost wrote: > > If two requests are on the same ring, they are explicitly ordered by the > > HW. So, a submission fence is sufficient to ensure ordering when

Re: [PATCH 12/51] drm/i915/guc: Ensure request ordering via completion fences

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 07:48:17PM -0700, Matthew Brost wrote: > On Mon, Jul 19, 2021 at 04:46:57PM -0700, Daniele Ceraolo Spurio wrote: > > > > > > On 7/16/2021 1:16 PM, Matthew Brost wrote: > > > If two requests are on the same ring, they are explicitly

Re: [PATCH 06/51] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-19 Thread Matthew Brost
On Mon, Jul 19, 2021 at 05:51:46PM -0700, Daniele Ceraolo Spurio wrote: > > > On 7/16/2021 1:16 PM, Matthew Brost wrote: > > Implement GuC context operations which includes GuC specific operations > > alloc, pin, unpin, and destroy. > > > > v2: &

Re: [PATCH 20/51] drm/i915: Track 'serial' counts for virtual engines

2021-07-20 Thread Matthew Brost
On Mon, Jul 19, 2021 at 06:54:00PM -0700, Matthew Brost wrote: > On Mon, Jul 19, 2021 at 06:28:47PM -0700, John Harrison wrote: > > On 7/16/2021 13:16, Matthew Brost wrote: > > > From: John Harrison > > > > > > The serial number tracking of engines hap

Re: [Intel-gfx] [PATCH 45/51] drm/i915/selftest: Fix workarounds selftest for GuC submission

2021-07-20 Thread Matthew Brost
On Fri, Jul 16, 2021 at 01:17:18PM -0700, Matthew Brost wrote: > From: Rahul Kumar Singh > > When GuC submission is enabled, the GuC controls engine resets. Rather > than explicitly triggering a reset, the driver must submit a hanging > context to GuC and wait for the reset to occ

Re: [PATCH 24/51] drm/i915: Add i915_sched_engine destroy vfunc

2021-07-20 Thread Matthew Brost
On Tue, Jul 20, 2021 at 12:55:08PM -0700, John Harrison wrote: > On 7/16/2021 13:16, Matthew Brost wrote: > > This help the backends clean up when the schedule engine object gets > help -> helps. Although, I would say it's more like 'this is required to > allow b

Re: [PATCH 30/51] drm/i915/guc: Handle context reset notification

2021-07-20 Thread Matthew Brost
On Tue, Jul 20, 2021 at 01:29:26PM -0700, John Harrison wrote: > On 7/16/2021 13:17, Matthew Brost wrote: > > GuC will issue a reset on detecting an engine hang and will notify > > the driver via a G2H message. The driver will service the notification > > by resetting th

[RFC PATCH 00/42] Parallel submission aka multi-bb execbuf

2021-07-20 Thread Matthew Brost
14-29. 4. Update execbuf IOCTL to accept more than 1 BB in a single IOCTL. These are patches 30-41. 5. A weak execlists implemenation for parallel submission. Patch 42. Looking for initial feedback all parts except #1. Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/series/

[RFC PATCH 10/42] drm/i915: Add GT PM unpark worker

2021-07-20 Thread Matthew Brost
rates / drains the list + queues the workqueues. First user of this is deregistration of GuC contexts. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_gt.c| 3 ++ drivers/gpu/drm/i915/gt/intel_gt_pm.c | 8 + .../gpu/drm/i915/gt/intel_gt_pm_unpark_work.c

[RFC PATCH 07/42] drm/i915/guc: Check return of __xa_store when registering a context

2021-07-20 Thread Matthew Brost
Check return of __xa_store when registering a context as this can fail in a rare case if not memory can not be allocated. If this occurs fall back on the tasklet flow control and try again in the future. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 14

[RFC PATCH 09/42] drm/i915/guc: Take GT PM ref when deregistering context

2021-07-20 Thread Matthew Brost
Taking a PM reference to prevent intel_gt_wait_for_idle from short circuiting while a deregister context H2G is in flight. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine_pm.h | 5 + drivers/gpu/drm/i915/gt/intel_gt_pm.h | 13 +++ drivers/gpu/drm/i915/gt/uc

[RFC PATCH 03/42] drm/i915/guc: Connect the number of guc_ids to debugfs

2021-07-20 Thread Matthew Brost
For testing purposes it may make sense to reduce the number of guc_ids available to be allocated. Add debugfs support for setting the number of guc_ids. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_debugfs.c| 31 +++ .../gpu/drm/i915/gt/uc

[RFC PATCH 06/42] drm/i915/guc: Introduce guc_submit_engine object

2021-07-20 Thread Matthew Brost
. Lots of find-replace. Currently only 1 guc_submit_engine instantiated, future patches will instantiate more. Signed-off-by: Matthew Brost Cc: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 33 +- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 555 +++--- .../i915

[RFC PATCH 05/42] drm/i915/guc: Don't allow requests not ready to consume all guc_ids

2021-07-20 Thread Matthew Brost
Add a heuristic which checks if over half of the available guc_ids are currently consumed by requests not ready to be submitted. If this heuristic is true at request creation time (normal guc_id allocation location) force all submissions + guc_ids allocations to tasklet. Signed-off-by: Matthew

[RFC PATCH 17/42] drm/i915/guc: Implement GuC parent-child context pin / unpin functions

2021-07-20 Thread Matthew Brost
functions that will be connected later in the series. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.c | 188 -- drivers/gpu/drm/i915/gt/intel_context.h | 43 +--- drivers/gpu/drm/i915/gt/intel_context_types.h | 4 +- .../drm/i915/gt

[RFC PATCH 15/42] drm/i915: Expose logical engine instance to user

2021-07-20 Thread Matthew Brost
expose the logical mapping with the existing query engine info IOCTL. Cc: Tvrtko Ursulin Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/i915_query.c | 2 ++ include/uapi/drm/i915_drm.h | 8 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

[RFC PATCH 02/42] drm/i915/guc: Allow flexible number of context ids

2021-07-20 Thread Matthew Brost
Number of available GuC contexts ids might be limited. Stop refering in code to macro and use variable instead. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 2 ++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 15

[RFC PATCH 18/42] drm/i915/guc: Add multi-lrc context registration

2021-07-20 Thread Matthew Brost
Add multi-lrc context registration H2G. In addition a workqueue and process descriptor are setup during multi-lrc context registration as these data structures are needed for multi-lrc submission. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context_types.h | 6 + drivers

[RFC PATCH 04/42] drm/i915/guc: Don't return -EAGAIN to user when guc_ids exhausted

2021-07-20 Thread Matthew Brost
issued from the workqueue because of the locking structure. When we deregister a context, we also do the same thing (waiting on the G2H) but we can safely issue the deregister H2G from the tasklet. Once all the G2H have returned we can trigger a submission on the context. Signed-off-by: Matthew Bros

[RFC PATCH 08/42] drm/i915/guc: Non-static lrc descriptor registration buffer

2021-07-20 Thread Matthew Brost
prevent unready requests/contexts from consuming all registration space. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context_types.h | 3 + drivers/gpu/drm/i915/gt/uc/intel_guc.h| 9 +- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 204 -- 3 files

[RFC PATCH 14/42] drm/i915: Add logical engine mapping

2021-07-20 Thread Matthew Brost
Add logical engine mapping. This is required for split-frame, as workloads need to be placed on engines in a logically contiguous manner. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 60 --- drivers/gpu/drm/i915/gt/intel_engine_types.h | 1

[RFC PATCH 12/42] drm/i915/guc: Don't call switch_to_kernel_context with GuC submission

2021-07-20 Thread Matthew Brost
Calling switch_to_kernel_context isn't needed if the engine PM reference is taken while all contexts are pinned. By not calling switch_to_kernel_context we save on issuing a request to the engine. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 1

[RFC PATCH 41/42] drm/i915: Enable multi-bb execbuf

2021-07-20 Thread Matthew Brost
Enable multi-bb execbuf by enabling the set_parallel extension. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index

[RFC PATCH 39/42] drm/i915: Multi-batch execbuffer2

2021-07-20 Thread Matthew Brost
d put into the dma reseveration excl fence slot. Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 263 +++--- drivers/gpu/drm/i915/gt/intel_context.c | 5 + drivers/gpu/drm/i915/gt/intel_context_types.h | 9 + driver

[RFC PATCH 16/42] drm/i915/guc: Introduce context parent-child relationship

2021-07-20 Thread Matthew Brost
n but aligns to how GuC mutli-lrc interface is defined - a single H2G is used register / deregister all of the contexts simultaneously. Subsequent patches in the series will implement the pinning / unpinning operations for parent / child contexts. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i9

[RFC PATCH 21/42] drm/i915/guc: Add hang check to GuC submit engine

2021-07-20 Thread Matthew Brost
The heartbeat uses a single instance of a GuC submit engine (GSE) to do the hang check. As such if a different GSE's state machine hangs, the heartbeat cannot detect this hang. Add timer to each GSE which in turn can disable all submissions if it is hung. Cc: John Harrison Signed-off-by: Ma

[RFC PATCH 11/42] drm/i915/guc: Take engine PM when a context is pinned with GuC submission

2021-07-20 Thread Matthew Brost
Taking a PM reference to prevent intel_gt_wait_for_idle from short circuiting while a scheduling of user context could be enabled. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/Makefile | 1 + .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 36 +-- 2

[RFC PATCH 36/42] drm/i915: Teach execbuf there can be more than one batch in the objects list

2021-07-20 Thread Matthew Brost
will enable multiple do_execbuf calls with a single exec object array in a later patch. Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 31 +-- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/drivers/gpu

[RFC PATCH 29/42] drm/i915/guc: Implement BB boundary preemption for multi-lrc

2021-07-20 Thread Matthew Brost
a context is configured by set parallel extension. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_context_types.h | 3 + drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 2 +- .../gpu/drm/i915/gt/uc/intel_guc_submissio

[RFC PATCH 24/42] drm/i915/guc: Insert submit fences between requests in parent-child relationship

2021-07-20 Thread Matthew Brost
to a single timeline. Signed-off-by: Matthew Brost Cc: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c | 2 + drivers/gpu/drm/i915/gt/intel_context.h | 5 + drivers/gpu/drm/i915/gt/intel_context_types.h | 3 + .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 3

[RFC PATCH 27/42] drm/i915: Connect UAPI to GuC multi-lrc interface

2021-07-20 Thread Matthew Brost
Introduce 'set parallel submit' extension to connect UAPI to GuC multi-lrc interface. Kernel doc in new uAPI should explain it all. Cc: Tvrtko Ursulin Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 157 +- .../gpu/dr

[RFC PATCH 23/42] drm/i915/guc: Implement multi-lrc submission

2021-07-20 Thread Matthew Brost
coalesce requests into a single submission. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 6 +- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 224 -- drivers/gpu/drm/i915/i915_request.h | 8 + 3 files changed, 222 insertions(+), 16

[RFC PATCH 20/42] drm/i915/guc: Assign contexts in parent-child relationship consecutive guc_ids

2021-07-20 Thread Matthew Brost
is a precursor to the full GuC multi-lrc implementation but aligns to how GuC mutli-lrc interface is defined - guc_ids must be consecutive when using the GuC multi-lrc interface. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.h | 6 + drivers/gpu/drm/i915/gt

[RFC PATCH 34/42] drm/i915: Store batch index in struct i915_execbuffer

2021-07-20 Thread Matthew Brost
This will help with upcoming extensions where more than 1 batch can be submitted in a single execbuf IOCTL. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 19 +-- 1 file changed, 9 insertions(+), 10 deletions

[RFC PATCH 22/42] drm/i915/guc: Add guc_child_context_destroy

2021-07-20 Thread Matthew Brost
Since child contexts do not own the guc_ids or GuC context registration, child contexts can simply be freed on destroy. Add guc_child_context_destroy context operation to do this. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 +++ 1 file changed, 7

[RFC PATCH 13/42] drm/i915/guc: Selftest for GuC flow control

2021-07-20 Thread Matthew Brost
contexts. Tests 1, 2, and 3 also ensure when the flow control is triggered by unready requests those unready requests do not DoS ready requests. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 6 + drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 43 +- drivers/gpu

[RFC PATCH 33/42] drm/i915: Return output fence from i915_gem_do_execbuffer

2021-07-20 Thread Matthew Brost
Move the job of creating a new sync fence and installing it onto a file descriptor to i915_gem_execbuffer2. Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 39 +-- 1 file changed, 19 insertions(+), 20 deletions

[RFC PATCH 26/42] drm/i915/guc: Update debugfs for GuC multi-lrc

2021-07-20 Thread Matthew Brost
Display the workqueue status in debugfs for GuC contexts that are in parent-child relationship. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 56 +-- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc

[RFC PATCH 38/42] drm/i915: Force parallel contexts to use copy engine for reloc

2021-07-20 Thread Matthew Brost
Submitting to a subset of hardware contexts is not allowed, so use the copy engine for GPU relocations when using a parallel context. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers

[RFC PATCH 42/42] drm/i915/execlists: Parallel submission support for execlists

2021-07-20 Thread Matthew Brost
meantime. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 9 +- drivers/gpu/drm/i915/gt/intel_context.c | 1 - drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + .../drm/i915/gt/intel_execlists_submission.c | 196 ++ 4 files changed, 204

[RFC PATCH 40/42] drm/i915: Eliminate unnecessary VMA calls for multi-BB submission

2021-07-20 Thread Matthew Brost
Certain VMA functions in the execbuf IOCTL only need to be called on first or last BB of a multi-BB submission. eb_relocate() on the first and eb_release_vmas() on the last. Doing so will save CPU / GPU cycles. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 123

[RFC PATCH 31/42] drm/i915: Move input/exec fence handling to i915_gem_execbuffer2

2021-07-20 Thread Matthew Brost
Move the job of creating an input/exec fences (from a file descriptor) out of i915_gem_do_execbuffer. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 75 +++ 1 file changed, 43 insertions(+), 32 deletions(-) diff

[RFC PATCH 32/42] drm/i915: Move output fence handling to i915_gem_execbuffer2

2021-07-20 Thread Matthew Brost
Move the job of creating a new file descriptor and passing it back to userspace to i915_gem_execbuffer2. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 45 ++- 1 file changed, 25 insertions(+), 20 deletions

[RFC PATCH 35/42] drm/i915: Allow callers of i915_gem_do_execbuffer to override the batch index

2021-07-20 Thread Matthew Brost
Allow specifying the batch directly over what is inferred from passed in execbuf flags. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

[RFC PATCH 28/42] drm/i915/guc: Add basic GuC multi-lrc selftest

2021-07-20 Thread Matthew Brost
Add very basic (single submission) multi-lrc selftest. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 1 + .../drm/i915/gt/uc/selftest_guc_multi_lrc.c | 168 ++ .../drm/i915/selftests/i915_live_selftests.h | 1 + 3 files changed, 170

[RFC PATCH 19/42] drm/i915/guc: Ensure GuC schedule operations do not operate on child contexts

2021-07-20 Thread Matthew Brost
In GuC parent-child contexts the parent context controls the scheduling, ensure only the parent does the scheduling operations. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 48 +++ 1 file changed, 38 insertions(+), 10 deletions(-) diff --git

[RFC PATCH 25/42] drm/i915/guc: Implement multi-lrc reset

2021-07-20 Thread Matthew Brost
Update context and full GPU reset to work with multi-lrc. The idea is parent context tracks all the active requests inflight for itself and its' children. The parent context owns the reset replaying / canceling requests as needed. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i9

[RFC PATCH 37/42] drm/i915: Only track object dependencies on first request

2021-07-20 Thread Matthew Brost
Only track object dependencies on the first request generated from the execbuf, this help with the upcoming multi-bb execbuf extension. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a

[RFC PATCH 30/42] i915/drm: Move secure execbuf check to execbuf2

2021-07-20 Thread Matthew Brost
Goal is to remove all input sanity checks from the core submission. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 35 +++ 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/gem

Re: [PATCH 26/51] drm/i915/guc: Reset implementation for new GuC interface

2021-07-20 Thread Matthew Brost
On Tue, Jul 20, 2021 at 01:19:48PM -0700, John Harrison wrote: > On 7/16/2021 13:16, Matthew Brost wrote: > > Reset implementation for new GuC interface. This is the legacy reset > > implementation which is called when the i915 owns the engine hang check. > > Future patches wi

[PATCH 02/18] drm/i915/guc: Remove GuC stage descriptor, add LRC descriptor

2021-07-20 Thread Matthew Brost
Remove old GuC stage descriptor, add LRC descriptor which will be used by the new GuC interface implemented in this patch series. v2: (John Harrison) - s/lrc/LRC/g Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h

[PATCH 00/18] Series to merge a subset of GuC submission

2021-07-20 Thread Matthew Brost
The first 18 patches [1] are basically ready to merge - only 3 are missing RBs but all issues are mostly nits and have been address. Hopefully by the time CI returns we can merge these. Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/series/91840/ Matthew Brost (18): drm

[PATCH 03/18] drm/i915/guc: Add LRC descriptor context lookup array

2021-07-20 Thread Matthew Brost
series will make use of this array. v2: (Michal) - "linux/xarray.h" -> - s/lrc/LRC (John H) - Fix commit message Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 5 +++ .../gpu/d

[PATCH 01/18] drm/i915/guc: Add new GuC interface defines and structures

2021-07-20 Thread Matthew Brost
Add new GuC interface defines and structures while maintaining old ones in parallel. Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 14 +++ drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 41

[PATCH 04/18] drm/i915/guc: Implement GuC submission tasklet

2021-07-20 Thread Matthew Brost
) - More comment cleanups Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context_types.h | 9 + drivers/gpu/drm/i915/gt/uc/intel_guc.h| 4 + .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 231 +- 3 files changed, 127 insertions

[PATCH 10/18] drm/i915/guc: Extend deregistration fence to schedule disable

2021-07-20 Thread Matthew Brost
Extend the deregistration context fence to fence whne a GuC context has scheduling disable pending. v2: (John H) - Update comment why we check the pin count within spin lock Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc

[PATCH 09/18] drm/i915/guc: Disable engine barriers with GuC during unpin

2021-07-20 Thread Matthew Brost
ne in the context engine mask. Cc: John Harrison Signed-off-by: Matthew Brost Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c| 2 +- drivers/gpu/drm/i915/gt/selftest_context.c | 10 ++ 2 files changed, 11 insertions(

[PATCH 05/18] drm/i915/guc: Add bypass tasklet submission path to GuC

2021-07-20 Thread Matthew Brost
Add bypass tasklet submission path to GuC. The tasklet is only used if H2G channel has backpresure. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 37 +++ 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a

[PATCH 12/18] drm/i915/guc: Ensure request ordering via completion fences

2021-07-20 Thread Matthew Brost
x27;t ensure ordering on the new GuC submission interface. So, a completion fence needs to be used to ensure ordering. v2: (Daniele) - Don't delete spin lock Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/i915_request.c | 12 ++-- 1 file c

[PATCH 16/18] drm/i915/guc: Update GuC debugfs to support new GuC

2021-07-20 Thread Matthew Brost
Update GuC debugfs to support the new GuC structures. v2: (John Harrison) - Remove intel_lrc_reg.h include from i915_debugfs.c (Michal) - Rename GuC debugfs functions Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc

[PATCH 06/18] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-20 Thread Matthew Brost
Implement GuC context operations which includes GuC specific operations alloc, pin, unpin, and destroy. v2: (Daniel Vetter) - Use msleep_interruptible rather than cond_resched in busy loop (Michal) - Remove C++ style comment v3: (Matthew Brost) - Drop GUC_ID_START (John Harrison

[PATCH 15/18] drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC

2021-07-20 Thread Matthew Brost
Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +- drivers/gpu/drm/i915/gt/intel_gt.c| 19 drivers/gpu/drm/i915/gt/intel_gt.h| 2 + drivers/gpu/drm/i915/gt/intel_gt_requests.c | 21 ++--- drivers/gpu/

[PATCH 07/18] drm/i915/guc: Insert fence on context when deregistering

2021-07-20 Thread Matthew Brost
complete the context is registered and the fence is released. v2: (John H) - Fix commit message Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c | 1 + drivers/gpu/drm/i915/gt/intel_context_types.h | 5 ++ .../gpu

[PATCH 13/18] drm/i915/guc: Disable semaphores when using GuC scheduling

2021-07-20 Thread Matthew Brost
for GuC submission. This patch fixes an existing bugs where I915_ENGINE_HAS_SEMAPHORES was not honored correctly. v2: Reword commit message v3: (John H) - Add text to commit indicating this also fixing an existing bug v4: (John H) - s/bug/bugs Cc: John Harrison Signed-off-by: Matthew Brost

[PATCH 08/18] drm/i915/guc: Defer context unpin until scheduling is disabled

2021-07-20 Thread Matthew Brost
e function Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c | 4 +- drivers/gpu/drm/i915/gt/intel_context.h | 27 +++- drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + drivers/gpu/drm/i915/gt/uc/i

[PATCH 14/18] drm/i915/guc: Ensure G2H response has space in buffer

2021-07-20 Thread Matthew Brost
ohn H) - CTB_G2H_BUFFER_SIZE / 4 == G2H_ROOM_BUFFER_SIZE Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 8 +- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 91 +++ drivers/gpu/drm/i915/

[PATCH 17/18] drm/i915/guc: Add trace point for GuC submit

2021-07-20 Thread Matthew Brost
Add trace point for GuC submit. Extended existing request trace points to include submit fence value,, guc_id, and ring tail value. v2: Fix white space alignment in i915_request_add trace point v3: Delete dep_from , dep_to (Tvrtko) Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by

[PATCH 11/18] drm/i915: Disable preempt busywait when using GuC scheduling

2021-07-20 Thread Matthew Brost
Disable preempt busywait when using GuC scheduling. This isn't needed as the GuC controls preemption when scheduling. v2: (John H): - Fix commit message Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 6

[PATCH 18/18] drm/i915: Add intel_context tracing

2021-07-20 Thread Matthew Brost
Add intel_context tracing. These trace points are particular helpful when debugging the GuC firmware and can be enabled via CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS kernel config option. Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt

[PATCH 02/18] drm/i915/guc: Remove GuC stage descriptor, add LRC descriptor

2021-07-21 Thread Matthew Brost
Remove old GuC stage descriptor, add LRC descriptor which will be used by the new GuC interface implemented in this patch series. v2: (John Harrison) - s/lrc/LRC/g Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h

[PATCH 00/18] Series to merge a subset of GuC submission

2021-07-21 Thread Matthew Brost
The first 18 patches [1] are basically ready to merge. v2: Address NITs, add missing RBs, fix checkpatch warnings Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/series/91840/ Matthew Brost (18): drm/i915/guc: Add new GuC interface defines and structures drm/i915/guc

[PATCH 01/18] drm/i915/guc: Add new GuC interface defines and structures

2021-07-21 Thread Matthew Brost
Add new GuC interface defines and structures while maintaining old ones in parallel. Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 14 +++ drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 42

[PATCH 04/18] drm/i915/guc: Implement GuC submission tasklet

2021-07-21 Thread Matthew Brost
) - More comment cleanups Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context_types.h | 9 + drivers/gpu/drm/i915/gt/uc/intel_guc.h| 4 + .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 231 +- 3 files

[PATCH 12/18] drm/i915/guc: Ensure request ordering via completion fences

2021-07-21 Thread Matthew Brost
x27;t ensure ordering on the new GuC submission interface. So, a completion fence needs to be used to ensure ordering. v2: (Daniele) - Don't delete spin lock v3: (Daniele) - Delete forward dec Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Daniele Ceraolo Spurio --

[PATCH 09/18] drm/i915/guc: Disable engine barriers with GuC during unpin

2021-07-21 Thread Matthew Brost
ne in the context engine mask. Cc: John Harrison Signed-off-by: Matthew Brost Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c| 2 +- drivers/gpu/drm/i915/gt/selftest_context.c | 10 ++ 2 files changed, 11 insertions(

[PATCH 08/18] drm/i915/guc: Defer context unpin until scheduling is disabled

2021-07-21 Thread Matthew Brost
e function Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c | 4 +- drivers/gpu/drm/i915/gt/intel_context.h | 27 +++- drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + drivers/gpu/drm/i915/gt/uc/i

[PATCH 06/18] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-21 Thread Matthew Brost
Implement GuC context operations which includes GuC specific operations alloc, pin, unpin, and destroy. v2: (Daniel Vetter) - Use msleep_interruptible rather than cond_resched in busy loop (Michal) - Remove C++ style comment v3: (Matthew Brost) - Drop GUC_ID_START (John Harrison

[PATCH 03/18] drm/i915/guc: Add LRC descriptor context lookup array

2021-07-21 Thread Matthew Brost
series will make use of this array. v2: (Michal) - "linux/xarray.h" -> - s/lrc/LRC (John H) - Fix commit message Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 5 +++ .../gpu/d

[PATCH 07/18] drm/i915/guc: Insert fence on context when deregistering

2021-07-21 Thread Matthew Brost
complete the context is registered and the fence is released. v2: (John H) - Fix commit message Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c | 1 + drivers/gpu/drm/i915/gt/intel_context_types.h | 5 ++ .../gpu

[PATCH 17/18] drm/i915/guc: Add trace point for GuC submit

2021-07-21 Thread Matthew Brost
Add trace point for GuC submit. Extended existing request trace points to include submit fence value,, guc_id, and ring tail value. v2: Fix white space alignment in i915_request_add trace point v3: Delete dep_from , dep_to (Tvrtko) Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by

[PATCH 10/18] drm/i915/guc: Extend deregistration fence to schedule disable

2021-07-21 Thread Matthew Brost
Extend the deregistration context fence to fence whne a GuC context has scheduling disable pending. v2: (John H) - Update comment why we check the pin count within spin lock Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc

[PATCH 14/18] drm/i915/guc: Ensure G2H response has space in buffer

2021-07-21 Thread Matthew Brost
ohn H) - CTB_G2H_BUFFER_SIZE / 4 == G2H_ROOM_BUFFER_SIZE Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 8 +- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 94 +++ drivers/gpu/drm/i915/

[PATCH 13/18] drm/i915/guc: Disable semaphores when using GuC scheduling

2021-07-21 Thread Matthew Brost
for GuC submission. This patch fixes an existing bugs where I915_ENGINE_HAS_SEMAPHORES was not honored correctly. v2: Reword commit message v3: (John H) - Add text to commit indicating this also fixing an existing bug v4: (John H) - s/bug/bugs Cc: John Harrison Signed-off-by: Matthew Brost

[PATCH 05/18] drm/i915/guc: Add bypass tasklet submission path to GuC

2021-07-21 Thread Matthew Brost
Add bypass tasklet submission path to GuC. The tasklet is only used if H2G channel has backpresure. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 37 +++ 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a

[PATCH 11/18] drm/i915: Disable preempt busywait when using GuC scheduling

2021-07-21 Thread Matthew Brost
Disable preempt busywait when using GuC scheduling. This isn't needed as the GuC controls preemption when scheduling. v2: (John H): - Fix commit message Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 6

[PATCH 16/18] drm/i915/guc: Update GuC debugfs to support new GuC

2021-07-21 Thread Matthew Brost
Update GuC debugfs to support the new GuC structures. v2: (John Harrison) - Remove intel_lrc_reg.h include from i915_debugfs.c (Michal) - Rename GuC debugfs functions Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc

[PATCH 15/18] drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC

2021-07-21 Thread Matthew Brost
Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +- drivers/gpu/drm/i915/gt/intel_gt.c| 19 drivers/gpu/drm/i915/gt/intel_gt.h| 2 + drivers/gpu/drm/i915/gt/intel_gt_requests.c | 21 ++--- drivers/gpu/

[PATCH 18/18] drm/i915: Add intel_context tracing

2021-07-21 Thread Matthew Brost
Add intel_context tracing. These trace points are particular helpful when debugging the GuC firmware and can be enabled via CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS kernel config option. Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt

Re: [PATCH 33/51] drm/i915/guc: Provide mmio list to be saved/restored on engine reset

2021-07-21 Thread Matthew Brost
On Fri, Jul 16, 2021 at 01:17:06PM -0700, Matthew Brost wrote: > From: John Harrison > > The driver must provide GuC with a list of mmio registers > that should be saved/restored during a GuC-based engine reset. > Unfortunately, the list must be dynamically allocated as its siz

Re: [Intel-gfx] [PATCH 06/51] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-22 Thread Matthew Brost
On Thu, Jul 22, 2021 at 09:57:00AM +0200, Michal Wajdeczko wrote: > > > On 22.07.2021 01:51, Daniele Ceraolo Spurio wrote: > > > > > > On 7/19/2021 9:04 PM, Matthew Brost wrote: > >> On Mon, Jul 19, 2021 at 05:51:46PM -0700, Daniele Ceraolo Spurio wro

Re: [PATCH 43/51] drm/i915/guc: Support request cancellation

2021-07-22 Thread Matthew Brost
On Thu, Jul 22, 2021 at 12:56:56PM -0700, Daniele Ceraolo Spurio wrote: > > > On 7/16/2021 1:17 PM, Matthew Brost wrote: > > This adds GuC backend support for i915_request_cancel(), which in turn > > makes CONFIG_DRM_I915_REQUEST_TIMEOUT work. > > This needs a bit

  1   2   3   4   5   6   7   8   9   10   >