Re: [Intel-gfx] [PATCH] drm/i915/mtl: Don't set PIPE_CONTROL_FLUSH_L3

2023-10-17 Thread Mika Kuoppala
d lead to unwanted side effects. >*/ > - if (mode & EMIT_FLUSH) > + if ((mode & EMIT_FLUSH) && > + !(IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))) > bit_group_

Re: [Intel-gfx] [PATCH] drm/i915: Simplify internal helper function signature

2022-11-10 Thread Mika Kuoppala
lin > Cc: Andrzej Hajda Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_workarounds.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c > b/drivers/gpu/drm/i915/gt/intel_workaroun

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Don't use DRM_DEBUG_WARN_ON for ring unexpectedly not idle

2022-05-05 Thread Mika Kuoppala
that it will catch all possible error conditions. Use drm_warn instead. > > Signed-off-by: Tvrtko Ursulin > Cc: Mika Kuoppala > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_ring_submission.c | 4 +++- > 1 file changed, 3 insertions(+),

Re: [Intel-gfx] [PATCH v2 2/4] drm/i915/gt: Re-work invalidate_csb_entries

2022-01-31 Thread Mika Kuoppala
Tvrtko Ursulin writes: > On 28/01/2022 22:10, Michael Cheng wrote: >> Re-work invalidate_csb_entries to use drm_clflush_virt_range. This will >> prevent compiler errors when building for non-x86 architectures. >> >> Signed-off-by: Michael Cheng >> --- >>

Re: [Intel-gfx] [PATCH] drm/i915/gtt: add some flushing for the 64K GTT path

2021-09-03 Thread Mika Kuoppala
the updated entry. > > Signed-off-by: Matthew Auld > Cc: Mika Kuoppala Makes sense to follow the same pattern as the other writes. Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drive

Re: [Intel-gfx] [PATCH] drm/i915: Correct SFC_DONE register offset

2021-08-02 Thread Mika Kuoppala
ister address. We only use this >> > register in error state dumps so the mistake hasn't caused any real >> > problems, but fixing it will hopefully make the error state dumps a bit >> > more useful for debugging. >> > >> > Fixes: e50dbdbfd9fb ("drm/i915/t

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: document caching related bits

2021-08-02 Thread Mika Kuoppala
; > Suggested-by: Daniel Vetter > Signed-off-by: Matthew Auld > Cc: Ville Syrjälä > Cc: Mika Kuoppala > --- > .../gpu/drm/i915/gem/i915_gem_object_types.h | 173 +- > drivers/gpu/drm/i915/i915_drv.h | 9 - > 2 files changed, 169 insertions(+), 13

Re: [Intel-gfx] [PATCH 1/5] drm/i915: document caching related bits

2021-07-13 Thread Mika Kuoppala
Matthew Auld writes: > Try to document the object caching related bits, like cache_coherent and > cache_dirty. > > Suggested-by: Daniel Vetter > Signed-off-by: Matthew Auld > --- > .../gpu/drm/i915/gem/i915_gem_object_types.h | 135 +- > drivers/gpu/drm/i915/i915_drv.h

Re: [Intel-gfx] [PATCH v2] drm/i915: Initialize the mbus_offset to fix static analysis issue

2021-06-04 Thread Mika Kuoppala
Rodrigo Vivi writes: > On Thu, Jun 03, 2021 at 03:07:54PM -0700, Manasi Navare wrote: >> Static analysis identified an issue in skl_crtc_allocate_ddb where >> mbus_offset may be used uninitialized. >> This patch fixes it. > > I'm sorry, but I really cannot see what this tool is seeing... > I

Re: [Intel-gfx] [PATCH] drm/i915: Take request reference before arming the watchdog timer

2021-03-26 Thread Mika Kuoppala
ot;drm/i915: Request watchdog infrastructure") > Cc: Daniel Vetter Reviewed-by: Mika Kuoppala > --- > Test-with: 20210318162400.2065097-1-tvrtko.ursu...@linux.intel.com > --- > drivers/gpu/drm/i915/i915_request.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check for scratch page scribbling

