[Intel-gfx] [PATCH 34/41] Restore "drm/i915: drop engine_pin/unpin_breadcrumbs_irq"

2021-01-25 Thread Chris Wilson
This was removed in commit 478ffad6d690 ("drm/i915: drop engine_pin/unpin_breadcrumbs_irq") as the last user had been removed, but now there is a promise of a new user in the next patch. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/intel_breadcru

[Intel-gfx] [PATCH 01/41] drm/i915/selftests: Check for engine-reset errors in the middle of workarounds

2021-01-25 Thread Chris Wilson
As we reset the engine between verifying the workarounds remain intact, report an engine reset failure. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH 08/41] drm/i915: Improve DFS for priority inheritance

2021-01-25 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

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

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

[Intel-gfx] [PATCH 09/41] drm/i915/selftests: Exercise relative mmio paths to non-privileged registers

2021-01-25 Thread Chris Wilson
Verify that context isolation is also preserved when accessing context-local registers with relative-mmio commands. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/selftest_lrc.c | 88 -- 1 file changed, 67 insertions(+), 21 deletions(-) diff --git a/drivers/gpu

[Intel-gfx] [PATCH 35/41] drm/i915/gt: Couple tasklet scheduling for all CS interrupts

2021-01-25 Thread Chris Wilson
If any engine asks for the tasklet to be kicked from the CS interrupt, do so. Currently, this is used by the execlists scheduler backends to feed in the next request to the HW, and similarly could be used by a ring scheduler, as will be seen in the next patch. Signed-off-by: Chris Wilson

[Intel-gfx] [PATCH 02/41] drm/i915/gt: Move the defer_request waiter active assertion

2021-01-25 Thread Chris Wilson
by the tasklet. We can filter out retired requests here by doing the assertion check after the is-ready check (active is a subset of being ready). Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2978 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- 1 file

[Intel-gfx] [PATCH 16/41] drm/i915: Move common active lists from engine to i915_scheduler

2021-01-25 Thread Chris Wilson
Extract the scheduler lists into a related structure, stop sprawling over struct intel_engine_cs Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 26 +- drivers/gpu/drm/i915/gt/intel_engine_types.h | 8 + .../drm/i915/gt

[Intel-gfx] [PATCH 03/41] drm/i915: Replace engine->schedule() with a known request operation

2021-01-25 Thread Chris Wilson
oal. Signed-off-by: Chris Wilson --- 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 | 3 -- .../gpu/drm/i915

[Intel-gfx] [PATCH 14/41] drm/i915: Extract the ability to defer and rerun a request later

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

[Intel-gfx] [PATCH 22/41] drm/i915: Fair low-latency scheduling

2021-01-25 Thread Chris Wilson
dentally preventing scheduling of ready workloads due to busy spinners. This scheduler is based on MuQSS by Dr Con Kolivas. Testcase: igt/gem_exec_fair Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 - .../gpu/drm/i915/gt/intel_engine_heartbeat.c |

[Intel-gfx] [PATCH 06/41] drm/i915/selftests: Measure set-priority duration

2021-01-25 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] [PATCH 05/41] drm/i915: Restructure priority inheritance

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

[Intel-gfx] [PATCH 04/41] drm/i915: Teach the i915_dependency to use a double-lock

2021-01-25 Thread Chris Wilson
off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_request.c | 2 +- drivers/gpu/drm/i915/i915_scheduler.c | 65 + drivers/gpu/drm/i915/i915_scheduler.h | 2 +- drivers/gpu/drm/i915/i915_scheduler_types.h | 2 + 4 files changed, 46 insertions(+), 25 deleti

[Intel-gfx] [PATCH 20/41] drm/i915: Replace priolist rbtree with a skiplist

2021-01-25 Thread Chris Wilson
) and there is a significant memory penalty to as each skip node is larger than the rbtree equivalent. Furthermore, we don't use dynamic arrays for the skiplist, so the allocation is fixed, and imposes an upper bound on the scalability wrt to the number of inflight requests. Signed-off-by: Chris Wilson --- .../drm

