[Intel-gfx] [CI 4/6] drm/i915/gt: Disable the ring before resetting HEAD/TAIL

2021-01-19 Thread Chris Wilson
During the reset of ring submission, we first stop the engine by clearing the HEAD/TAIL and marking the ring as disabled. However, it would be safer to disable the ring (after emptying) before resetting the HEAD/TAIL. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala

[Intel-gfx] [CI 2/6] drm/i915/selftests: Prepare the selftests for engine resets with ring submission

2021-01-19 Thread Chris Wilson
The engine resets selftests kick the tasklets, safe up until now as only execlists supported engine resets. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 18 ++ drivers/gpu/drm/i915/gt/selftest_reset.c | 11

[Intel-gfx] [CI 1/6] drm/i915/gt: One more flush for Baytrail clear residuals

2021-01-19 Thread Chris Wilson
CI reports that Baytail requires one more invalidate after CACHE_MODE for it to be happy. Fixes: ace44e13e577 ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin Reviewed-by: Mika Kuoppala --- drivers/gp

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Mark per-engine-reset as supported on gen7

2021-01-19 Thread Chris Wilson
Quoting Mika Kuoppala (2021-01-19 11:00:19) > Chris Wilson writes: > > > The benefit of only resetting a single engine is that we leave other > > streams of userspace work intact across a hang; vital for process > > isolation. We had wired up individual engine r

Re: [Intel-gfx] [PATCH 3/5] drm/i915/gt: Lift stop_ring() to reset_prepare

2021-01-19 Thread Chris Wilson
Quoting Mika Kuoppala (2021-01-19 10:33:17) > Chris Wilson writes: > > > Push the sleeping stop_ring() out of the reset resume function to reset > > prepare; we are not allowed to sleep in the former. > > > > Signed-off-by: Chris Wilson > > --- > > .

Re: [Intel-gfx] [PATCH 1/5] drm/i915/gt: One more flush for Baytrail clear residuals

2021-01-19 Thread Chris Wilson
Quoting Mika Kuoppala (2021-01-19 10:25:14) > Chris Wilson writes: > > > CI reports that Baytail requires one more invalidate after CACHE_MODE > > for it to be happy. > > > > Fixes: ace44e13e577 ("drm/i915/gt: Clear CACHE_MODE prior to clearing > > re

[Intel-gfx] [PATCH 1/5] drm/i915/gt: One more flush for Baytrail clear residuals

2021-01-19 Thread Chris Wilson
CI reports that Baytail requires one more invalidate after CACHE_MODE for it to be happy. Fixes: ace44e13e577 ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin --- drivers/gpu/drm/i915/gt/gen7_renderc

[Intel-gfx] [PATCH 5/5] drm/i915: Mark per-engine-reset as supported on gen7

2021-01-19 Thread Chris Wilson
as how to unravel some global state that appears to be reset along with an engine (in particular the ppgtt enabling in GFX_MODE). Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c

[Intel-gfx] [PATCH 4/5] drm/i915/gt: Pull ring submission resume under its caller forcewake

2021-01-19 Thread Chris Wilson
. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/intel_ring_submission.c | 93 +-- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c index 44159595d909..bf2834424add

[Intel-gfx] [PATCH 3/5] drm/i915/gt: Lift stop_ring() to reset_prepare

2021-01-19 Thread Chris Wilson
Push the sleeping stop_ring() out of the reset resume function to reset prepare; we are not allowed to sleep in the former. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/intel_ring_submission.c | 97 +++ 1 file changed, 36 insertions(+), 61 deletions(-) diff --git

[Intel-gfx] [PATCH 2/5] drm/i915/selftests: Prepare the selftests for engine resets with ring submission

2021-01-19 Thread Chris Wilson
The engine resets selftests kick the tasklets, safe up until now as only execlists supported engine resets. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 18 ++ drivers/gpu/drm/i915/gt/selftest_reset.c | 11 --- 2 files changed, 22

[Intel-gfx] [PATCH] drm/i915/gt: One more flush for Baytrail clear residuals

2021-01-18 Thread Chris Wilson
CI reports that Baytail requires one more invalidate after CACHE_MODE for it to be happy. Fixes: ace44e13e577 ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin --- drivers/gpu/drm/i915/gt/gen7_renderc

[Intel-gfx] [PATCH] drm/i915/gt: One more flush for Baytrail clear residuals

2021-01-18 Thread Chris Wilson
CI reports that Baytail requires one more invalidate after CACHE_MODE for it to be happy. Fixes: ace44e13e577 ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin --- drivers/gpu/drm/i915/gt/gen7_renderc

Re: [Intel-gfx] [PATCH 2/3] drm/i915: prefer FORCE_WC for the blitter routines

2021-01-18 Thread Chris Wilson
Quoting Matthew Auld (2021-01-18 15:55:31) > On Mon, 18 Jan 2021 at 14:54, Chris Wilson wrote: > > > > Quoting Matthew Auld (2021-01-18 14:17:31) > > > From: CQ Tang > > > > > > The pool is shared and so we might find that there is a pool object wit

Re: [Intel-gfx] [PATCH 3/3] drm/i915/error: Fix object page offset within a region

2021-01-18 Thread Chris Wilson
PAGE_SIZE); >From i915_gem_object_get_pages_buddy: sg_dma_address(sg) = mem->region.start + offset; 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/3] drm/i915: prefer FORCE_WC for the blitter routines

