[Intel-gfx] [PATCH v4] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-05 Thread Chris Wilson
completion check to accommodate that and avoid checking too early (before we've had a chance to handle any engine resets required). v2: Attach a callback to flush the work immediately upon the heartbeat completion and insert the delay before the next. Suggested-by: CQ Tang Signed-off-by: Chris

[Intel-gfx] [PATCH] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-05 Thread Chris Wilson
completion check to accommodate that and avoid checking too early (before we've had a chance to handle any engine resets required). v2: Attach a callback to flush the work immediately upon the heartbeat completion and insert the delay before the next. Suggested-by: CQ Tang Signed-off-by: Chris

[Intel-gfx] [PATCH i-g-t] i915/module_load: Tidy up gem_exec_store workalike

2021-02-05 Thread Chris Wilson
We emit a store on each GPU after loading the module to confirm the basic liveness of command submission. Trim away some of the chaff. Signed-off-by: Chris Wilson Cc: Ramalingam C --- tests/i915/i915_module_load.c | 146 ++ 1 file changed, 58 insertions(+), 88

[Intel-gfx] [PATCH] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-04 Thread Chris Wilson
completion check to accommodate that and avoid checking too early (before we've had a chance to handle any engine resets required). v2: Attach a callback to flush the work immediately upon the heartbeat completion and insert the delay before the next. Suggested-by: CQ Tang Signed-off-by: Chris

[Intel-gfx] [PATCH] drm/i915/selftest: Synchronise with the GPU timestamp

2021-02-04 Thread Chris Wilson
Wait for the GPU to wake up from the semaphore before measuring the time, so that we coordinate the sampling on both the CPU and GPU for more accurate comparisons. Reported-by: Bruce Chang Signed-off-by: Chris Wilson Cc: CQ Tang --- drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 4 +++- 1

[Intel-gfx] [CI 2/2] drm/i915/gt: Double check heartbeat timeout before resetting

2021-02-04 Thread Chris Wilson
Check that we have actually passed the heartbeat interval since last checking the request before resetting the device. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2780 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 11

[Intel-gfx] [CI 1/2] drm/i915/selftests: Restore previous heartbeat interval

2021-02-04 Thread Chris Wilson
Use the defaults we store on the engine when resetting the heartbeat as we may have had to adjust it from the config value during initialisation. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- .../gpu/drm/i915/gt/selftest_engine_heartbeat.c| 14 ++ 1 file changed

Re: [Intel-gfx] [PATCH 32/57] drm/i915: Move needs-breadcrumb flags to scheduler

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 15:28:30) > > On 01/02/2021 08:56, Chris Wilson wrote: > > Whether the scheduler depends on interrupt delivery for forward progress > > is a property of the scheduler backend not of the underlying engine, so > > move the fla

Re: [Intel-gfx] [PATCH 30/57] drm/i915: Move timeslicing flag to scheduler

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 15:18:31) > > On 01/02/2021 08:56, Chris Wilson wrote: > > Whether a scheduler chooses to implement timeslicing is up to it, and > > not an underlying property of the HW engine. The scheduler does depend > > on the HW supporting pr

Re: [Intel-gfx] [PATCH 29/57] drm/i915: Move scheduler flags

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 15:14:20) > > On 01/02/2021 08:56, Chris Wilson wrote: > > Start extracting the scheduling flags from the engine. We begin with its > > own existence. > > > > Signed-off-by: Chris Wilson > > --- > > drivers/

Re: [Intel-gfx] [PATCH 26/57] drm/i915: Move finding the current active request to the scheduler

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 14:30:18) > > On 01/02/2021 08:56, Chris Wilson wrote: > > Since finding the currently active request starts by walking the > > scheduler lists under the scheduler lock, move the routine to the > > scheduler. > > &