[Intel-gfx] [PATCH 27/41] drm/i915: Bump default timeslicing quantum to 5ms

2021-01-25 Thread Chris Wilson
Primarily to smooth over differences with the guc backend that struggles with smaller quanta, bump the default timeslicing to 5ms from 1ms. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Kconfig.profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH 23/41] drm/i915/gt: Specify a deadline for the heartbeat

2021-01-25 Thread Chris Wilson
to. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c index 2d1f0a4da13c

[Intel-gfx] [PATCH 29/41] drm/i915/gt: Track timeline GGTT offset separately from subpage offset

2021-01-25 Thread Chris Wilson
and so need more than 12b. Signed-off-by: Chris Wilson Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/gen6_engine_cs.c | 4 ++-- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_timeline.c

[Intel-gfx] [PATCH 30/41] drm/i915/gt: Add timeline "mode"

2021-01-25 Thread Chris Wilson
Explicitly differentiate between the absolute and relative timelines, and the global HWSP and ppHWSP relative offsets. When using a timeline that is relative to a known status page, we can replace the absolute addressing in the commands with indexed variants. Signed-off-by: Chris Wilson Reviewed

[Intel-gfx] [PATCH 24/41] drm/i915: Extend the priority boosting for the display with a deadline

2021-01-25 Thread Chris Wilson
For a modeset/pageflip, there is a very precise deadline by which the frame must be completed in order to hit the vblank and be shown. While we don't pass along that exact information, we can at least inform the scheduler that this request-chain needs to be completed asap. Signed-off-by: Chris

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

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

[Intel-gfx] [PATCH 32/41] drm/i915/selftests: Exercise relative timeline modes

2021-01-25 Thread Chris Wilson
A quick test to verify that the backend accepts each type of timeline and can use them to track and control request emission. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/selftest_timeline.c | 105 1 file changed, 105 insertions(+) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH 21/41] drm/i915: Wrap cmpxchg64 with try_cmpxchg64() helper

2021-01-25 Thread Chris Wilson
Wrap cmpxchg64 with a try_cmpxchg()-esque helper. Hiding the old-value dance in the helper allows for cleaner code. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_utils.h | 32 +++ 1 file changed, 32 insertions(+) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 25/41] drm/i915/gt: Support virtual engine queues

2021-01-25 Thread Chris Wilson
of the siblings. Signed-off-by: Chris Wilson --- .../drm/i915/gt/intel_execlists_submission.c | 421 +- drivers/gpu/drm/i915/i915_request.c | 12 +- drivers/gpu/drm/i915/i915_scheduler.c | 65 ++- drivers/gpu/drm/i915/i915_scheduler.h | 4 +- 4 files changed

[Intel-gfx] [PATCH 37/41] drm/i915/gt: Use client timeline address for seqno writes

2021-01-25 Thread Chris Wilson
If we allow for per-client timelines, even with legacy ring submission, we open the door to a world full of possiblities [scheduling and semaphores]. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/gen2_engine_cs.c | 72 ++- drivers/gpu/drm/i915/gt/gen2_engine_cs.h

[Intel-gfx] [PATCH 26/41] drm/i915: Move saturated workload detection back to the context

2021-01-25 Thread Chris Wilson
the semaphores to lightly utilised system where the latency between requests is more noticeable, and curtail the bus-contention from checking for signaled semaphores. References: 44d89409a12e ("drm/i915: Make the semaphore saturation mask global") Signed-off-by: Chris Wilson --- drive

[Intel-gfx] [PATCH 40/41] drm/i915/gt: Enable ring scheduling for gen5-7

2021-01-25 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 ++ drivers/gpu/drm/i915/gt/intel_rps.c | 6 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/dr

[Intel-gfx] [PATCH 28/41] drm/i915/gt: Wrap intel_timeline.has_initial_breadcrumb