2021-01-18 Thread Chris Wilson
Quoting Matthew Auld (2021-01-18 14:17:31) > From: CQ Tang > > The pool is shared and so we might find that there is a pool object with > an existing mapping, but is mapped with different underlying type, which > will result in -EBUSY. > > Signed-off-by: CQ Tang > Signed-off-by: Matthew Auld

Re: [Intel-gfx] [PATCH 2/3] drm/i915: prefer FORCE_WC for the blitter routines

2021-01-18 Thread Chris Wilson
Quoting Matthew Auld (2021-01-18 14:17:31) > From: CQ Tang First patch hasn't arrive, so excuse this misplaced reply. - if (GEM_WARN_ON(!r->sgt.pfn)) + if (GEM_WARN_ON(!use_dma(r->iobase) && !r->sgt.pfn)) return -EINVAL; The better check would be if

Re: [Intel-gfx] [PATCH v4 3/6] drm/i915/gt: Remove references to struct drm_device.pdev

2021-01-18 Thread Chris Wilson
Quoting Thomas Zimmermann (2021-01-18 13:14:17) > Using struct drm_device.pdev is deprecated. Convert i915 to struct > drm_device.dev. No functional changes. This needs to be before or in the previous patch, as that patch removed assignment of i915->drm.pdev. Or the removal of the assignment

Re: [PATCH v4 3/6] drm/i915/gt: Remove references to struct drm_device.pdev

2021-01-18 Thread Chris Wilson
Quoting Thomas Zimmermann (2021-01-18 13:14:17) > Using struct drm_device.pdev is deprecated. Convert i915 to struct > drm_device.dev. No functional changes. This needs to be before or in the previous patch, as that patch removed assignment of i915->drm.pdev. Or the removal of the assignment

[Intel-gfx] [PATCH 2/2] drm/i915: Remove I915_USER_PRIORITY_SHIFT

2021-01-18 Thread Chris Wilson
As we do not have any internal priority levels, the priority can be set directed from the user values. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/display/intel_display.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 +-- .../i915/gem/selftests/i915_gem_object_blt.c

[Intel-gfx] [PATCH 1/2] drm/i915: Strip out internal priorities

2021-01-18 Thread Chris Wilson
Since we are not using any internal priority levels, and in the next few patches will introduce a new index for which the optimisation is not so lear cut, discard the small table within the priolist. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 2 +- .../drm

[Intel-gfx] [PATCH] drm/i915/display: Apply interactive priority to explicit flip fences

2021-01-18 Thread Chris Wilson
-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 16 +++ drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 ++ drivers/gpu/drm/i915/gem/i915_gem_wait.c | 49 ++-- 3 files changed, 44 insertions(+), 24 deletions(-) diff

[Intel-gfx] [PATCH 2/2] drm/i915/gt: Skip over completed active execlists, again

2021-01-18 Thread Chris Wilson
References: 8ab3a3812aa9 ("drm/i915/gt: Incrementally check for rewinding") Signed-off-by: Chris Wilson Cc: Mika Kuoppala --- .../drm/i915/gt/intel_execlists_submission.c | 36 +-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ex

[Intel-gfx] [PATCH 1/2] drm/i915/gt: Do not suspend bonded requests if one hangs

2021-01-18 Thread Chris Wilson
Treat the dependency between bonded requests as weak and leave the remainder of the pair on the GPU if one hangs. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH] drm/i915/display: Apply interactive priority to explicit flip fences

2021-01-18 Thread Chris Wilson
-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 16 +++ drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 ++ drivers/gpu/drm/i915/gem/i915_gem_wait.c | 49 ++-- 3 files changed, 44 insertions(+), 24 deletions(-) diff

[Intel-gfx] [PATCH] drm/i915/gem: Remove per-client stats from debugfs/i915_gem_objects