Re: [Intel-gfx] [PATCH 25/57] drm/i915: Move submit_request to i915_sched_engine

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 14:13:17) > > On 01/02/2021 08:56, Chris Wilson wrote: > > @@ -28,6 +28,15 @@ struct i915_sched { > > > > unsigned long mask; /* available scheduling channels */ > > > > + /* > > + * Pass the re

Re: [Intel-gfx] [PATCH 24/57] drm/i915/gt: Only kick the scheduler on timeslice/preemption change

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 14:09:22) > > On 01/02/2021 08:56, Chris Wilson wrote: > > Kick the scheduler to allow it to see the timeslice duration change, > > don't peek into execlists. > > > > Signed-off-by: Chris Wilson > > --- > > dr

Re: [Intel-gfx] [PATCH v3 2/3] drm/i915/gt: Double check heartbeat timeout before resetting

2021-02-04 Thread Chris Wilson
Quoting Mika Kuoppala (2021-02-04 12:57:46) > Chris Wilson writes: > > > Check that we have actually passed the heartbeat interval since last > > checking the request before resetting the device. > > > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues

Re: [Intel-gfx] [PATCH 1/2] drm/i915: cleanup the region class/instance encoding

2021-02-04 Thread Chris Wilson
; > Signed-off-by: Matthew Auld That is a lot easier to read, Reviewed-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 2/2] drm/i915: give stolen system memory its own class

2021-02-04 Thread Chris Wilson
y: Matthew Auld Straightforward, Reviewed-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [RFC 3/3] drm/i915/gt: Export device and per-process runtimes via procfs

2021-02-04 Thread Chris Wilson
Register with /proc/gpu to provide the client runtimes for generic top-like overview, e.g. gnome-system-monitor can use this information to show the per-process multi-GPU usage. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt.c

[Intel-gfx] [RFC 1/3] proc: Show GPU runtimes

2021-02-04 Thread Chris Wilson
that would show the GPU% on/next the CPU overview. Then we could have a futher expansion of a GPU% into per-channel utilisation. That would be useful to check to see what is saturating a particular channel, e.g. find the video decoder bottleneck. Signed-off-by: Chris Wilson --- fs/proc/Makefile

[Intel-gfx] [RFC 2/3] drm/i915: Look up clients by pid

2021-02-04 Thread Chris Wilson
Use the pid to find associated clients, and report their runtime. This will be used to provide the information via procfs. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drm_client.c | 70 +++--- drivers/gpu/drm/i915/i915_drm_client.h | 12 +++-- 2 files changed

Re: [Intel-gfx] [PATCH 20/57] drm/i915: Wrap access to intel_engine.active

2021-02-04 Thread Chris Wilson
Quoting Chris Wilson (2021-02-04 11:18:29) > Quoting Tvrtko Ursulin (2021-02-04 11:07:07) > > > > > > On 01/02/2021 08:56, Chris Wilson wrote: > > > diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c > > > b/drivers/gpu/drm/i915/gt/i

Re: [Intel-gfx] [PATCH 22/57] drm/i915: Move scheduler queue

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 11:19:00) > > On 01/02/2021 08:56, Chris Wilson wrote: > > @@ -252,10 +242,6 @@ struct intel_engine_execlists { > >*/ > > int queue_priority_hint; > > > > - /** > > - * @q

Re: [Intel-gfx] [PATCH 22/57] drm/i915: Move scheduler queue

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 11:19:00) > > On 01/02/2021 08:56, Chris Wilson wrote: > > bool intel_engine_is_idle(struct intel_engine_cs *engine) > > { > > + struct i915_sched *se = intel_engine_get_scheduler(engine); > > What do you ha

Re: [Intel-gfx] [PATCH 20/57] drm/i915: Wrap access to intel_engine.active

2021-02-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-04 11:07:07) > > > On 01/02/2021 08:56, Chris Wilson wrote: > > diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c > > b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c > > index b56e321ef003..280d84c4e4b7 100644 >

[Intel-gfx] [PATCH v3 2/3] drm/i915/gt: Double check heartbeat timeout before resetting

2021-02-04 Thread Chris Wilson
Check that we have actually passed the heartbeat interval since last checking the request before resetting the device. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2780 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 11 ++- 1 file changed

[Intel-gfx] [PATCH v3 3/3] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-04 Thread Chris Wilson
completion check to accommodate that and avoid checking too early (before we've had a chance to handle any engine resets required). v2: Attach a callback to flush the work immediately upon the heartbeat completion and insert the delay before the next. Suggested-by: CQ Tang Signed-off-by: Chris

[Intel-gfx] [PATCH v3 1/3] drm/i915/selftests: Restore previous heartbeat interval

2021-02-04 Thread Chris Wilson
Use the defaults we store on the engine when resetting the heartbeat as we may have had to adjust it from the config value during initialisation. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/selftest_engine_heartbeat.c| 14 ++ 1 file changed, 10 insertions(+), 4 deletions

[Intel-gfx] [PATCH v2 1/2] drm/i915/selftests: Restore previous heartbeat interval

2021-02-04 Thread Chris Wilson
Use the defaults we store on the engine when resetting the heartbeat as we may have had to adjust it from the config value during initialisation. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/selftest_engine_heartbeat.c| 14 ++ 1 file changed, 10 insertions(+), 4 deletions

[Intel-gfx] [PATCH v2 2/2] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-04 Thread Chris Wilson
completion check to accommodate that and avoid checking too early (before we've had a chance to handle any engine resets required). v2: Attach a callback to flush the work immediately upon the heartbeat completion and insert the delay before the next. Suggested-by: CQ Tang Signed-off-by: Chris

[Intel-gfx] [PATCH 2/2] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-04 Thread Chris Wilson
completion check to accommodate that and avoid checking too early (before we've had a chance to handle any engine resets required). v2: Attach a callback to flush the work immediately upon the heartbeat completion and insert the delay before the next. Suggested-by: CQ Tang Signed-off-by: Chris

[Intel-gfx] [PATCH 1/2] drm/i915/selftests: Restore previous heartbeat interval

2021-02-04 Thread Chris Wilson
Use the defaults we store on the engine when resetting the heartbeat as we may have had to adjust it from the config value during initialisation. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/selftest_engine_heartbeat.c | 17 - 1 file changed, 12 insertions(+), 5 deletions

[Intel-gfx] [PATCH v2] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-03 Thread Chris Wilson
completion check to accommodate that and avoid checking too early (before we've had a chance to handle any engine resets required). v2: Attach a callback to flush the work immediately upon the heartbeat completion and insert the delay before the next. Suggested-by: CQ Tang Signed-off-by: Chris

[Intel-gfx] [PATCH] drm/i915/gt: Ratelimit heartbeat completion probing

2021-02-03 Thread Chris Wilson
completion check to accomodate that and avoid checking too early (before we've had a chance to handle any engine resets required). Suggested-by: CQ Tang Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 32 +++ 1 file changed, 32 insertions(+) diff

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] intel_gpu_top: Wrap interactive header

2021-02-03 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-03 13:12:05) > > On 03/02/2021 11:00, Chris Wilson wrote: > > Quoting Tvrtko Ursulin (2021-02-03 10:31:04) > >> > >> On 01/02/2021 12:07, Chris Wilson wrote: > >>> Quoting Tvrtko Ursulin (2021-02-01 11:57:56) > &g

[Intel-gfx] [CI 5/9] drm/i915: Improve DFS for priority inheritance

2021-02-03 Thread Chris Wilson
, the memoization of how far we had progressed down a branch was forgotten. The result was that instead of running in linear time, it was running in geometric time and could easily run for a few hundred milliseconds given a wide enough graph, not the microseconds as required. Signed-off-by: Chris Wilson Reviewed

[Intel-gfx] [CI 3/9] drm/i915/selftests: Measure set-priority duration

2021-02-03 Thread Chris Wilson
As a topological sort, we expect it to run in linear graph time, O(V+E). In removing the recursion, it is no longer a DFS but rather a BFS, and performs as O(VE). Let's demonstrate how bad this is with a few examples, and build a few test cases to verify a potential fix. Signed-off-by: Chris

[Intel-gfx] [CI 2/9] drm/i915: Restructure priority inheritance

2021-02-03 Thread Chris Wilson
the entire multi-engine priority inheritance depth-first search, to a smaller lock on each engine around a single list on that engine. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 + .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 3

[Intel-gfx] [CI 6/9] drm/i915: Extract request submission from execlists

2021-02-03 Thread Chris Wilson
In the process of preparing to reuse the request submission logic for other backends, lift it out of the execlists backend. It already operates on the common structs, so just a matter of moving and renaming. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt

[Intel-gfx] [CI 7/9] drm/i915: Extract request rewinding from execlists

2021-02-03 Thread Chris Wilson
In the process of preparing to reuse the request submission logic for other backends, lift it out of the execlists backend. While this operates on the common structs, we do have a bit of backend knowledge, which is harmless for !lrc but still unsightly. Signed-off-by: Chris Wilson Reviewed

[Intel-gfx] [CI 8/9] drm/i915: Extract request suspension from the execlists

2021-02-03 Thread Chris Wilson
Make the ability to suspend and resume a request and its dependents generic. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 167 +- drivers/gpu/drm/i915/gt/selftest_execlists.c | 8 +- drivers/gpu/drm/i915

[Intel-gfx] [CI 9/9] drm/i915: Extract the ability to defer and rerun a request later

2021-02-03 Thread Chris Wilson
Lift the ability to defer a request until later from execlists into the common layer. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 57 +++-- drivers/gpu/drm/i915/i915_scheduler.c | 63

[Intel-gfx] [CI 1/9] drm/i915: Replace engine->schedule() with a known request operation

2021-02-03 Thread Chris Wilson
oal. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/display/intel_display.c | 5 ++- drivers/gpu/drm/i915/gem/i915_gem_object.h| 5 ++- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 29 +--- drivers/gpu/drm/i915/gt/intel_engine_cs.c |

[Intel-gfx] [CI 4/9] drm/i915/selftests: Exercise priority inheritance around an engine loop

2021-02-03 Thread Chris Wilson
Exercise rescheduling priority inheritance around a sequence of requests that wrap around all the engines. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../gpu/drm/i915/selftests/i915_scheduler.c | 215 ++ 1 file changed, 215 insertions(+) diff --git a/drivers

[Intel-gfx] [PATCH v3] drm/i915: Prevent waiting inside ring construction for critical sections

2021-02-03 Thread Chris Wilson
uld prefer to handle an EWOULDBLOCK error instead. In both cases we need to propagate the flag to various blocking wait points, the first and usually hit is intel_ring::wait_for_space(). Testcase: igt/gem_ctx_ringsize/spin Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffe

[Intel-gfx] [PATCH v2] drm/i915: Prevent waiting inside ring construction for critical sections

2021-02-03 Thread Chris Wilson
uld prefer to handle an EWOULDBLOCK error instead. In both cases we need to propagate the flag to various blocking wait points, the first and usually hit is intel_ring::wait_for_space(). Testcase: igt/gem_ctx_ringsize/spin Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffe

Re: [Intel-gfx] [PATCH v2 1/3] drm/i915: Distinction of memory regions

2021-02-03 Thread Chris Wilson
.c > +++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c > @@ -90,8 +90,6 @@ region_lmem_init(struct intel_memory_region *mem) > if (ret) > io_mapping_fini(>iomap); > > - intel_memory_region_set_name(mem, "local"); Ok. So in gt_probe_lmem we set up the struct, a

Re: [Intel-gfx] [PATCH v2 3/3] drm/i915/gtt/dg1: add PTE_LM plumbing for GGTT

2021-02-03 Thread Chris Wilson
1) Too subtle. Leave a line between the different GTT. Reviewed-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v2 2/3] drm/i915/gtt/dg1: add PTE_LM plumbing for ppGTT

2021-02-03 Thread Chris Wilson
at shouldn't be there :( [Hmm. We broke alphabetical ordering.] > #include "gen6_ppgtt.h" > #include "gen8_ppgtt.h" > > @@ -192,6 +193,8 @@ void ppgtt_bind_vma(struct i915_address_space *vm, > pte_flags = 0; > if (i915_gem_object_is_readonly(vma->obj)) > pte_flags |= PTE_READ_ONLY; > + if (i915_gem_object_is_lmem(vma->obj)) > + pte_flags |= PTE_LM; > > vm->insert_entries(vm, vma, cache_level, pte_flags); > wmb(); Just nits, Reviewed-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915: Prevent waiting inside ring construction for critical sections

2021-02-03 Thread Chris Wilson
uld prefer to handle an EWOULDBLOCK error instead. In both cases we need to propagate the flag to various blocking wait points, the first and usually hit is intel_ring::wait_for_space(). Testcase: igt/gem_ctx_ringsize/spin Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gem/i915_gem_execbuffe

Re: [Intel-gfx] [PATCH 3/4] drm/i915/gtt: make ggtt.insert_page depend on mappable aperture

2021-02-03 Thread Chris Wilson
Quoting Matthew Auld (2021-02-03 12:11:18) > The vm insert_page is useful to insert a vma-less page into the GGTT, > which so far is always to map something through the mappable aperture, > usually when the entire VMA doesn't fit, or if we specifically don't > want to hog it, since it's generally

Re: [Intel-gfx] [PATCH i-g-t 2/2] intel_gpu_top: Add option to sort by PID

2021-02-03 Thread Chris Wilson
client_cmp = client_total_cmp; > - header_msg = "Sorting clients by accummulated GPU usage."; > - break; > - case 2: > - client_cmp = client_id_cmp; > - header_msg = "Sorting clients by sysfs id."; > - } &g

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 1/2] intel_gpu_top: Show banner messages when cycling sort modes

2021-02-03 Thread Chris Wilson
printf(" >>> %s\n", header_msg); > + header_msg = NULL; I was just about to ask if we showed it once, then cleared it 1s later. Reviewed-by: Chris Wilson > + } else { > +

Re: [Intel-gfx] [PATCH] drm/i915/rkl: Remove require_force_probe protection

2021-02-03 Thread Chris Wilson
ejas Upadhyay We now have a system in CI and that appears quite promising, Acked-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [CI 02/12] drm/i915/gt: Move submission_method into intel_gt

2021-02-03 Thread Chris Wilson
Since we setup the submission method for the engines once, it is easy to assign an enum and use that instead of probing into the backends. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine.h | 8 +++- drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 04/12] drm/i915: Replace engine->schedule() with a known request operation

2021-02-03 Thread Chris Wilson
oal. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/display/intel_display.c | 5 ++- drivers/gpu/drm/i915/gem/i915_gem_object.h| 5 ++- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 29 +--- drivers/gpu/drm/i915/gt/intel_engine_cs.c |

[Intel-gfx] [CI 03/12] drm/i915/gt: Move CS interrupt handler to the backend

2021-02-03 Thread Chris Wilson
is always justified; put a barrier on updating the irq handler so that we know that the next interrupt will be redirected towards ourselves. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++ drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 11/12] drm/i915: Extract request suspension from the execlists

2021-02-03 Thread Chris Wilson
Make the ability to suspend and resume a request and its dependents generic. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 167 +- drivers/gpu/drm/i915/gt/selftest_execlists.c | 8 +- drivers/gpu/drm/i915

[Intel-gfx] [CI 10/12] drm/i915: Extract request rewinding from execlists

2021-02-03 Thread Chris Wilson
In the process of preparing to reuse the request submission logic for other backends, lift it out of the execlists backend. While this operates on the common structs, we do have a bit of backend knowledge, which is harmless for !lrc but still unsightly. Signed-off-by: Chris Wilson Reviewed

[Intel-gfx] [CI 06/12] drm/i915/selftests: Measure set-priority duration

2021-02-03 Thread Chris Wilson
As a topological sort, we expect it to run in linear graph time, O(V+E). In removing the recursion, it is no longer a DFS but rather a BFS, and performs as O(VE). Let's demonstrate how bad this is with a few examples, and build a few test cases to verify a potential fix. Signed-off-by: Chris

[Intel-gfx] [CI 09/12] drm/i915: Extract request submission from execlists

2021-02-03 Thread Chris Wilson
In the process of preparing to reuse the request submission logic for other backends, lift it out of the execlists backend. It already operates on the common structs, so just a matter of moving and renaming. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt

[Intel-gfx] [CI 05/12] drm/i915: Restructure priority inheritance

2021-02-03 Thread Chris Wilson
the entire multi-engine priority inheritance depth-first search, to a smaller lock on each engine around a single list on that engine. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 + .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 3

[Intel-gfx] [CI 08/12] drm/i915: Improve DFS for priority inheritance

2021-02-03 Thread Chris Wilson
, the memoization of how far we had progressed down a branch was forgotten. The result was that instead of running in linear time, it was running in geometric time and could easily run for a few hundred milliseconds given a wide enough graph, not the microseconds as required. Signed-off-by: Chris Wilson Reviewed

[Intel-gfx] [CI 12/12] drm/i915: Extract the ability to defer and rerun a request later

2021-02-03 Thread Chris Wilson
Lift the ability to defer a request until later from execlists into the common layer. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 57 +++-- drivers/gpu/drm/i915/i915_scheduler.c | 63

[Intel-gfx] [CI 07/12] drm/i915/selftests: Exercise priority inheritance around an engine loop

2021-02-03 Thread Chris Wilson
Exercise rescheduling priority inheritance around a sequence of requests that wrap around all the engines. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../gpu/drm/i915/selftests/i915_scheduler.c | 215 ++ 1 file changed, 215 insertions(+) diff --git a/drivers

[Intel-gfx] [CI 01/12] drm/i915/gt: Move engine setup out of set_default_submission

2021-02-03 Thread Chris Wilson
-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 46 - .../gpu/drm/i915/gt/intel_ring_submission.c | 4 -- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 50 --- 3 files changed, 44 insertions(+), 56 deletions

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] intel_gpu_top: Always sort the clients array after update

2021-02-03 Thread Chris Wilson
e only functional difference of > eliminating two subsequent scans with no sort in between This closes a > very short window there list iteration could get confused if sysfs clients > would change rapidly and unfavourably during tool startup. > > Signed-off-by: Tvrtko

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] intel_gpu_top: Wrap interactive header

2021-02-03 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-02-03 10:31:04) > > On 01/02/2021 12:07, Chris Wilson wrote: > > Quoting Tvrtko Ursulin (2021-02-01 11:57:56) > >> From: Tvrtko Ursulin > >> > >> Slight improvement with regards to wrapping header components to fit > >

Re: [Intel-gfx] [PATCH] drm/i915: Apply VT-d scanout adjustment to the VMA

2021-02-03 Thread Chris Wilson
Quoting Ville Syrjälä (2021-02-03 09:00:54) > On Wed, Feb 03, 2021 at 08:38:41AM +0000, Chris Wilson wrote: > > Currently, we allocate exactly the VMA requested for the framebuffer and > > rely on filling the whole of the GGTT with scratch pages to catch when > > VT-d prefetc

[Intel-gfx] [CI 4/8] drm/i915/selftests: Remove redundant set-to-gtt-domain

2021-02-03 Thread Chris Wilson
Since the vma's backing store is flushed upon first creation, remove the manual calls to set-to-gtt-domain. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- .../gpu/drm/i915/gem/selftests/i915_gem_mman.c | 16 drivers/gpu/drm/i915/selftests/i915_vma.c| 6

[Intel-gfx] [CI 5/8] drm/i915/selftests: Replace unbound set-domain waits with explicit timeouts

2021-02-03 Thread Chris Wilson
Let's prefer to use explicit request tracking and bounded timeouts in our selftests. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- .../gpu/drm/i915/gt/selftest_workarounds.c| 106 +++--- 1 file changed, 40 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [CI 7/8] drm/i915/selftests: Remove redundant set-to-gtt-domain before batch submission

2021-02-03 Thread Chris Wilson
In construction the rpcs_query batch we know that it is device coherent and ready for execution, the set-to-gtt-domain here is redudant. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 -- 1 file changed, 2 deletions(-) diff

[Intel-gfx] [CI 6/8] drm/i915/selftests: Replace an unbounded set-domain wait with a timeout

2021-02-03 Thread Chris Wilson
After the memory-region test completes, it flushes the test by calling set-to-cpu-domain. Use the igt_flush_test as it includes a timeout, recovery and reports and error for miscreant tests. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/selftests

[Intel-gfx] [CI 2/8] drm/i915/selftests: Use a coherent map to setup scratch batch buffers

2021-02-03 Thread Chris Wilson
Instead of manipulating the object's cache domain, just use the device coherent map to write the batch buffer. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- .../drm/i915/gem/selftests/i915_gem_context.c| 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff

[Intel-gfx] [CI 8/8] drm/i915/gem: Manage all set-domain waits explicitly

2021-02-03 Thread Chris Wilson
Only perform the domain transition under the object lock, and push the required waits to outside the lock. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 9 +- drivers/gpu/drm/i915/gem/i915_gem_clflush.h | 2 - drivers/gpu/drm

[Intel-gfx] [CI 3/8] drm/i915/selftests: Replace the unbounded set-domain with an explicit wait

2021-02-03 Thread Chris Wilson
. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- .../i915/gem/selftests/i915_gem_client_blt.c | 26 ++- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c b/drivers/gpu/drm/i915/gem/selftests

[Intel-gfx] [CI 1/8] drm/i915/selftests: Set cache status for huge_gem_object

2021-02-03 Thread Chris Wilson
Set the cache coherency and status using the set-coherency helper. Otherwise, we forget to mark the new pages as cache dirty. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 14 +- 1 file changed, 5 insertions(+), 9

[Intel-gfx] [PATCH] drm/i915: Apply VT-d scanout adjustment to the VMA

2021-02-03 Thread Chris Wilson
-by: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 18 - drivers/gpu/drm/i915/gt/intel_ggtt.c | 23 -- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c b/drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH] drm/i915/gt: Move CS interrupt handler to the backend

2021-02-03 Thread Chris Wilson
is always justified; put a barrier on updating the irq handler so that we know that the next interrupt will be redirected towards ourselves. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++ drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 2/3] drm/i915/gt: Move submission_method into intel_gt

2021-02-02 Thread Chris Wilson
Since we setup the submission method for the engines once, it is easy to assign an enum and use that instead of probing into the backends. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine.h | 8 +++- drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 3/3] drm/i915/gt: Move CS interrupt handler to the backend

2021-02-02 Thread Chris Wilson
is always justified; put a barrier on updating the irq handler so that we know that the next interrupt will be redirected towards ourselves. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++ drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 1/3] drm/i915/gt: Move engine setup out of set_default_submission

2021-02-02 Thread Chris Wilson
-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 46 - .../gpu/drm/i915/gt/intel_ring_submission.c | 4 -- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 50 --- 3 files changed, 44 insertions(+), 56 deletions

[Intel-gfx] [CI 01/13] Oops with "ALSA: jack: implement software jack injection via debugfs"

2021-02-02 Thread Chris Wilson
From: Takashi Iwai On Tue, 02 Feb 2021 17:30:36 +0100, Chris Wilson wrote: > > commit 2d670ea2bd53 ("ALSA: jack: implement software jack injection via > debugfs") is causing issues for our CI as we see a use-after-free on > module unload (on all machines): > > http

[Intel-gfx] [CI 04/13] drm/i915/gt: Move CS interrupt handler to the backend

2021-02-02 Thread Chris Wilson
is always justified; put a barrier on updating the irq handler so that we know that the next interrupt will be redirected towards ourselves. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++ drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 10/13] drm/i915: Extract request submission from execlists

2021-02-02 Thread Chris Wilson
In the process of preparing to reuse the request submission logic for other backends, lift it out of the execlists backend. It already operates on the common structs, so just a matter of moving and renaming. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt

[Intel-gfx] [CI 02/13] drm/i915/gt: Move engine setup out of set_default_submission

2021-02-02 Thread Chris Wilson
-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 46 - .../gpu/drm/i915/gt/intel_ring_submission.c | 4 -- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 50 --- 3 files changed, 44 insertions(+), 56 deletions

[Intel-gfx] [CI 03/13] drm/i915/gt: Move submission_method into intel_gt

2021-02-02 Thread Chris Wilson
Since we setup the submission method for the engines once, it is easy to assign an enum and use that instead of probing into the backends. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine.h | 8 +++- drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 11/13] drm/i915: Extract request rewinding from execlists

2021-02-02 Thread Chris Wilson
In the process of preparing to reuse the request submission logic for other backends, lift it out of the execlists backend. While this operates on the common structs, we do have a bit of backend knowledge, which is harmless for !lrc but still unsightly. Signed-off-by: Chris Wilson Reviewed

[Intel-gfx] [CI 08/13] drm/i915/selftests: Exercise priority inheritance around an engine loop

2021-02-02 Thread Chris Wilson
Exercise rescheduling priority inheritance around a sequence of requests that wrap around all the engines. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../gpu/drm/i915/selftests/i915_scheduler.c | 225 ++ 1 file changed, 225 insertions(+) diff --git a/drivers

[Intel-gfx] [CI 05/13] drm/i915: Replace engine->schedule() with a known request operation

2021-02-02 Thread Chris Wilson
oal. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/display/intel_display.c | 5 ++- drivers/gpu/drm/i915/gem/i915_gem_object.h| 5 ++- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 29 +--- drivers/gpu/drm/i915/gt/intel_engine_cs.c |

[Intel-gfx] [CI 07/13] drm/i915/selftests: Measure set-priority duration

2021-02-02 Thread Chris Wilson
As a topological sort, we expect it to run in linear graph time, O(V+E). In removing the recursion, it is no longer a DFS but rather a BFS, and performs as O(VE). Let's demonstrate how bad this is with a few examples, and build a few test cases to verify a potential fix. Signed-off-by: Chris

[Intel-gfx] [CI 12/13] drm/i915: Extract request suspension from the execlists

2021-02-02 Thread Chris Wilson
Make the ability to suspend and resume a request and its dependents generic. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 167 +- drivers/gpu/drm/i915/gt/selftest_execlists.c | 8 +- drivers/gpu/drm/i915

[Intel-gfx] [CI 06/13] drm/i915: Restructure priority inheritance

2021-02-02 Thread Chris Wilson
the entire multi-engine priority inheritance depth-first search, to a smaller lock on each engine around a single list on that engine. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 + .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 3

[Intel-gfx] [CI 09/13] drm/i915: Improve DFS for priority inheritance

2021-02-02 Thread Chris Wilson
, the memoization of how far we had progressed down a branch was forgotten. The result was that instead of running in linear time, it was running in geometric time and could easily run for a few hundred milliseconds given a wide enough graph, not the microseconds as required. Signed-off-by: Chris Wilson Reviewed

[Intel-gfx] [CI 13/13] drm/i915: Extract the ability to defer and rerun a request later

2021-02-02 Thread Chris Wilson
Lift the ability to defer a request until later from execlists into the common layer. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- .../drm/i915/gt/intel_execlists_submission.c | 57 +++-- drivers/gpu/drm/i915/i915_scheduler.c | 63

Re: [Intel-gfx] [CI 08/14] drm/i915/selftests: Force a rewind if at first we don't succeed

2021-02-02 Thread Chris Wilson
Quoting Chris Wilson (2021-02-02 21:24:16) > Quoting Chris Wilson (2021-02-02 21:14:35) > > Quoting Chris Wilson (2021-02-02 17:43:53) > > > Let's see how horrible it is to cycle elements on defer. (Curse the > > > irqlock pollution.) > > > > While that did

Re: [Intel-gfx] [CI 08/14] drm/i915/selftests: Force a rewind if at first we don't succeed

2021-02-02 Thread Chris Wilson
Quoting Chris Wilson (2021-02-02 21:14:35) > Quoting Chris Wilson (2021-02-02 17:43:53) > > Let's see how horrible it is to cycle elements on defer. (Curse the > > irqlock pollution.) > > While that did work. I do not have a good idea on how to do list > rotation o

[Intel-gfx] [CI] Oops with "ALSA: jack: implement software jack injection via debugfs"

2021-02-02 Thread Chris Wilson
From: Takashi Iwai On Tue, 02 Feb 2021 17:30:36 +0100, Chris Wilson wrote: > > commit 2d670ea2bd53 ("ALSA: jack: implement software jack injection via > debugfs") is causing issues for our CI as we see a use-after-free on > module unload (on all machines): > > http

[Intel-gfx] [CI 3/3] Oops with "ALSA: jack: implement software jack injection via debugfs"

2021-02-02 Thread Chris Wilson
From: Takashi Iwai On Tue, 02 Feb 2021 17:30:36 +0100, Chris Wilson wrote: > > commit 2d670ea2bd53 ("ALSA: jack: implement software jack injection via > debugfs") is causing issues for our CI as we see a use-after-free on > module unload (on all machines): > > http

[Intel-gfx] [CI 2/3] drm-tip: 2021y-02m-02d-12h-50m-06s UTC integration manifest

2021-02-02 Thread Chris Wilson
From: Joonas Lahtinen --- integration-manifest | 40 1 file changed, 40 insertions(+) create mode 100644 integration-manifest diff --git a/integration-manifest b/integration-manifest new file mode 100644 index ..d80099bceaa5 --- /dev/null

[Intel-gfx] [CI 1/3] *** HAX FOR CI *** Revert "rtc: mc146818: Detect and handle broken RTCs"

2021-02-02 Thread Chris Wilson
From: Jani Nikula This reverts commit 211e5db19d15a721b2953ea54b8f26c2963720eb. --- drivers/rtc/rtc-cmos.c | 8 drivers/rtc/rtc-mc146818-lib.c | 7 --- 2 files changed, 15 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index

Re: [Intel-gfx] [CI 08/14] drm/i915/selftests: Force a rewind if at first we don't succeed

2021-02-02 Thread Chris Wilson
Quoting Chris Wilson (2021-02-02 17:43:53) > Let's see how horrible it is to cycle elements on defer. (Curse the > irqlock pollution.) While that did work. I do not have a good idea on how to do list rotation on an RCU list. I can see that it must require a pair of synchroni

<    1   2   3   4   5   6   7   8   9   10   >