2021-01-25 Thread Chris Wilson
In preparation for removing the has_initial_breadcrumb field, add a helper function for the existing callers. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c| 2 +- drivers/gpu/drm/i915/gt/intel_ring_submission.c | 4 ++-- drivers/gpu

[Intel-gfx] [PATCH 33/41] drm/i915/gt: Use ppHWSP for unshared non-semaphore related timelines

2021-01-25 Thread Chris Wilson
independent timelines. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_lrc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c index

[Intel-gfx] [PATCH 38/41] drm/i915/gt: Infrastructure for ring scheduling

2021-01-25 Thread Chris Wilson
interrupts do not appear to be affecting throughput (+-10%, some tasks even improve to the reduced request overheads) and improve latency. [Which is a massive improvement since the introduction of Sandybridge!] Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Makefile | 1 + drivers

[Intel-gfx] [PATCH 41/41] drm/i915: Support secure dispatch on gen6/gen7

2021-01-25 Thread Chris Wilson
Re-enable secure dispatch for gen6/gen7, primarily to workaround the command parser and overly zealous command validation on Haswell. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 31/41] drm/i915/gt: Use indices for writing into relative timelines

2021-01-25 Thread Chris Wilson
Relative timelines are relative to either the global or per-process HWSP, and so we can replace the absolute addressing with store-index variants for position invariance. Signed-off-by: Chris Wilson Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 98

[Intel-gfx] [PATCH 36/41] drm/i915/gt: Support creation of 'internal' rings

2021-01-25 Thread Chris Wilson
. As they are not bound, we need to nerf a few assumptions that a rq->ring is in the GGTT. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_context.c| 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 17 +- drivers/gpu/drm/i915/gt/intel_ring.c |

[Intel-gfx] [PATCH 39/41] drm/i915/gt: Implement ring scheduler for gen4-7

2021-01-25 Thread Chris Wilson
. Having built the ring scheduler infrastructure over top of the global ringbuffer submission, we now need to provide the HW knowledge required to build command packets and implement context switching. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/intel_ring_scheduler.c| 454

[Intel-gfx] [PATCH] drm/i915/gem: Drop lru bumping on display unpinning

2021-01-25 Thread Chris Wilson
bumping LRU is no more, and we can save more time by not. Reported-and-tested-by: Matti Hämäläinen Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2905 Fixes: c1793ba86a41 ("drm/i915: Add ww locking to pin_to_display_plane, v2.") Signed-off-by: Chris Wilson Reviewed-by: Matthew

Re: [PATCH] drm/i915/gem: fix non-SMP build failure

2021-01-25 Thread Chris Wilson
Quoting Arnd Bergmann (2021-01-25 12:25:34) > From: Arnd Bergmann > > The x86-specific wbinvd_on_all_cpus() function is exported > through asm/smp.h, causing a build failure in the i915 driver > when SMP is disabled: > > drivers/gpu/drm/i915/i915_gem.c:1182:2: error: implicit declaration of >

[Intel-gfx] [CI] drm/i915/gt: Always try to reserve GGTT address 0x0

2021-01-25 Thread Chris Wilson
Since writing to address 0 is a very common mistake, let's try to avoid putting anything sensitive there. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2989 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 47

Re: [Intel-gfx] [PATCH] drm/i915: Remove guard page insertion around unevictable nodes

2021-01-25 Thread Chris Wilson
Quoting Matthew Auld (2021-01-25 11:35:22) > On Mon, 25 Jan 2021 at 11:28, Chris Wilson wrote: > > > > Quoting Chris Wilson (2021-01-25 11:24:22) > > > Quoting Matthew Auld (2021-01-25 11:16:13) > > > > On Sun, 24 Jan 2021 at 13:57, Chris Wilson >

Re: [PATCH] drm/i915/gem: fix non-SMP build failure

2021-01-25 Thread Chris Wilson
Quoting Arnd Bergmann (2021-01-25 12:25:34) > From: Arnd Bergmann > > The x86-specific wbinvd_on_all_cpus() function is exported > through asm/smp.h, causing a build failure in the i915 driver > when SMP is disabled: > > drivers/gpu/drm/i915/i915_gem.c:1182:2: error: implicit declaration of >