2021-01-18 Thread Chris Wilson
suggests that it is unparsed, so we are free to invoke debugfs is not ABI and remove details from it. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_debugfs.c | 142 1 file changed, 142 deletions(-) diff --git a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v2] drm/i915/gem: Use GEM context tracking for i915_gem_objects

2021-01-18 Thread Chris Wilson
Quoting Tvrtko Ursulin (2021-01-18 10:38:23) > > On 15/01/2021 13:05, Chris Wilson wrote: > > Rather than take an indirect jump to the drm midlayer (that introduces a > > use-after-free in reading the ctx->file backpointer) to find all the vma > > on objects associat

[Intel-gfx] [PATCH] drm/i915: Check for rq->hwsp validity after acquiring RCU lock

2021-01-18 Thread Chris Wilson
at may lead to either considering the request not completed (causing a delay until the request is checked again, any wait for the request is not affected) or dereferencing an invalid pointer. Fixes: 3adac4689f58 ("drm/i915: Introduce concept of per-timeline (context) HWSP") Signed-off-by: Chris

Re: [Intel-gfx] Fixes that failed to apply to v5.11-rc4

2021-01-18 Thread Chris Wilson
Quoting Jani Nikula (2021-01-18 09:07:02) > > The following commits have been marked as Cc: stable or fixing something > in v5.11-rc4 or earlier, but failed to cherry-pick to > drm-intel-fixes. Please see if they are worth backporting, and please do > so if they are. > > Conflicts: >

[Intel-gfx] [PATCH] drm/i915/pmu: Don't grab wakeref when enabling events

2021-01-18 Thread Chris Wilson
keeping with hardware rc6 counter on driver load. v2: * Always sync on parking and fully sync on init. Signed-off-by: Tvrtko Ursulin Fixes: f4e9894b6952 ("drm/i915/pmu: Correct the rc6 offset upon enabling") Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop

[Intel-gfx] [PATCH] drm/i915/gt: Prevent use of engine->wa_ctx after error

2021-01-18 Thread Chris Wilson
-by: Matt Roper Fixes: 604a8f6f1e33 ("drm/i915/lrc: Only enable per-context and per-bb buffers if set") Signed-off-by: Chris Wilson Cc: Matt Roper Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: # v4.15+ Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/p

[Intel-gfx] [CI 2/2] drm/i915/gt: Reduce GT runtime stats from seqlock to a latch

2021-01-17 Thread Chris Wilson
. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_pm.c| 51 +--- drivers/gpu/drm/i915/gt/intel_gt_types.h | 7 2 files changed, 18 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers

[Intel-gfx] [CI 1/2] drm/i915/gt: Reduce engine runtime stats from seqlock to a latch

2021-01-17 Thread Chris Wilson
. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_engine_cs.c| 37 +++ drivers/gpu/drm/i915/gt/intel_engine_stats.h | 39 +--- drivers/gpu/drm/i915/gt/intel_engine_types.h | 5 --- 3 files changed, 24 insertions(+), 57

[Intel-gfx] [PATCH i-g-t] i915/gem_userptr_blits: Quick verification of set-cache-level API

2021-01-17 Thread Chris Wilson
Mesa uses set-cache-level on userptr, so verify it doesn't arbitrary fail. Signed-off-by: Chris Wilson --- tests/i915/gem_userptr_blits.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c index

[Intel-gfx] [PATCH] drm/i915/gt: Add arbitration check before semaphore wait

2021-01-17 Thread Chris Wilson
indefinite wait on the ring-stop semaphore. So not a Tigerlake specific bug after all, though it still seems odd behaviour for the busywait as we do get the arbitration point elsewhere on a miss. Testcase: igt_reset_fail_engine Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/d

[Intel-gfx] [PATCH] drm/i915/gt: Clear CACHE_MODE prior to clearing residuals

2021-01-17 Thread Chris Wilson
ridge, Baytrail") Fixes: 09aa9e45863e ("drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail") Testcase: igt/gem_ctx_isolation # ivb,vlv Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin --- drivers/gpu/drm/i915/gt/gen7_renderclear.c | 8 +++

[Intel-gfx] [PATCH] drm/i915/gt: Clear CACHE_MODE prior to clearing residuals

2021-01-16 Thread Chris Wilson
ridge, Baytrail") Fixes: 09aa9e45863e ("drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail") Testcase: igt/gem_ctx_isolation # ivb,vlv Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin --- drivers/gpu/drm/i915/gt/gen7_renderclear.c | 7 ++

[Intel-gfx] [PATCH] drm/i915/gt: Clear CACHE_MODE prior to clearing residuals