2021-02-10 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2021-02-10 10:49:55) >> Chris Wilson writes: >> > diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c >> > b/drivers/gpu/drm/i915/gt/intel_gtt.c >> > index d34770ae4c9a..5ac9eb4a3a92 100644 >> > --- a/d

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gt: Correct surface base address

2021-02-10 Thread Mika Kuoppala
Chris Wilson writes: > The surface_state_base is an offset into the batch, so we need to pass > the correct batch address for STATE_BASE_ADDRESS. > > Fixes: 47f8253d2b89 ("drm/i915/gen7: Clear all EU/L3 residual contexts") > Signed-off-by: Chris Wilson > Cc: Mika K

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check for scratch page scribbling

2021-02-10 Thread Mika Kuoppala
Chris Wilson writes: > Periodically check, for example when idling and upon closing user > contexts, whether or not some client has written into unallocated PTE in > their ppGTT. > > Signed-off-by: Chris Wilson > --- > .../drm/i915/gem/selftests/i915_gem_context.c | 19 +++-- >

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

2021-02-09 Thread Mika Kuoppala
Chris Wilson writes: > The heartbeat runs through a few phases that we expect to complete > within a certain number of heartbeat intervals. First we must submit the > heartbeat to the queue, and if the queue is occupied it may take a > couple of intervals before the heartbeat preempts the

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

2021-02-04 Thread Mika Kuoppala
-139,6 +146,8 @@ static void heartbeat(struct work_struct *wrk) > "stopped heartbeat on %s", > engine->name); > } > + > + rq->emitted_jiffies = jiffies; Woul

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

2021-02-04 Thread Mika Kuoppala
Chris Wilson writes: > 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_

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Use a single copy of the mocs table

2021-02-02 Thread Mika Kuoppala
Chris Wilson writes: > Instead of copying the whole table to each category (mocs, l3cc), use a > single table with a pointer to it if the category is enabled. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/se

Re: [Intel-gfx] [PATCH 05/57] drm/i915: Take rcu_read_lock for querying fence's driver/timeline names

2021-02-02 Thread Mika Kuoppala
Chris Wilson writes: > The name very often may be freed independently of the fence, with the > only protection being RCU. To be safe as we read the names, hold RCU. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_sw_fence.

Re: [Intel-gfx] [PATCH 04/57] drm/i915: Protect against request freeing during cancellation on wedging

2021-02-02 Thread Mika Kuoppala
Chris Wilson writes: > As soon as we mark a request as completed, it may be retired. So when > cancelling a request and marking it complete, make sure we first keep a > reference to the request. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > ---

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