Re: [Intel-gfx] [PATCH] drm/i915/gem: fix non-SMP build failure

2021-01-25 Thread Chris Wilson
Quoting Arnd Bergmann (2021-01-25 12:25:34) > From: Arnd Bergmann > > The x86-specific wbinvd_on_all_cpus() function is exported > through asm/smp.h, causing a build failure in the i915 driver > when SMP is disabled: > > drivers/gpu/drm/i915/i915_gem.c:1182:2: error: implicit declaration of >

Re: [Intel-gfx] [PATCH] i915: Fix DRM_I915_WERROR dependencies

2021-01-25 Thread Chris Wilson
Quoting Arnd Bergmann (2021-01-25 12:26:44) > From: Arnd Bergmann > > CONFIG_DRM_I915_DEBUG now selects CONFIG_DRM_I915_WERROR, but fails > to honor its dependencies: > > WARNING: unmet direct dependencies detected for DRM_I915_WERROR > Depends on [n]: HAS_IOMEM [=y] && DRM_I915 [=m] &&

Re: [PATCH] i915: Fix DRM_I915_WERROR dependencies

2021-01-25 Thread Chris Wilson
Quoting Arnd Bergmann (2021-01-25 12:26:44) > From: Arnd Bergmann > > CONFIG_DRM_I915_DEBUG now selects CONFIG_DRM_I915_WERROR, but fails > to honor its dependencies: > > WARNING: unmet direct dependencies detected for DRM_I915_WERROR > Depends on [n]: HAS_IOMEM [=y] && DRM_I915 [=m] &&

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gt: Always try to reserve GGTT address 0x0

2021-01-25 Thread Chris Wilson
Quoting Matthew Auld (2021-01-25 11:28:16) > On Sun, 24 Jan 2021 at 13:54, Chris Wilson wrote: > > > > Since writing to address 0 is a very common mistake, let's try to avoid > > putting anything sensitive there. > > > > References: https://gitlab.freede

Re: [Intel-gfx] [PATCH] drm/i915: Remove guard page insertion around unevictable nodes

2021-01-25 Thread Chris Wilson
Quoting Chris Wilson (2021-01-25 11:24:22) > Quoting Matthew Auld (2021-01-25 11:16:13) > > On Sun, 24 Jan 2021 at 13:57, Chris Wilson wrote: > > > > > > Assume that unevictable nodes are not in the GTT and so we can ignore > > > page boundary concerns, and so

Re: [Intel-gfx] [PATCH] drm/i915: Remove guard page insertion around unevictable nodes

2021-01-25 Thread Chris Wilson
Quoting Matthew Auld (2021-01-25 11:16:13) > On Sun, 24 Jan 2021 at 13:57, Chris Wilson wrote: > > > > Assume that unevictable nodes are not in the GTT and so we can ignore > > page boundary concerns, and so allow regular nodes to abutt against > > irregular unevictabl

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915: Exercise sysfs client properties

2021-01-25 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-01-25 10:20:15) > > On 22/01/2021 21:49, Chris Wilson wrote: > > We store every client name, pid and runtime under sysfs. Better check > > that matches with the actual client. > > > > Signed-off-by: Chris Wilson > > --- &g