2021-01-16 Thread Chris Wilson
ridge, Baytrail") Fixes: 09aa9e45863e ("drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail") Testcase: igt/gem_ctx_isolation # ivb,vlv Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin --- drivers/gpu/drm/i915/gt/gen7_renderclear.c | 7 ++

[Intel-gfx] [PATCH xf86-video-intel] sna: Probe userptr storage on construction

2021-01-15 Thread Chris Wilson
used. I915_USERPTR_PROBE introduces a method for doing a simple vma lookup to check that the userptr is valid at the time of construction, leaving the more costly page lookup for lazy execution. See https://patchwork.freedesktop.org/series/33449/ Signed-off-by: Chris Wilson --- src/sna/kgem.c

[Intel-gfx] [PATCH i-g-t] i915/gem_userptr_blits: Check set-domain on userptr for validation

2021-01-15 Thread Chris Wilson
We use set-domain on userptr to validate that get-user-pages is applicable to the address range. Let's perform a very basic test to exercise this combination. Signed-off-by: Chris Wilson --- tests/i915/gem_userptr_blits.c | 26 ++ 1 file changed, 26 insertions(+) diff

Re: [Intel-gfx] [PATCH] drm/i915/userptr: detect un-GUP-able pages early

2021-01-15 Thread Chris Wilson
Quoting Chris Wilson (2021-01-15 16:56:42) > Quoting Jinoh Kang (2021-01-15 16:23:31) > > If GUP-ineligible pages are passed to a GEM userptr object, -EFAULT is > > returned only when the object is actually bound. > > > > The xf86-video-intel userspace

Re: [PATCH] drm/i915/userptr: detect un-GUP-able pages early

2021-01-15 Thread Chris Wilson
Quoting Chris Wilson (2021-01-15 16:56:42) > Quoting Jinoh Kang (2021-01-15 16:23:31) > > If GUP-ineligible pages are passed to a GEM userptr object, -EFAULT is > > returned only when the object is actually bound. > > > > The xf86-video-intel userspace

Re: [PATCH] drm/i915/userptr: detect un-GUP-able pages early

2021-01-15 Thread Chris Wilson
Quoting Jinoh Kang (2021-01-15 16:23:31) > If GUP-ineligible pages are passed to a GEM userptr object, -EFAULT is > returned only when the object is actually bound. > > The xf86-video-intel userspace driver cannot differentiate this > condition, and marks the GPU as wedged. The idea was to call

Re: [Intel-gfx] [PATCH] drm/i915/userptr: detect un-GUP-able pages early

2021-01-15 Thread Chris Wilson
Quoting Jinoh Kang (2021-01-15 16:23:31) > If GUP-ineligible pages are passed to a GEM userptr object, -EFAULT is > returned only when the object is actually bound. > > The xf86-video-intel userspace driver cannot differentiate this > condition, and marks the GPU as wedged. The idea was to call

Re: [PATCH] dma-buf: Add debug option