2021-02-01 Thread Mika Kuoppala
static struct hwsp_semaphore hwsp_semaphore(struct intel_engine_cs *engine) > +{ > + struct hwsp_semaphore s; > + > + s.va = memset32(engine->status_page.addr + 1000, 0, 1); > + s.ggtt = (i915_ggtt_offset(engine->status_page.vma) + > + offset_in_page(s.

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

2021-02-01 Thread Mika Kuoppala
Chris Wilson writes: > Verify that context isolation is also preserved when accessing > context-local registers with relative-mmio commands. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/selftest_lrc.c | 88 ++

Re: [Intel-gfx] [PATCH 01/57] drm/i915/gt: Restrict the GT clock override to just Icelake

2021-02-01 Thread Mika Kuoppala
y: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c > b/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c > ind

Re: [Intel-gfx] [PATCH] drm/i915/gt: Ignore error capturing a closed context

2021-01-29 Thread Mika Kuoppala
ckly as part of a forced-preemption. > In which case, do not waste time in suspending the request, capturing > the error, and just cancel it instead. > > Testcase: igt/gem_ctx_persistence/many-contexts > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > .../drm/i91

Re: [Intel-gfx] [PATCH] drm/i915/gt: Drop active.lock around active request read inside execlists

2021-01-27 Thread Mika Kuoppala
simple read of the current request. > > Suggested-by: Mika Kuoppala > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 -- > 1 file changed, 2 deletions(-) > &g

Re: [Intel-gfx] [PATCH] drm/i915/gt: Flush before changing register state

2021-01-26 Thread Mika Kuoppala
Chris Wilson writes: > Flush; invalidate; change registers; invalidate; flush. > > Will this finally work on every device? Or will Baytrail complain again? > > On the positive side, we immediate see the benefit of having hsw-gt1 in > CU. CI Acked-by: Mika Kuoppala >

Re: [Intel-gfx] [PATCH] drm/i915/gt: Only print an error if the resume fails after the reset

2021-01-22 Thread Mika Kuoppala
l if we cant proceed. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_ring_submission.c | 15 ++- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submissi

Re: [Intel-gfx] [CI 1/3] drm/i915/gt: Flush GT interrupt handler before changing interrupt state

2021-01-21 Thread Mika Kuoppala
Chris Wilson writes: > Before we clear any state that may be being written by an interrupt > handler on another core, flush the interrupt handlers. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_execlists_submission.c

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

2021-01-21 Thread Mika Kuoppala
round switching back to a > completed context") > References: 8ab3a3812aa9 ("drm/i915/gt: Incrementally check for rewinding") > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > .../drm/i915/gt/intel_execlists_submission.c | 34 ++

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

2021-01-21 Thread Mika Kuoppala
Chris Wilson writes: > 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 Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 6 ++ &g

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

2021-01-19 Thread Mika Kuoppala
stem running in the remote > chance 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|

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

2021-01-19 Thread Mika Kuoppala
Chris Wilson writes: > 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 Kuop

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

2021-01-19 Thread Mika Kuoppala
.display.has_hotplug = 1, > @@ -571,8 +573,7 @@ static const struct intel_device_info hsw_gt3_info = { > .dma_mask_size = 39, \ > .ppgtt_type = INTEL_PPGTT_FULL, \ > .ppgtt_size = 48, \ > - .has_64bit_reloc = 1, \ > - .has_reset_engine = 1 Oh we already di

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

2021-01-19 Thread Mika Kuoppala
Chris Wilson writes: > 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/i91

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

2021-01-19 Thread Mika Kuoppala
start of resume as a guardian memory > barrier. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > .../gpu/drm/i915/gt/intel_ring_submission.c | 93 +-- > 1 file changed, 42 insertions(+), 51 deletions(-) > > diff --git a/drivers/gpu/d

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

2021-01-19 Thread Mika Kuoppala
E_READ_FW(engine, RING_TAIL)); > + Not related to this patch but this makes me wondering if the actual disable should be at this point before zeroing as manipulating the head again might kick the hardware forward. As in this point the 'ring must be empty' is satisfied. For this patch, Reviewe

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

2021-01-19 Thread Mika Kuoppala
Chris Wilson writes: > 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 ++

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

2021-01-19 Thread Mika Kuoppala
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 > residuals") > Signed-off-by: Chris Wilson > Cc: Mika Ku

Re: [Intel-gfx] [PATCH] drm/i915/gt: Prune 'inline' from execlists

2021-01-14 Thread Mika Kuoppala
64885766-722 > execlists_reset_csb.constprop 1587 777-810 > Total: Before=1605815, After=1605086, chg -0.05% > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > .../drm/i915/gt/intel_execlists_submission.c | 6

Re: [Intel-gfx] [PATCH v2] drm/i915/selftests: Bump the scheduling error threshold for fast heartbeats

2021-01-13 Thread Mika Kuoppala
; <3> [616.860901] i915/intel_heartbeat_live_selftests: live_heartbeat_fast > failed with error -22 > > v2: More context from CI. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c |

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Bump the scheduling threshold for fast heartbeats

2021-01-13 Thread Mika Kuoppala
Chris Wilson writes: > Since we are system_highpri_wq, we expected the heartbeat to be > scheduled promptly. However, we see delays of over 10ms upsetting our > assertions. Accept this as inevitable and bump the error threshold to > 20ms (from 6ms). > > Signed-off-by: Chris Wilson > --- >

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Rearrange ktime_get to reduce latency against CS

2021-01-13 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2021-01-12 19:19:34) >> Chris Wilson writes: >> >> > In our tests where we measure the elapsed time on both the CPU and CS >> > using a udelay, our CS results match the udelay much more accurately >

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Rearrange ktime_get to reduce latency against CS

2021-01-12 Thread Mika Kuoppala
Chris Wilson writes: > In our tests where we measure the elapsed time on both the CPU and CS > using a udelay, our CS results match the udelay much more accurately > than the ktime (even when using ktime_get_fast_ns). With preemption > disabled, we can go one step lower than ktime and use

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

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

Re: [Intel-gfx] [PATCH 03/56] drm/i915/gt: Cancel submitted requests upon context reset

2020-12-30 Thread Mika Kuoppala
Chris Wilson writes: > Since we process schedule-in of a context after submitting the request, > if we decide to reset the context at that time, we also have to cancel > the requets we have marked for submission. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala &

Re: [Intel-gfx] [PATCH 06/54] drm/i915: Drop i915_request.lock requirement for intel_rps_boost()

2020-12-30 Thread Mika Kuoppala
d88038b 100644 > --- a/drivers/gpu/drm/i915/i915_request.c > +++ b/drivers/gpu/drm/i915/i915_request.c > @@ -307,10 +307,8 @@ bool i915_request_retire(struct i915_request *rq) > spin_unlock_irq(>lock); > } > > - if (i915_request_has_waitboost(rq)) { > - GE

Re: [Intel-gfx] [PATCH] drm/i915/gt: Taint the reset mutex with the shrinker

2020-12-30 Thread Mika Kuoppala
cannot touch the shrinker. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_reset.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c > b/drivers/gpu/drm/i91

Re: [Intel-gfx] [PATCH] drm/i915/gt: Define guc firmware blob for older Cometlakes

2020-12-29 Thread Mika Kuoppala
reedesktop.org/drm/intel/-/issues/2859 > Fixes: 5f4ae2704d59 ("drm/i915: Identify Cometlake platform") > Signed-off-by: Chris Wilson > Cc: # v5.9+ Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 + > 1 file changed, 1 insertion(

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gem: Optimistically prune dma-resv from the shrinker.

2020-12-23 Thread Mika Kuoppala
-git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c > b/drivers/gpu/drm/i915/gem/i915_gem_wait.c > index 8af55cd3e690..c1b13ac50d0f 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c > @@ -9,6 +9,7 @@ > > #include "gt/intel_engine.h&

Re: [Intel-gfx] [PATCH 1/2] drm/i915/gt: Prefer recycling an idle fence

2020-12-23 Thread Mika Kuoppala
e first pass. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 22 ++-- > 1 file changed, 20 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt_fenci

Re: [Intel-gfx] [PATCH 1/2] drm/i915/selftests: Confirm CS_TIMESTAMP / CTX_TIMESTAMP share a clock

2020-12-23 Thread Mika Kuoppala
> Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 203 ++- > 1 file changed, 202 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c > b/drivers/gpu/drm/i915/gt/s

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gt: Consolidate the CS timestamp clocks

2020-12-23 Thread Mika Kuoppala
d = > - RUNTIME_INFO(ce->engine->i915)->cs_timestamp_period_ns; > + const u32 period = ce->engine->gt->clock_period_ns; > > return mul_u32_u32(ewma_runtime_read(>runtime.avg), period); > } > diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c &g

Re: [Intel-gfx] [PATCH] drm/i915/gt: Move gen8 CS emitters into gen8_engine_cs.h

2020-12-16 Thread Mika Kuoppala
Chris Wilson writes: > Reduce the pollution of intel_engine.h by moving gen8_emit_pipe_control > and friends to gen8_engine_cs.h > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/display/intel_overlay.c | 1 + > dri

Re: [Intel-gfx] [PATCH 15/69] drm/i915/gt: Track all timelines created using the HWSP

2020-12-15 Thread Mika Kuoppala
s poison such state so that we more quickly spot when > + * we falsely assume it has been preserved. > + */ > + if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM)) > + memset(engine->status_page.addr, POISON_INUSE, PAGE_SIZE); > + > + /* > + * T

Re: [Intel-gfx] [PATCH 02/21] drm/i915/gt: Wean workaround selftests off GEM context

2020-12-10 Thread Mika Kuoppala
Chris Wilson writes: > The workarounds are tied to the GT and we should derive the tests local > to the GT. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > .../gpu/drm/i915/gt/selftest_workarounds.c| 189 -- > 1 file changed,

Re: [Intel-gfx] [PATCH 01/21] drm/i915/gt: Mark legacy ring context as lost

2020-12-10 Thread Mika Kuoppala
Chris Wilson writes: > When we reset the legacy ring context, due to potential corruption over > suspend/resume, remove the valid bit so that we avoid loading garbage. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_rin

Re: [Intel-gfx] [PATCH] drm/i915/gt: Rearrange snb workarounds

2020-12-10 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2020-12-10 10:36:07) >> Chris Wilson writes: >> >> > Some rcs0 workarounds were being incorrectly applied to the GT, and so >> > we failed to restore the expected register settings after a reset. >

Re: [Intel-gfx] [PATCH] drm/i915/gt: Rearrange snb workarounds

2020-12-10 Thread Mika Kuoppala
Chris Wilson writes: > 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 > --- > drivers/gpu/drm/i915/gt/intel_workarounds.c | 67 ++--- > 1 file changed,

Re: [Intel-gfx] [PATCH i-g-t] i915/gem_mmap_gtt: Replace gem_threaded_access_tiled

2020-12-10 Thread Mika Kuoppala
Chris Wilson writes: > Concurrent access to a mmap is covered by gem_mmap_gtt/concurrent, > if we add tiled access to it, we make gem_threaded_access_tiled entirely > redundant. Aww, my first ever test for igt iirc. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala

Re: [Intel-gfx] [PATCH 3/3] drm/i915/gt: Remove uninterruptible parameter from intel_gt_wait_for_idle

2020-12-09 Thread Mika Kuoppala
Chris Wilson writes: > Now that the only user of the uninterruptible wait was eliminated, > remove the support. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_gt_requests.c | 7 +-- > 1 file changed, 1 inse

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Sleep around performing iommu unmaps on Tigerlake

2020-12-09 Thread Mika Kuoppala
E updates do not prevent > the faults. So far the only effect has been from inducing a delay > between reuse of the iommu on the GPU. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Acked-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_ggtt.c | 11 ++- >

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Remove livelock from "do_idle_maps" vtd w/a

2020-12-09 Thread Mika Kuoppala
f-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 25 ++--- > 1 file changed, 10 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c > b/drivers/gpu/drm/i915/i915_gem_gtt.c >

Re: [Intel-gfx] [PATCH 03/24] drm/i915/gt: Cancel the preemption timeout on responding to it

2020-12-04 Thread Mika Kuoppala
Force preemption") > Signed-off-by: Chris Wilson > Cc: # v5.5+ Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c > b/drivers/gpu/drm/

Re: [Intel-gfx] [PATCH 02/24] drm/i915/gt: Ignore repeated attempts to suspend request flow across reset

2020-12-04 Thread Mika Kuoppala
light > requests") > Signed-off-by: Chris Wilson > Cc: # v5.7+ Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c > b/drivers/gpu/drm/i915/gt/intel

Re: [Intel-gfx] [PATCH 3/4] drm/i915/gt: Include reset failures in the trace

2020-12-04 Thread Mika Kuoppala
Chris Wilson writes: > The GT and engine reset failures are completely invisible when looking at > a trace for a bug, but are vital to understanding the incomplete flow. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/

Re: [Intel-gfx] [PATCH 4/4] drm/i915/gt: Clear the execlists timers upon reset

2020-12-04 Thread Mika Kuoppala
gned-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c > b/drivers/gpu/drm/i915/gt/intel_lrc.c > index 7f25894e41d5..0c7f1e3dee5c

Re: [Intel-gfx] [PATCH] drm/i915/gt: Plug IPS into intel_rps_set

2020-11-20 Thread Mika Kuoppala
Chris Wilson writes: > The old IPS interface did not match the RPS interface that we tried to > plug it into (bool vs int return). Once repaired, our minimal > selftesting is finally happy! > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > dr

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix wrong return value of perf_series_engines()

2020-11-16 Thread Mika Kuoppala
ted-by: Hulk Robot > Signed-off-by: Zhang Xiaoxu Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/selftests/i915_request.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c > b/drivers/gpu/drm/i

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix wrong return value of perf_request_latency()

2020-11-16 Thread Mika Kuoppala
Signed-off-by: Zhang Xiaoxu Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/selftests/i915_request.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c > b/drivers/gpu/drm/i915/selftests/i915_reque

Re: [Intel-gfx] [PATCH] drm/i915/gt: Include semaphore status in print_request()

2020-11-11 Thread Mika Kuoppala
atic void print_request(struct drm_printer *m, > rq->fence.context, rq->fence.seqno, > i915_request_completed(rq) ? "!" : > i915_request_started(rq) ? "*" : > +!i915_sw_fence_s

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gt: Flush xcs before tgl breadcrumbs

2020-11-03 Thread Mika Kuoppala
e issue from being reproduced, we can presume the post-sync op is not > so post-sync. > Only thing that is mildly surpricing is that first one doesnt need postop write. > Testcase: igt/gem_exec_fence/parallel > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > Cc: sta...@vger

Re: [Intel-gfx] [PATCH 1/2] drm/i915/gt: Expose more parameters for emitting writes into the ring

2020-11-03 Thread Mika Kuoppala
, u32 flags0, u32 flags1) Opportunity to swap the offset/value to be in line with the actual qw write. Just an observation rather than a value add proposal. Reviewed-by: Mika Kuoppala > { > - /* We're using qword write, offset should be aligned to 8 bytes. */ > - GEM_BUG_ON(!IS

Re: [Intel-gfx] [PATCH] drm/i915/gem: Avoid synchronous binds deep within locks

2020-10-27 Thread Mika Kuoppala
wait for all cpus to enter > the stop_machine callback, and those cpus may be waiting for the > critical section already held. > > Fixes: d7085b0faac8 ("drm/i915/gem: Poison stolen pages before use") > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika

Re: [Intel-gfx] [PATCH 2/2] drm/i915/selftests: Exercise intel_timeline_read_hwsp()

2020-10-23 Thread Mika Kuoppala
om the HWSP and dispatch it at different > points around a wrap to see if the value is lost. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/selftest_timeline.c | 378 +++- > 1 file changed, 376 insertions(+), 2 deletions(-

Re: [Intel-gfx] [PATCH] drm/i915/gt: Use the local HWSP offset during submission

2020-10-23 Thread Mika Kuoppala
heline *cl; > + > + /* Before the request is executed, the timeline/cachline is fixed */ s/cachline/cacheline Reviewed-by: Mika Kuoppala > + > + cl = rcu_dereference_protected(rq->hwsp_cacheline, 1); > + if (cl) > + return cl->ggtt_offset;

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915/gem_mmap_gtt: Trim object size for ptracing

2020-10-23 Thread Mika Kuoppala
by a couple of orders of magnitude. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > tests/i915/gem_mmap_gtt.c | 23 --- > 1 file changed, 12 insertions(+), 11 deletions(-) > > diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_g

Re: [Intel-gfx] [PATCH v2] drm/i915/selftests: Flush the old heartbeat more gently

2020-10-21 Thread Mika Kuoppala
's not busy-spin waiting for the > old heartbeat, but terminate it and start afresh. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Exclude low pages (128KiB) of stolen from use

2020-10-20 Thread Mika Kuoppala
e. The value of 128KiB was found > by empirical measurement (and verified now with a selftest) on gen9. > > Signed-off-by: Chris Wilson > Cc: sta...@vger.kernel.org Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/Kconfig.debug | 1 + > drivers/gpu/drm

Re: [Intel-gfx] [PATCH] drm/i915/gt: Delay execlist processing for tgl

2020-10-16 Thread Mika Kuoppala
serting a delay on the GPU > between requests. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > Cc: Bruce Chang > Cc: Joonas Lahtinen > Cc: sta...@vger.kernel.org Acked-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++ > 1 file changed, 3 inse

Re: [Intel-gfx] [CI] drm/i915/gt: Confirm the context survives execution

2020-10-16 Thread Mika Kuoppala
that it had a tag after reading, tho double does no harm. Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_engine_pm.c | 37 +++ > drivers/gpu/drm/i915/gt/intel_lrc.c | 12 ++-- > 2 files changed, 34 insertions(+), 15 deletions(-) > &g

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 3/3] i915/gem_exec_balancer: Check interactions between bonds and userptr

2020-10-09 Thread Mika Kuoppala
Chris Wilson writes: > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > tests/i915/gem_exec_balancer.c | 46 +++--- > 1 file changed, 31 insertions(+), 15 deletions(-) > > diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/g

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 2/3] i915/gem_exec_schedule: Include userptr scheduling tests