Re: [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()

2021-01-25 Thread Chris Wilson
pin_map() > fails. True. > Let's fix the bug and silence the false positive. > > Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd > accessible reg whitelist") > Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson -Chris

Re: [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()

2021-01-25 Thread Chris Wilson
pin_map() > fails. True. > Let's fix the bug and silence the false positive. > > Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd > accessible reg whitelist") > Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson -Chris ___

Re: [Intel-gfx] [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()

2021-01-25 Thread Chris Wilson
pin_map() > fails. True. > Let's fix the bug and silence the false positive. > > Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd > accessible reg whitelist") > Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson -Chris ___

Re: [Intel-gfx] [PATCH] drm/i915/gem: Fix oops in error handling code

2021-01-25 Thread Chris Wilson
off-by: Dan Carpenter It will indeed. On the preallocated path, so only during modprobe so unlikely but also fatal bsod. It would also take brute force selftest to generate the error, but as that doesn't serve any other purpose, leave it to static analysis. Reviewed-by: Chris Wilson -Chris ___

[Intel-gfx] [CI 2/8] drm/i915: Expose list of clients in sysfs

2021-01-24 Thread Chris Wilson
/. For instance: /sys/class/drm/card0/clients/3/name: Xorg /sys/class/drm/card0/clients/3/pid: 5664 v2: Chris Wilson: * Enclose new members into dedicated structs. * Protect against failed sysfs registration. v3: * sysfs_attr_init. v4: * Fix for internal clients. v5: * Use cyclic ida for client

[Intel-gfx] [CI 7/8] drm/i915: Track context current active time

2021-01-24 Thread Chris Wilson
ake __intel_context_get_active_time unlocked. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty # v1 Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-7-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gt/intel_contex

[Intel-gfx] [CI 8/8] drm/i915: Expose per-engine client busyness

2021-01-24 Thread Chris Wilson
Reviewed-by: Aravind Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-8-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_drm_client.c | 101 - drivers/gpu/drm/i915/i915_drm_client.h

[Intel-gfx] [CI 4/8] drm/i915: Make GEM contexts track DRM clients

2021-01-24 Thread Chris Wilson
constructing ctx before adding it to the list v4 (Ram): Rebase on upstream Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Aravind Iddamsetty Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-4-ch...@chris-wilson.co.uk

[Intel-gfx] [CI 5/8] drm/i915: Track runtime spent in closed and unreachable GEM contexts

2021-01-24 Thread Chris Wilson
purposes. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-5-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 24

[Intel-gfx] [CI 6/8] drm/i915: Track all user contexts per client

2021-01-24 Thread Chris Wilson
Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-6-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 12 drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 3

[Intel-gfx] [CI 3/8] drm/i915: Update client name on context create

2021-01-24 Thread Chris Wilson
-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Aravind Iddamsetty Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-3-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 ++ drivers/gpu/drm/i915

[Intel-gfx] [CI 1/8] drm/i915/gt: Show the per-engine runtime in sysfs

2021-01-24 Thread Chris Wilson
and to purposely reduce the precision of the global unprivileged information. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-1-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH] drm/i915: Remove guard page insertion around unevictable nodes

2021-01-24 Thread Chris Wilson
Assume that unevictable nodes are not in the GTT and so we can ignore page boundary concerns, and so allow regular nodes to abutt against irregular unevictable nodes. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem_evict.c | 6

[Intel-gfx] [PATCH 1/2] drm/i915: Remove guard page insertion around unevictable nodes

2021-01-24 Thread Chris Wilson
Assume that unevictable nodes are not in the GTT and so we can ignore page boundary concerns, and so allow regular nodes to abutt against irregular unevictable nodes. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem_evict.c | 6

[Intel-gfx] [PATCH 2/2] drm/i915/gt: Always try to reserve GGTT address 0x0

2021-01-24 Thread Chris Wilson
Since writing to address 0 is a very common mistake, let's try to avoid putting anything sensitive there. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2989 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 40 +++- 1 file changed, 28

[Intel-gfx] [CI 5/8] drm/i915: Track runtime spent in closed and unreachable GEM contexts

2021-01-23 Thread Chris Wilson
purposes. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 24 +++-- drivers/gpu/drm/i915/i915_drm_client.h | 7 ++ 2 files changed, 29 insertions

[Intel-gfx] [CI 3/8] drm/i915: Update client name on context create

2021-01-23 Thread Chris Wilson
-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Aravind Iddamsetty Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 ++ drivers/gpu/drm/i915/i915_drm_client.c | 93 + drivers/gpu/drm/i915/i915_drm_client.h | 34 +++- 3

[Intel-gfx] [CI 4/8] drm/i915: Make GEM contexts track DRM clients

2021-01-23 Thread Chris Wilson
constructing ctx before adding it to the list v4 (Ram): Rebase on upstream Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Aravind Iddamsetty Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 20 +++- .../gpu/drm/i915/gem

[Intel-gfx] [CI 7/8] drm/i915: Track context current active time

2021-01-23 Thread Chris Wilson
ake __intel_context_get_active_time unlocked. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty # v1 Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_context.c | 28 ++- drivers/gpu/drm/i915/gt/intel_context.h |

[Intel-gfx] [CI 6/8] drm/i915: Track all user contexts per client

2021-01-23 Thread Chris Wilson
Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 12 drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 3 +++ drivers/gpu/drm/i915/i915_drm_client.c| 3 +++ drivers/gpu/drm/i915/i915_drm_client.h

[Intel-gfx] [CI 8/8] drm/i915: Expose per-engine client busyness

2021-01-23 Thread Chris Wilson
Reviewed-by: Aravind Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drm_client.c | 101 - drivers/gpu/drm/i915/i915_drm_client.h | 10 +++ 2 files changed, 110 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [CI 2/8] drm/i915: Expose list of clients in sysfs

2021-01-23 Thread Chris Wilson
/. For instance: /sys/class/drm/card0/clients/3/name: Xorg /sys/class/drm/card0/clients/3/pid: 5664 v2: Chris Wilson: * Enclose new members into dedicated structs. * Protect against failed sysfs registration. v3: * sysfs_attr_init. v4: * Fix for internal clients. v5: * Use cyclic ida for client

[Intel-gfx] [CI 1/8] drm/i915/gt: Show the per-engine runtime in sysfs

2021-01-23 Thread Chris Wilson
and to purposely reduce the precision of the global unprivileged information. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/sysfs_engines.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH] drm/i915/gem: Move freeze/freeze_late next to suspend/suspend_late

2021-01-23 Thread Chris Wilson
Push the hibernate pm routines next to the suspend pm routines in gem/i915_gem_pm.c. This has the side-effect of putting the wbinvd() abusers next to each other. Reported-by: Guenter Roeck Fixes: 30d2bfd09383 ("drm/i915/gem: Almagamate clflushes on freeze") Signed-off-by: Chris

Re: [Intel-gfx] [PATCH 2/6] drm/i915/gem: Almagamate clflushes on freeze

2021-01-23 Thread Chris Wilson
Quoting Guenter Roeck (2021-01-23 14:46:33) > On Tue, Jan 19, 2021 at 02:49:08PM +0000, Chris Wilson wrote: > > When flushing objects larger than the CPU cache it is preferrable to use > > a single wbinvd() rather than overlapping clflush(). At runtime, we > > avoid wbinvd() d

[Intel-gfx] [PATCH i-g-t] i915: Exercise sysfs client properties

2021-01-22 Thread Chris Wilson
We store every client name, pid and runtime under sysfs. Better check that matches with the actual client. Signed-off-by: Chris Wilson --- lib/igt_sysfs.c| 36 +++ lib/igt_sysfs.h| 3 + tests/Makefile.sources | 3 + tests/i915/sysfs_clients.c | 450

[Intel-gfx] [PATCH i-g-t] i915: Exercise sysfs client properties

2021-01-22 Thread Chris Wilson
We store every client name, pid and runtime under sysfs. Better check that matches with the actual client. Signed-off-by: Chris Wilson --- lib/igt_sysfs.c| 36 lib/igt_sysfs.h| 3 + tests/Makefile.sources | 3 + tests/i915/sysfs_clients.c | 361

[Intel-gfx] [CI 05/10] drm/i915/gt: Remove a bonus newline

2021-01-22 Thread Chris Wilson
Trailing newlines before closing the function are best forgotten, or else checkpatch moans. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 1 - drivers/gpu/drm/i915/gt/intel_rc6.c| 1 - 2 files changed, 2 deletions

[Intel-gfx] [CI 03/10] drm/i915/gt: Remove repeated words from comments

2021-01-22 Thread Chris Wilson
Checkpatch spotted a few repeated words in the comment, genuine mistakes. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 04/10] drm/i915/gt: Fixup misaligned function parameters