2021-01-15 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-15 15:52:26) > +static void mangle_sg_table(struct sg_table *sg_table) > +{ > +#ifdef CONFIG_DMABUF_DEBUG > + int i; > + struct scatterlist *sg; > + > + if (!sg_table) if (!IS_ENABLED(CONFIG_DMABUF_DEBUG) || IS_ERR_OR_NULL(sg_table)) > +

Re: [Intel-gfx] [PATCH] dma-buf: Add debug option

2021-01-15 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-15 15:52:26) > +static void mangle_sg_table(struct sg_table *sg_table) > +{ > +#ifdef CONFIG_DMABUF_DEBUG > + int i; > + struct scatterlist *sg; > + > + if (!sg_table) if (!IS_ENABLED(CONFIG_DMABUF_DEBUG) || IS_ERR_OR_NULL(sg_table)) > +

Re: [Intel-gfx] [PATCH] drm/i915: add back static declaration

2021-01-15 Thread Chris Wilson
Quoting Matthew Auld (2021-01-15 10:13:29) > warning: symbol '__i915_gem_object_create_stolen' was not declared. Should it > be static? > warning: symbol '_i915_gem_object_stolen_init' was not declared. Should it be > static? > > Signed-off-by: Matthew Auld Reviewed-by: Ch

[Intel-gfx] [PATCH] drm/i915/gem: Mark private i915_gem_stolen functions as static

2021-01-15 Thread Chris Wilson
:649:5: error: no previous prototype for ‘_i915_gem_object_stolen_init’ [-Werror=missing-prototypes] int _i915_gem_object_stolen_init(struct intel_memory_region *mem, ^~~~ Signed-off-by: Chris Wilson Cc: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c

[Intel-gfx] [CI 4/5] drm/i915/gt: Reduce engine runtime stats from seqlock to a latch

2021-01-15 Thread Chris Wilson
. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_engine_cs.c| 34 +++- drivers/gpu/drm/i915/gt/intel_engine_stats.h | 24 +++--- drivers/gpu/drm/i915/gt/intel_engine_types.h | 5 --- 3 files changed, 15 insertions(+), 48

[Intel-gfx] [CI 3/5] drm/i915/gt: Convert stats.active to plain unsigned int

2021-01-15 Thread Chris Wilson
As context-in/out is now always serialised, we do not have to worry about concurrent enabling/disable of the busy-stats and can reduce the atomic_t active to a plain unsigned int, and the seqlock to a seqcount. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt

[Intel-gfx] [CI 5/5] drm/i915/gt: Reduce GT runtime stats from seqlock to a latch

2021-01-15 Thread Chris Wilson
. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_pm.c| 38 +++- drivers/gpu/drm/i915/gt/intel_gt_types.h | 5 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers

[Intel-gfx] [CI 1/5] drm/i915/gt: Drop atomic for engine->fw_active tracking

2021-01-15 Thread Chris Wilson
Since schedule-in/out is now entirely serialised by the tasklet bitlock, we do not need to worry about concurrent in/out operations and so reduce the atomic operations to plain instructions. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_engine_cs.c

[Intel-gfx] [CI 2/5] drm/i915/gt: Extract busy-stats for ring-scheduler

2021-01-15 Thread Chris Wilson
Lift the busy-stats context-in/out implementation out of intel_lrc, so that we can reuse it for other scheduler implementations. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_engine_stats.h | 49 +++ .../drm/i915/gt

Re: [Intel-gfx] [PATCH v4] drm/i915/debugfs : PM_REQ and PM_RES registers

2021-01-15 Thread Chris Wilson
Quoting Saichandana S (2021-01-15 13:01:10) > +static int i915_pm_req_res_info(struct seq_file *m, void *unused) > +{ > + struct drm_i915_private *i915 = node_to_i915(m->private); > + struct intel_csr *csr = >csr; > + u32 DC9_status; > + > + if (!HAS_CSR(i915)) > +

[Intel-gfx] [PATCH v2] drm/i915/gem: Use GEM context tracking for i915_gem_objects

2021-01-15 Thread Chris Wilson
context. Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: CQ Tang Cc: Lucas De Marchi Cc: sta...@kernel.org --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 4 +- drivers/gpu/drm/i915/i915_debugfs.c | 181 +++

[Intel-gfx] [PATCH v2] drm/i915/display: Set return value before returning in intel_hdcp*_disable()

2021-01-15 Thread Chris Wilson
, and this is not regarded as an error, so update the return value to indicate success. v2: Success not error. Fixes: 2a743b7b8a8b ("drm/i915/hdcp: Configure HDCP1.4 MST steram encryption status") Fixes: 899c8762f981 ("drm/i915/hdcp: Configure HDCP2.2 MST steram encryption status")

[Intel-gfx] [PATCH] drm/i915/gem: Use GEM context tracking for i915_gem_objects

2021-01-15 Thread Chris Wilson
ed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: CQ Tang Cc: Lucas De Marchi Cc: sta...@kernel.org --- drivers/gpu/drm/i915/i915_debugfs.c | 138 +++- 1 file changed, 52 insertions(+), 86 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/dr

[Intel-gfx] [PATCH] drm/i915/display: Set error value before returning in intel_hdcp*_disable()

2021-01-15 Thread Chris Wilson
topology, I opted to use -EBUSY to indicate not all were ready. Fixes: 2a743b7b8a8b ("drm/i915/hdcp: Configure HDCP1.4 MST steram encryption status") Fixes: 899c8762f981 ("drm/i915/hdcp: Configure HDCP2.2 MST steram encryption status") Signed-off-by: Chris Wilson Cc: R

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-15 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-14 09:47:40) > On Thu, Jan 14, 2021 at 09:45:37AM +0000, Chris Wilson wrote: > > Quoting Daniel Vetter (2021-01-14 09:30:32) > > > On Thu, Jan 14, 2021 at 10:23 AM Chris Wilson > > > wrote: > > > > The only othe

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-15 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-14 09:47:40) > On Thu, Jan 14, 2021 at 09:45:37AM +0000, Chris Wilson wrote: > > Quoting Daniel Vetter (2021-01-14 09:30:32) > > > On Thu, Jan 14, 2021 at 10:23 AM Chris Wilson > > > wrote: > > > > The only othe

Re: [Intel-gfx] [PATCH] drm/i915/display: Bitwise or the conversion colour specifier together

2021-01-15 Thread Chris Wilson
Quoting Nautiyal, Ankit K (2021-01-15 07:24:36) > > On 1/13/2021 5:22 PM, Jani Nikula wrote: > > On Fri, 08 Jan 2021, Jani Nikula wrote: > >> On Thu, 24 Dec 2020, "Nautiyal, Ankit K" > >> wrote: > >>> Thanks Chris to catch this. > >>> > >>> This definitely should be bitwise Operator, as

[Intel-gfx] [PATCH 1/4] drm/i915/selftests: Prepare the selftests for engine resets with ring submission

2021-01-15 Thread Chris Wilson
The engine resets selftests kick the tasklets, safe up until now as only execlists supported engine resets. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 18 ++ drivers/gpu/drm/i915/gt/selftest_reset.c | 11 --- 2 files changed, 22

[Intel-gfx] [PATCH 4/4] drm/i915: Mark per-engine-reset as supported on gen7

2021-01-15 Thread Chris Wilson
as how to unravel some global state that appears to be reset along with an engine (in particular the ppgtt enabling in GFX_MODE). Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c

[Intel-gfx] [PATCH 2/4] drm/i915/gt: Lift stop_ring() to reset_prepare

2021-01-15 Thread Chris Wilson
Push the sleeping stop_ring() out of the reset resume function to reset prepare; we are not allowed to sleep in the former. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/intel_ring_submission.c | 97 +++ 1 file changed, 36 insertions(+), 61 deletions(-) diff --git

[Intel-gfx] [PATCH 3/4] drm/i915/gt: Pull ring submission resume under its caller forcewake

2021-01-15 Thread Chris Wilson
. Signed-off-by: Chris Wilson --- .../gpu/drm/i915/gt/intel_ring_submission.c | 93 +-- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c index 44159595d909..bf2834424add

Re: [Intel-gfx] [BUG] on reboot: bisected to: drm/i915: Shut down displays gracefully on reboot

2021-01-14 Thread Chris Wilson
Quoting Steven Rostedt (2021-01-14 21:32:06) > On reboot, one of my test boxes now triggers the following warning: 057fe3535eb3 ("drm/i915: Disable RPM wakeref assertions during driver shutdown") is included with the drm-intel-fixes PR. -Chris

Re: [Intel-gfx] [BUG] on reboot: bisected to: drm/i915: Shut down displays gracefully on reboot

2021-01-14 Thread Chris Wilson
Quoting Steven Rostedt (2021-01-14 21:32:06) > On reboot, one of my test boxes now triggers the following warning: 057fe3535eb3 ("drm/i915: Disable RPM wakeref assertions during driver shutdown") is included with the drm-intel-fixes PR. -Chris ___

Re: [Intel-gfx] [BUG] on reboot: bisected to: drm/i915: Shut down displays gracefully on reboot

2021-01-14 Thread Chris Wilson
Quoting Steven Rostedt (2021-01-14 21:32:06) > On reboot, one of my test boxes now triggers the following warning: 057fe3535eb3 ("drm/i915: Disable RPM wakeref assertions during driver shutdown") is included with the drm-intel-fixes PR. -Chris ___

Re: [Intel-gfx] [PATCH v7 2/3] drm/i915/gem: Add a helper to read data from a GEM object page

2021-01-14 Thread Chris Wilson
/o requiring the obj to be mapped to the GPU). > > Suggested by Chris. > > Cc: Chris Wilson > Signed-off-by: Imre Deak > --- > drivers/gpu/drm/i915/gem/i915_gem_object.c | 75 ++ > drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 + > 2 files ch