2020-10-09 Thread Mika Kuoppala
Chris Wilson writes: > In practice, it turns out that compute likes to use userptr for > everything, and so in turn so must we. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > tests/i915/gem_exec_schedule.c | 41 +++--- >

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 1/3] lib: Launch spinners from inside userptr

2020-10-09 Thread Mika Kuoppala
Chris Wilson writes: Needs a commit message like: Add support for dummyload to be userptr. Reviewed-by: Mika Kuoppala > Signed-off-by: Chris Wilson > --- > lib/igt_dummyload.c | 87 - > lib/igt_dummyload.h | 13 -- &

Re: [Intel-gfx] [PATCH] drm/i915/gem: Poison stolen pages before use

2020-10-08 Thread Mika Kuoppala
Chris Wilson writes: > When allocating objects from stolen, memset() the backing store to > POISON_INUSE (0x5a) to help identify any uninitialised use of a stolen > object. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gem/i

Re: [Intel-gfx] [PATCH] drm/i915/gem: Perform all asynchronous waits prior to marking payload start

2020-10-07 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2020-10-07 10:40:59) >> Chris Wilson writes: >> >> > The initial breadcrumb marks the transition from context wait and setup >> > into the request payload. We use the marker to determine if the request >> >

Re: [Intel-gfx] [PATCH] drm/i915/gem: Perform all asynchronous waits prior to marking payload start