2021-01-22 Thread Chris Wilson
Remember to align parameters to the '(', thanks checkpatch Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions

[Intel-gfx] [CI 07/10] drm/i915/gt: Insert spaces into GEN3_L3LOG_SIZE/4

2021-01-22 Thread Chris Wilson
Checkpatch wants spaces, let's give it some spaces. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/intel_ring_submission.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b

[Intel-gfx] [CI 08/10] drm/i915/gt: Replace unnecessary ',' with '; '

2021-01-22 Thread Chris Wilson
Checkpatch spotted a couple of commas where we can use the more common ';', and so not worry about the subtle implications of sequence points. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/gen6_ppgtt.h| 4 ++-- drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 10/10] drm/i915/gt: Replace 'return' with a fall-through

2021-01-22 Thread Chris Wilson
-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 96edc76f5dcd..82e15c8c7a97 100644

[Intel-gfx] [CI 02/10] drm/i915/gt: Add some missing blank lines after declaration

2021-01-22 Thread Chris Wilson
Trivial checkpatch cleanup. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/debugfs_gt.c | 1 + drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 1 + drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 3 +++ drivers/gpu/drm/i915/gt/intel_renderstate.c

[Intel-gfx] [CI 09/10] drm/i915/gt: Add a space before '('

2021-01-22 Thread Chris Wilson
Checkpatch noticed a while(0) and complains about the lack of space. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/intel_renderstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_renderstate.c b