Re: [Intel-gfx] [PATCH 3/3] drm/i915/region: convert object_create into object_init

2021-01-14 Thread Chris Wilson
ere we would like to first apply the extensions > to the object. I notice that we need to include userptr and the mock objects in INTEL_MEMORY_SYSTEM for better bookkeeping. > Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson -Chris ___ Inte

Re: [Intel-gfx] [PATCH 2/3] drm/i915/gem: sanity check object size in gem_create

2021-01-14 Thread Chris Wilson
Quoting Matthew Auld (2021-01-14 18:24:01) > Depending on the regions min_page_size we might need to adjust the > object size, ensure this matches our expectations. > > Suggested-by: Chris Wilson > Signed-off-by: Matthew Auld Reviewed-by: Chris

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gem: split gem_create into own file

2021-01-14 Thread Chris Wilson
Quoting Matthew Auld (2021-01-14 18:24:00) > In preparation for gem_create_ext break out the gem_create uAPI, so that > we don't clutter i915_gem.c once we start adding various extensions > > Signed-off-by: Matthew Auld Reviewed-by: Chris Wi

[Intel-gfx] [CI 2/5] drm/i915: Drop i915_request.lock serialisation around await_start

2021-01-14 Thread Chris Wilson
we are able to acquire a strong reference to it. We do not need the signal->lock crutch anymore, nor want the contention. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/i915_request.c | 10 -- 1 file changed, 8 insertions(+), 2 del