2020-10-07 Thread Mika Kuoppala
Chris Wilson writes: > The initial breadcrumb marks the transition from context wait and setup > into the request payload. We use the marker to determine if the request > is merely waiting to begin, or is inside the payload and hung. > Forgetting to include a breadcrumb before the user payload

Re: [Intel-gfx] [PATCH] drm/i915/gt: Undo forced context restores after trivial preemptions

2020-10-07 Thread Mika Kuoppala
ure point > in the ring that includes an expected wa_tail. (That is if the > ring->tail is already set to rq->wa_tail, including another 8 bytes in > the check does not invalidate the incremental wrap detection.) > > Fixes: 8ab3a3812aa9 ("drm/i915/gt: Incrementally check for rewi

Re: [Intel-gfx] [PATCH v3] drm/i915/gt: Track the most recent pulse for the heartbeat

2020-10-07 Thread Mika Kuoppala
ck. > > This impacts tgl/rcs0 as we rely on the heartbeat for our healthcheck for > the normal preemption detection mechanism is disabled by default. > > Testcase: igt/gem_exec_schedule/preempt-hang/rcs0 #tgl > Signed-off-by: Chris Wilson > Cc: Tvrtko Ursulin Reviewed-by: Mik

Re: [Intel-gfx] [PATCH] drm/i915/gt: Scrub HW state on remove

2020-10-06 Thread Mika Kuoppala
ab.freedesktop.org/drm/intel/-/issues/2508 > Testcase: igt/core_hotunplug > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_gt.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu

Re: [Intel-gfx] [PATCH i-g-t v2] i915/gen9_exec_parse: Check parsing of large objects

2020-09-29 Thread Mika Kuoppala
Chris Wilson writes: > Simply check that we support parsing of batches as large as the uAPI > allows. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > Try a few intermediate object sizes since CI machines do not have enough > m

Re: [Intel-gfx] [PATCH] drm/i915: Avoid mixing integer types during batch copies

2020-09-29 Thread Mika Kuoppala
gative, only for it flip back > to a large unsigned value after passing a boundary check. > > Fixes: ed13033f0287 ("drm/i915/cmdparser: Only cache the dst vmap") > Testcase: igt/gen9_exec_parse/bb-large > Reported-by: "Candelaria, Jared" > Signed-off-by: Chris Wilson

Re: [Intel-gfx] [PATCH 4/4] drm/i915/gt: Use a mmio read of the CSB in case of failure

2020-09-15 Thread Mika Kuoppala
Chris Wilson writes: > If we find the GPU didn't update the CSB within 50us, we currently fail > and eventually reset the GPU. Lets report the value from the mmio space > as a last resort, it may just stave off an unnecessary GPU reset. > > Suggested-by: Mika Kuoppala I am more

Re: [Intel-gfx] [PATCH 3/4] drm/i915/gt: Apply the CSB w/a for all

2020-09-15 Thread Mika Kuoppala
r on Icelake that was not covered by our > previous w/a. > > References: d8f505311717 ("drm/i915/icl: Forcibly evict stale csb entries") > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > Cc: Bruce Chang Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_lrc.

Re: [Intel-gfx] [PATCH 2/4] drm/i915/gt: Wait for CSB entries on Tigerlake

2020-09-15 Thread Mika Kuoppala
ict stale csb entries") References: HSDES#22011327657, HSDES#1508287568 > Suggested-by: Bruce Chang > Signed-off-by: Chris Wilson > Cc: Bruce Chang > Cc: Mika Kuoppala > Cc: sta...@vger.kernel.org # v5.4 > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 21

Re: [Intel-gfx] [PATCH] drm/i915/gt: Check for a registered driver with IPS

2020-09-15 Thread Mika Kuoppala
1.929369] ret_from_fork+0x22/0x30 > <4> [211.929382] Modules linked in: vgem snd_hda_codec_hdmi > snd_hda_codec_generic ledtrig_audio i915 coretemp crct10dif_pclmul > crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec > snd_hwdep snd_hda_core e1000

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Track runtime spent in closed GEM contexts