[Intel-gfx] [CI 06/10] drm/i915/gt: Wrap macro arg in ()

2021-01-22 Thread Chris Wilson
Checkpatch noticed that ppgtt->pd should have been (ppgtt)->pd to avoid issues with macros. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/intel_lrc_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i

[Intel-gfx] [CI 01/10] drm/i915/gt: SPDX cleanup

2021-01-22 Thread Chris Wilson
Clean up the SPDX licence declarations to comply with checkpatch. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/debugfs_gt.c | 1 - drivers/gpu/drm/i915/gt/gen6_renderstate.c| 20 + drivers/gpu/drm/i915/gt/gen7_renderstate.c

Re: [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes

2021-01-22 Thread Chris Wilson
Quoting Matthew Auld (2021-01-22 18:15:14) > Throw it into a simple helper, and throw a warning if we encounter an > object which has been initialised with an object size that exceeds our > limit of INT_MAX pages. > > Suggested-by: Chris Wilson > Signed-off-by: Matthew Auld

Re: [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size

2021-01-22 Thread Chris Wilson
ew Auld >From behind the grumbling that we really should have sorted this out by now, 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: consolidate 2big error checking for object sizes

2021-01-22 Thread Chris Wilson
Quoting Matthew Auld (2021-01-22 17:54:16) > On Fri, 22 Jan 2021 at 17:43, Chris Wilson wrote: > > > > Quoting Matthew Auld (2021-01-22 17:35:46) > > > Throw it into a simple helper, and throw a warning if we encounter an > > > object which has been initialised

Re: [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes

2021-01-22 Thread Chris Wilson
Quoting Matthew Auld (2021-01-22 17:35:46) > Throw it into a simple helper, and throw a warning if we encounter an > object which has been initialised with an object size that exceeds our > limit of INT_MAX pages. > > Suggested-by: Chris Wilson > Signed-off-by: Matthew Auld &g

Re: [Intel-gfx] [PATCH 01/10] drm/i915/gt: SPDX cleanup

2021-01-22 Thread Chris Wilson
Quoting Michal Wajdeczko (2021-01-22 16:03:38) > > > On 22.01.2021 16:49, Chris Wilson wrote: > > Quoting Michal Wajdeczko (2021-01-22 15:43:26) > >> > >> > >> On 22.01.2021 16:06, Chris Wilson wrote: > >>> Clean up the SPDX licence decla

Re: [Intel-gfx] [PATCH] drm/i915/buddy: document the unused header bits

2021-01-22 Thread Chris Wilson
= -EINVAL; > + goto out_free; > + } > + > + if (i915_buddy_block_size(, block) != rounddown_pow_of_two(size)) { Which is the largest buddy block within the range. Hmm, this I don't think follows the I915_BUDDY_MAX_ORDER constraint. What if

Re: [Intel-gfx] [PATCH] drm/i915/dmabuf: don't trust the dma_buf->size

2021-01-22 Thread Chris Wilson
Quoting Matthew Auld (2021-01-22 15:56:28) > At least for the time being, we need to limit our object sizes such that > the number of pages can fit within a 32b signed int. It looks like we > should also apply the same restriction to any imported dma-buf. > > Signed-off-by: Matthew Auld > --- >

Re: [Intel-gfx] [PATCH 01/10] drm/i915/gt: SPDX cleanup

2021-01-22 Thread Chris Wilson
Quoting Michal Wajdeczko (2021-01-22 15:43:26) > > > On 22.01.2021 16:06, Chris Wilson wrote: > > Clean up the SPDX licence declarations to comply with checkpatch. > > typo here and in the commit message 04/10 s/paramters/parameters/ But what's the typo here? I used

[Intel-gfx] [PATCH 05/10] drm/i915/gt: Remove a bonus newline

2021-01-22 Thread Chris Wilson
Trailing newlines before closing the function are best forgotten, or else checkpatch moans. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 1 - drivers/gpu/drm/i915/gt/intel_rc6.c| 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH 01/10] drm/i915/gt: SPDX cleanup

2021-01-22 Thread Chris Wilson
Clean up the SPDX licence declarations to comply with checkpatch. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/debugfs_gt.c | 1 - drivers/gpu/drm/i915/gt/gen6_renderstate.c| 20 + drivers/gpu/drm/i915/gt/gen7_renderstate.c| 20 + drivers/gpu

[Intel-gfx] [PATCH 03/10] drm/i915/gt: Remove repeated words from comments

2021-01-22 Thread Chris Wilson
Checkpatch spotted a few repeated words in the comment, genuine mistakes. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_reset_types.h | 2

[Intel-gfx] [PATCH 06/10] drm/i915/gt: Wrap macro arg in ()

2021-01-22 Thread Chris Wilson
Checkpatch noticed that ppgtt->pd should have been (ppgtt)->pd to avoid issues with macros. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_lrc_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_lrc_reg.h b/drivers/gpu/dr

[Intel-gfx] [PATCH 09/10] drm/i915/gt: Add a space before '('

2021-01-22 Thread Chris Wilson
Checkpatch noticed a while(0) and complains about the lack of space. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_renderstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_renderstate.c b/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH 07/10] drm/i915/gt: Insert spaces into GEN3_L3LOG_SIZE/4

2021-01-22 Thread Chris Wilson
Checkpatch wants spaces, let's give it some spaces. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_ring_submission.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH 10/10] drm/i915/gt: Replace 'return' with a fall-through

2021-01-22 Thread Chris Wilson
-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 96edc76f5dcd..82e15c8c7a97 100644 --- a/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH 02/10] drm/i915/gt: Add some missing blank lines after declaration

2021-01-22 Thread Chris Wilson
Trivial checkpatch cleanup. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/debugfs_gt.c | 1 + drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 1 + drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 3 +++ drivers/gpu/drm/i915/gt/intel_renderstate.c | 1 + drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH 08/10] drm/i915/gt: Replace unnecessary ',' with '; '

2021-01-22 Thread Chris Wilson
Checkpatch spotted a couple of commas where we can use the more common ';', and so not worry about the subtle implications of sequence points. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/gen6_ppgtt.h| 4 ++-- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 2 +- 2 files

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