[Intel-gfx] [CI 3/5] drm/i915/gem: Reduce ctx->engine_mutex for reading the clone source

2021-01-14 Thread Chris Wilson
src->engine_mutex, so long as we verify that nothing changed under the read. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 24 + 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i9

[Intel-gfx] [CI 4/5] drm/i915/gem: Reduce ctx->engines_mutex for get_engines()

2021-01-14 Thread Chris Wilson
Take a snapshot of the ctx->engines, so we can avoid taking the ctx->engines_mutex for a mere read in get_engines(). Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 39 + 1 file changed, 8 insertions(+), 31 del

[Intel-gfx] [CI 5/5] drm/i915: Reduce test_and_set_bit to set_bit in i915_request_submit()

2021-01-14 Thread Chris Wilson
Avoid the full blown memory barrier of test_and_set_bit() by noting the completed request and removing it from the lists. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/i915_request.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff

[Intel-gfx] [CI 1/5] drm/i915: Mark up protected uses of 'i915_request_completed'

2021-01-14 Thread Chris Wilson
When we know that we are inside the timeline mutex, or inside the submission flow (under active.lock or the holder's rcu lock), we know that the rq->hwsp is stable and we can use the simpler direct version. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/

Re: [Intel-gfx] [PATCH 01/10] drm/i915: Mark up protected uses of 'i915_request_completed'

2021-01-14 Thread Chris Wilson
Quoting Andi Shyti (2021-01-14 03:01:15) > Hi Chris, > > > diff --git a/drivers/gpu/drm/i915/i915_request.c > > b/drivers/gpu/drm/i915/i915_request.c > > index 0b1a46a0d866..784c05ac5cca 100644 > > --- a/drivers/gpu/drm/i915/i915_request.c > > +++ b/drivers/gpu/drm/i915/i915_request.c > > @@

Re: [Intel-gfx] [PATCH 07/10] drm/i915/gt: Extract busy-stats for ring-scheduler

2021-01-14 Thread Chris Wilson
Quoting Andi Shyti (2021-01-14 03:02:25) > Hi Chris, > > On Wed, Jan 13, 2021 at 12:45:57PM +0000, Chris Wilson wrote: > > Lift the busy-stats context-in/out implementation out of intel_lrc, so > > that we can reuse it for other scheduler implementations. > > >

[Intel-gfx] [PATCH 2/2] drm/i915: Make GEM errors non-fatal by default

2021-01-14 Thread Chris Wilson
that they are able to extract the original debug logs. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/Kconfig.debug | 16 drivers/gpu/drm/i915/i915_gem.h| 9 - 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers

[Intel-gfx] [PATCH 1/2] drm/i915: Add DEBUG_GEM to the recommended CI config

2021-01-14 Thread Chris Wilson
Now that i915 compiles cleanly with Werror, we can enforce enabling DEBUG_GEM when selecting the default debug config. Signed-off-by: Chris Wilson Cc: Jani Nikula --- drivers/gpu/drm/i915/Kconfig.debug | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH] drm/i915: Add DEBUG_GEM to the recommended CI config

2021-01-14 Thread Chris Wilson
Now that i915 compiles cleanly with Werror, we can enforce enabling DEBUG_GEM when selecting the default debug config. Signed-off-by: Chris Wilson Cc: Jani Nikula --- drivers/gpu/drm/i915/Kconfig.debug | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH v2 2/2] drm/i915/selftests: Exercise cross-process context isolation

2021-01-14 Thread Chris Wilson
Verify that one context running on engine A cannot manipulate another client's context concurrently running on engine B using unprivileged access. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/selftest_lrc.c | 275 + 1 file changed, 238 insertions(+), 37

[Intel-gfx] [PATCH v2 1/2] drm/i915/selftests: Exercise relative mmio paths to non-privileged registers

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

Re: [Intel-gfx] [PATCH 2/2] drm/i915/selftests: Exercise cross-process context isolation