2020-09-14 Thread Mika Kuoppala
Tvrtko Ursulin writes: > From: Tvrtko Ursulin > > As GEM contexts are closed we want to have the DRM client remember how > much GPU time they used (per class) so later we can used it for smarter > purposes. > > Signed-off-by: Tvrtko Ursulin Reviewed-by: Mika Kuoppala

Re: [Intel-gfx] [PATCH 4/9] drm/i915: Track runtime spent in unreachable intel_contexts

2020-09-14 Thread Mika Kuoppala
/** > + * @past_runtime: Accumulation of freed intel_context pphwsp runtimes. We are tracking runtime in per engine hw context, which pphwsp is just part of (first page of it). If this is also in par with the documentation, good enough. Reviewed-by: Mika Kuoppala > + */ > +

Re: [Intel-gfx] [PATCH] drm/i915: Fix an error code i915_gem_object_copy_blt()

2020-09-10 Thread Mika Kuoppala
es: 6b05030496f7 ("drm/i915: Convert i915_gem_object/client_blt.c to use > ww locking as well, v2.") > Signed-off-by: Dan Carpenter Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > &g

[Intel-gfx] [PATCH] drm/i915: Unlock the shared hwsp_gtt object after pinning

2020-09-03 Thread Mika Kuoppala
From: Thomas Hellström The hwsp_gtt object is used for sub-allocation and could therefore be shared by many contexts causing unnecessary contention during concurrent context pinning. However since we're currently locking it only for pinning, it remains resident until we unpin it, and therefore

Re: [Intel-gfx] [PATCH 10/39] drm/i915: Cancel outstanding work after disabling heartbeats on an engine

2020-08-29 Thread Mika Kuoppala
g contexts -- but we did not prevent those > contexts from being resubmitted if they survived the final hangcheck. > > Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs") > Testcase: igt/gem_ctx_persistence/heartbeat-stop > Signed-off-by: Chris Wilson > Cc

Re: [Intel-gfx] [PATCH 06/39] drm/i915/gt: Wait for CSB entries on Tigerlake

2020-08-28 Thread Mika Kuoppala
stale csb entries") References: HSDES#1508287568 > Suggested-by: Bruce Chang > Signed-off-by: Chris Wilson > Cc: Bruce Chang > Cc: Mika Kuoppala > Cc: sta...@vger.kernel.org # v5.4 > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 21 ++--- > 1 fil

  1   2   3   4   5   6   7   8   9   10   >