2021-01-14 Thread Chris Wilson
Quoting Chris Wilson (2021-01-14 10:13:37) > Quoting Chris Wilson (2021-01-14 09:26:39) > > + rq = record_registers(A, a, result[0], result[1], false, ); > > + if (IS_ERR(rq)) { > > + err = PTR_ERR(rq); > > +

[Intel-gfx] [CI] drm/i915/gt: Reapply ppgtt enabling after engine resets

2021-01-14 Thread Chris Wilson
The GFX_MODE is reset along with the engine, turning off ppGTT. We need to re-enable it upon resume afterwards. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/gen6_ppgtt.c| 9 - drivers/gpu/drm/i915/gt/intel_ring_submission.c | 13

Re: [Intel-gfx] [PATCH 2/2] drm/i915/selftests: Exercise cross-process context isolation

2021-01-14 Thread Chris Wilson
Quoting Chris Wilson (2021-01-14 09:26:39) > + rq = record_registers(A, a, result[0], result[1], false, ); > + if (IS_ERR(rq)) { > + err = PTR_ERR(rq); > + goto err_result1; > + } > + > + err = poison_registers(B, a, p

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-14 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-14 09:30:32) > On Thu, Jan 14, 2021 at 10:23 AM Chris Wilson > wrote: > > The only other problem I see with the implementation is that there's > > nothing that says that each dmabuf->ops->map_dma_buf() returns a new > > sg_table, so

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-14 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-14 09:30:32) > On Thu, Jan 14, 2021 at 10:23 AM Chris Wilson > wrote: > > The only other problem I see with the implementation is that there's > > nothing that says that each dmabuf->ops->map_dma_buf() returns a new > > sg_table, so

[Intel-gfx] [PATCH 2/2] drm/i915/selftests: Exercise cross-process context isolation

2021-01-14 Thread Chris Wilson
Verify that one context running on engine A cannot manipulate another client's context concurrently running on engine B using unprivileged access. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/selftest_lrc.c | 229 ++--- 1 file changed, 204 insertions(+), 25

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

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

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-14 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-14 09:02:57) > On Wed, Jan 13, 2021 at 10:08 PM Chris Wilson > wrote: > > Quoting Daniel Vetter (2021-01-13 20:50:11) > > > On Wed, Jan 13, 2021 at 4:43 PM Chris Wilson > > > wrote: > > > > > > > > Quoting Dan

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-14 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-14 09:02:57) > On Wed, Jan 13, 2021 at 10:08 PM Chris Wilson > wrote: > > Quoting Daniel Vetter (2021-01-13 20:50:11) > > > On Wed, Jan 13, 2021 at 4:43 PM Chris Wilson > > > wrote: > > > > > > > > Quoting Dan

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

2021-01-13 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] [CI 1/2] drm/i915/gt: Rearrange vlv workarounds

2021-01-13 Thread Chris Wilson
Some rcs0 workarounds were being incorrectly applied to the GT, and so we failed to restore the expected register settings after a reset. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 95 +++-- 1 file changed, 51

[Intel-gfx] [CI 2/2] drm/i915/gt: Rearrange ivb workarounds

2021-01-13 Thread Chris Wilson
Some rcs0 workarounds were being incorrectly applied to the GT, and so we failed to restore the expected register settings after a reset. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 122 1 file changed, 49

Re: [time-nuts] Can a Trimble Thunderbolt cause QRM? Noise can be seen remotely via my SDR.

2021-01-13 Thread Chris Wilson
Hello everyone Tuesday, January 12, 2021 Many thanks for the replies, Time Nuts always confuses my mail app and I have to check if replies are from an individual or via the reflector. I am posting here to say the situation is now resolved, thanks. I eventually tracked the culprit down today.

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-13 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-13 20:50:11) > On Wed, Jan 13, 2021 at 4:43 PM Chris Wilson wrote: > > > > Quoting Daniel Vetter (2021-01-13 14:06:04) > > > We have too many people abusing the struct page they can get at but > > > really shouldn't in importers.

Re: [Intel-gfx] [PATCH] drm-buf: Add debug option

2021-01-13 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-13 20:50:11) > On Wed, Jan 13, 2021 at 4:43 PM Chris Wilson wrote: > > > > Quoting Daniel Vetter (2021-01-13 14:06:04) > > > We have too many people abusing the struct page they can get at but > > > really shouldn't in importers.

[Intel-gfx] [PATCH] drm/i915/selftests: Force a failed engine reset

2021-01-13 Thread Chris Wilson
Inject a fault into the engine reset and check that the outstanding requests are completed despite the failed reset. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 144 +++ 1 file changed, 144 insertions(+) diff --git

<    4   5   6   7   8   9   10   11   12   13   >