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] 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, 33

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 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 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 15/69] drm/i915/gt: Track all timelines created using the HWSP

2020-12-15 Thread Mika Kuoppala
garbage. Since this doesn't always happen, > + * let'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-&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 2/2] drm/i915/gt: Consolidate the CS timestamp clocks

2020-12-23 Thread Mika Kuoppala
> - 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(&ce->runtime.avg), period); > } > diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c

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 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 2/2] drm/i915/gem: Optimistically prune dma-resv from the shrinker.

2020-12-23 Thread Mika Kuoppala
_engine.h" > > +#include "dma_resv_utils.h" > #include "i915_gem_ioctls.h" > #include "i915_gem_object.h" > > @@ -84,11 +85,8 @@ i915_gem_object_wait_reservation(struct dma_resv *resv, >* Opportunistically prune the fences iff we

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] drm/i915/gt: Taint the reset mutex with the shrinker

2020-12-30 Thread Mika Kuoppala
ot 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 06/54] drm/i915: Drop i915_request.lock requirement for intel_rps_boost()

2020-12-30 Thread Mika Kuoppala
> - if (i915_request_has_waitboost(rq)) { > - GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters)); > + if (test_and_set_bit(I915_FENCE_FLAG_BOOST, &rq->fence.flags)) > atomic_dec(&rq->engine->gt->rps.

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] 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(+) > > d

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 local_c

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 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 even

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] drm/i915: Correct SFC_DONE register offset

2021-08-02 Thread Mika Kuoppala
t register 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 (&

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 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] 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 02/46] drm/i915: Report the number of closed vma held by each context in debugfs

2019-01-07 Thread Mika Kuoppala
idr_for_each(&file->object_idr, per_file_stats, &stats); > + spin_unlock(&file->table_lock); > > - mutex_lock(&dev->struct_mutex); > - if (dev_priv->kernel_context) > - per_file_ctx_stats(0, dev_priv->ker

Re: [Intel-gfx] [PATCH 03/46] drm/i915: Track all held rpm wakerefs

2019-01-07 Thread Mika Kuoppala
Chris Wilson writes: > Everytime we take a wakeref, record the stack trace of where it was > taken; clearing the set if we ever drop back to no owners. For debugging > a rpm leak, we can look at all the current wakerefs and check if they > have a matching rpm_put. > > Signed-off-by: Chris Wilson

Re: [Intel-gfx] [PATCH v3] drm/i915: Track all held rpm wakerefs

2019-01-08 Thread Mika Kuoppala
ow rpm->debug_count to disappear between inspections and so > avoid calling krealloc(0) as that may return a ZERO_PTR not NULL! (Mika) > > Signed-off-by: Chris Wilson > Cc: Jani Nikula > Cc: Mika Kuoppala Some use of singular 'wakeref' would read better if changed to pl

Re: [Intel-gfx] [PATCH 04/46] drm/i915: Markup paired operations on wakerefs

2019-01-08 Thread Mika Kuoppala
Chris Wilson writes: > The majority of runtime-pm operations are bounded and scoped within a > function; these are easy to verify that the wakeref are handled > correctly. We can employ the compiler to help us, and reduce the number > of wakerefs tracked when debugging, by passing around cookies

Re: [Intel-gfx] [PATCH 04/46] drm/i915: Markup paired operations on wakerefs

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2019-01-08 16:23:18) >> > @@ -3965,7 +4014,7 @@ void intel_power_domains_init_hw(struct >> > drm_i915_private *dev_priv, bool resume) >> > void intel_power_domains_fini_hw(struct drm_i915_private *dev_priv) >> &g

Re: [Intel-gfx] [PATCH 05/46] drm/i915: Track GT wakeref

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Record the wakeref used for keeping the device awake as the GPU is > executing requests and be sure to cancel the tracking upon parking. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm

Re: [Intel-gfx] [PATCH 06/46] drm/i915: Track the rpm wakerefs for error handling

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Keep hold of the local wakeref used in error handling, to cancel > the tracking upon release so that leaks can be identified. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_irq.

Re: [Intel-gfx] [PATCH 07/46] drm/i915: Mark up sysfs with rpm wakeref tracking

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > As sysfs has a simple pattern of taking a rpm wakeref around the user > access, we can track the local reference and drop it as soon as > possible. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/g

Re: [Intel-gfx] [PATCH 08/46] drm/i915: Mark up debugfs with rpm wakeref tracking

2019-01-09 Thread Mika Kuoppala
15_emon_status(struct seq_file *m, void > *unused) > struct drm_i915_private *dev_priv = node_to_i915(m->private); > struct drm_device *dev = &dev_priv->drm; > unsigned long temp, chipset, gfx; > + intel_wakeref_t wakeref; > int ret; > &g

Re: [Intel-gfx] [PATCH 09/46] drm/i915/perf: Track the rpm wakeref

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Keep track of our wakeref used to keep the device awake so we can catch > any leak. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula > --- > drivers/gpu/drm/i915/i915_drv.h | 2 ++ > drivers/gpu/drm/i915/i915_perf.c | 10 +- > 2 files changed, 7 insertions(+),

Re: [Intel-gfx] [PATCH 10/46] drm/i915/pmu: Track rpm wakeref

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Track the wakeref used for temporary access to the device, and discard > it upon release so that leaks can be identified. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm

Re: [Intel-gfx] [PATCH 11/46] drm/i915/guc: Track the rpm wakeref

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Keep track of our acquired wakeref for interacting with the guc, so that > we can cancel it upon release and so clearly identify leaks. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 12/46] drm/i915/gem: Track the rpm wakerefs

2019-01-09 Thread Mika Kuoppala
ker.c > +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c > @@ -154,6 +154,7 @@ i915_gem_shrink(struct drm_i915_private *i915, > { &i915->mm.bound_list, I915_SHRINK_BOUND }, > { NULL, 0 }, > }, *phase; > + intel_wakeref_t wakeref = 0; >

Re: [Intel-gfx] [PATCH 13/46] drm/i915/fb: Track rpm wakerefs

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Keep track of the rpm wakeref used for framebuffer access so that we can > cancel upon release and so more clearly identify leaks. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i91

Re: [Intel-gfx] [PATCH 14/46] drm/i915/hotplug: Track temporary rpm wakeref

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Keep track of the temporary rpm wakeref inside hotplug detection, so > that we can cancel it immediately upon release and so clearly identify > leaks. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- &g

Re: [Intel-gfx] [PATCH 15/46] drm/i915/panel: Track temporary rpm wakeref

2019-01-09 Thread Mika Kuoppala
Chris Wilson writes: > Keep track of the temporary rpm wakeref used for panel backlight access, > so that we can cancel it immediately upon release and so more clearly > identify leaks. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > -

Re: [Intel-gfx] [PATCH 16/46] drm/i915/selftests: Mark up rpm wakerefs

2019-01-09 Thread Mika Kuoppala
> index 8d22f73a9b63..e1ff6a1c2cb0 100644 > --- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c > @@ -336,6 +336,7 @@ static int igt_evict_contexts(void *arg) > struct drm_mm_node node; > struct r

Re: [Intel-gfx] [PATCH 17/46] drm/i915: Syntatic sugar for using intel_runtime_pm

2019-01-09 Thread Mika Kuoppala
runtime_pm_if_in_use(dev_priv, wakeref) > val = intel_get_cagf(dev_priv, > > I915_READ_NOTRACE(GEN6_RPSTAT1)); > - intel_runtime_pm_put(dev_priv, wakeref); > -

Re: [Intel-gfx] [PATCH 02/21] drm/i915: Markup paired operations on wakerefs

2019-01-10 Thread Mika Kuoppala
hecked/ everywhere, leaving the manual > mark up for smaller more targeted patches. > v3: Mention the cookie in Returns > > Signed-off-by: Chris Wilson > Cc: Jani Nikula > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gvt/aperture_gm.c

Re: [Intel-gfx] [PATCH 16/21] drm/i915: Markup paired operations on display power domains

2019-01-10 Thread Mika Kuoppala
Chris Wilson writes: > The majority of runtime-pm operations are bounded and scoped within a > function; these are easy to verify that the wakeref are handled > correctly. We can employ the compiler to help us, and reduce the number > of wakerefs tracked when debugging, by passing around cookies

Re: [Intel-gfx] [PATCH 16/21] drm/i915: Markup paired operations on display power domains

2019-01-10 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2019-01-10 15:51:33) >> Chris Wilson writes: >> > @@ -680,6 +682,8 @@ static int i915_interrupt_info(struct seq_file *m, >> > void *data) >> > wakeref = intel_runtime_pm_get(dev_priv); >>

Re: [Intel-gfx] [PATCH 17/21] drm/i915: Track the wakeref used to initialise display power domains

2019-01-11 Thread Mika Kuoppala
ependent HW access during > @@ -4054,18 +4055,20 @@ void intel_power_domains_init_hw(struct > drm_i915_private *dev_priv, bool resume) >* resources powered until display HW readout is complete. We drop >* this reference in intel_power_domains_enable(). > *

Re: [Intel-gfx] [PATCH 20/21] drm/i915: Complain if hsw_get_pipe_config acquires the same power well twice

2019-01-11 Thread Mika Kuoppala
Chris Wilson writes: > As we only release each power well once, we assume that each transcoder > maps to a different domain. Complain if this is not so. > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/intel_disp

Re: [Intel-gfx] [PATCH 18/21] drm/i915: Combined gt.awake/gt.power wakerefs

2019-01-14 Thread Mika Kuoppala
gpu/drm/i915/selftests/mock_gem_device.c > b/drivers/gpu/drm/i915/selftests/mock_gem_device.c > index 082809569681..2c55e0fa64c9 100644 > --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c > +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c > @@ -164,6 +164,7 @@ struct drm_i915_private *mock_

Re: [Intel-gfx] [PATCH 21/21] drm/i915: Mark up Ironlake ips with rpm wakerefs

2019-01-14 Thread Mika Kuoppala
Chris Wilson writes: > Currently Ironlake operates under the assumption that rpm awake (and its > error checking is disabled). As such, we have missed a few places where we > access registers without taking the rpm wakeref and thus trigger > warnings. intel_ips being one culprit. > > As this invo

Re: [Intel-gfx] [CI 20/21] drm/i915: Combined gt.awake/gt.power wakerefs

2019-01-14 Thread Mika Kuoppala
Chris Wilson writes: > As the GT_IRQ power domain implies a wakeref, we can use it inplace of > our existing redundant rpm grab. > > v2: Drop papering over forgetting to take the runtime wakeref in > selftests > > Signed-off-by: Chris Wilson > Cc: Jani Nikula Re

Re: [Intel-gfx] [PATCH i-g-t] intel-ci: Drop gem_ctx_switch/heavy

2019-01-15 Thread Mika Kuoppala
ies this test was in any way mentioned, are issues where this test didn't play any particular role itself. Heavy seems to indicate only bigger contexts for switching so I agree with the timing argument. These seconds are more well spent elsewhere. Reviewed-by: Mika Kuoppala > > Sign

Re: [Intel-gfx] [PATCH] drm/i915/perf: Annotate i915_perf.wakeref for keneldoc

2019-01-15 Thread Mika Kuoppala
Chris Wilson writes: > drivers/gpu/drm/i915/i915_drv.h:1375: warning: Function parameter or member > 'wakeref' not described in 'i915_perf_stream' > > Reported-by: kbuild-...@01.org > Fixes: 6619c0075f78 ("drm/i915/perf: Track the rpm wakeref") >

Re: [Intel-gfx] [PATCH 1/8] drm/i915: Serialise concurrent calls to i915_gem_set_wedged()

2019-01-15 Thread Mika Kuoppala
igned-off-by: Chris Wilson > Cc: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_gem.c | 32 ++- > drivers/gpu/drm/i915/i915_gpu_error.h | 4 ++- > .../gpu/drm/i915/selftests/mock_gem_device.c | 1 + > 3 files changed, 28 insertions(+), 9

Re: [Intel-gfx] [PATCH] drm/i915: Only dump GPU state on set-wedged if interesting

2019-01-15 Thread Mika Kuoppala
-by: Chris Wilson > Cc: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_gem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 90c167f71345..80264cb9ca7f 100644 > --- a/drivers/

Re: [Intel-gfx] [PATCH] drm/i915/perf: Annotate i915_perf.wakeref for keneldoc

2019-01-15 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2019-01-15 10:45:50) >> Chris Wilson writes: >> >> > drivers/gpu/drm/i915/i915_drv.h:1375: warning: Function parameter or >> > member 'wakeref' not described in 'i915_perf_stream' >> >

Re: [Intel-gfx] [PATCH i-g-t 1/3] i915/gem_userptr_blits: Only mlock the memfd once, not the arena

2019-01-16 Thread Mika Kuoppala
Chris Wilson writes: > We multiply the memfd 64k to create a 2G arena which we then attempt to > write into after marking read-only. Howver, when it comes to unlock the s/Howver/However > arena after the test, performance tanks as the kernel tries to resolve > the 64k repeated mappings onto the

Re: [Intel-gfx] [PATCH i-g-t 1/3] i915/gem_userptr_blits: Only mlock the memfd once, not the arena

2019-01-16 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2019-01-16 09:47:27) >> Chris Wilson writes: >> >> > We multiply the memfd 64k to create a 2G arena which we then attempt to >> > write into after marking read-only. Howver, when it comes to unlock the >> &

Re: [Intel-gfx] [PATCH i-g-t] drm/drm_import_export: Replace imprecise loop-bound with timeout

2019-01-16 Thread Mika Kuoppala
7 +196,7 @@ static void test_import_close_race(void) > > igt_assert_eq(pthread_create(&t, NULL, import_close_thread , &t_data), > 0); > > - while (loops--) { > + igt_until_timeout(15) { Reasonable. Took 90s with kbl! Reviewed-by: Mika K

Re: [Intel-gfx] [PATCH i-g-t 2/3] i915/gem_cpu_reloc: Use a self-modifying chained batch

2019-01-16 Thread Mika Kuoppala
Chris Wilson writes: > Use another sensitive CPU reloc to emit a chained batch from inside the > updated buffer to reduce the workload on slow machines to fit within the > CI timeout. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=108248 > Signed-off-by: Chris Wilson > --- > tests

Re: [Intel-gfx] [PATCH i-g-t 3/3] igt/drv_missed_irq: Skip if the kernel reports no rings available to test

2019-01-16 Thread Mika Kuoppala
Chris Wilson writes: > Some setups (e.g. guc and gen10+) can not disable the MI_USER_INTERRUPT > generation and so can not simulate missed interrupts. These tests would > fail, so skip when the kernel reports no tests available. > > Signed-off-by: Chris Wilson Reviewed-by

Re: [Intel-gfx] [PATCH i-g-t 2/3] i915/gem_cpu_reloc: Use a self-modifying chained batch

2019-01-16 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2019-01-16 14:22:59) >> Chris Wilson writes: >> >> > Use another sensitive CPU reloc to emit a chained batch from inside the >> > updated buffer to reduce the workload on slow machines to fit within the >> &g

Re: [Intel-gfx] [PATCH 1/8] drm/i915: Serialise concurrent calls to i915_gem_set_wedged()

2019-01-16 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Chris Wilson (2019-01-15 12:05:27) >> Quoting Mika Kuoppala (2019-01-15 11:56:11) >> > Chris Wilson writes: >> > >> > > Make i915_gem_set_wedged() and i915_gem_unset_wedged() behaviour more >> > > consistently i

Re: [Intel-gfx] [PATCH 3/8] drm/i915: Pull all the reset functionality together into i915_reset.c

2019-01-16 Thread Mika Kuoppala
the dust has settled. Regardless, Acked-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/Makefile |3 +- > drivers/gpu/drm/i915/i915_debugfs.c |2 + > drivers/gpu/drm/i915/i915_drv.c | 206 +-- > drivers/gpu/drm/i915/i915

Re: [Intel-gfx] [PATCH v2 1/4] drm/i915/dp: remove PANEL_POWER_OFF macro and its use

2019-01-17 Thread Mika Kuoppala
Jani Nikula writes: > It's superfluous. One could argue that it has a minor documentative purpose. But there is comment for that. Reviewed-by: Mika Kuoppala > > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/i915_reg.h | 1 - > drivers/gpu/drm/i915/intel_

Re: [Intel-gfx] [PATCH v2 2/4] drm/i915: introduce _BIT() and _MASK() to define register contents

2019-01-17 Thread Mika Kuoppala
t; Cc: Chris Wilson > Cc: Joonas Lahtinen > Cc: Michal Wajdeczko > Cc: Mika Kuoppala > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/i915_reg.h | 83 - > 1 file changed, 50 insertions(+), 33 deletions(-) > > diff --git a/driv

Re: [Intel-gfx] [PATCH 4/8] drm/i915: Make all GPU resets atomic

2019-01-17 Thread Mika Kuoppala
Chris Wilson writes: > In preparation for the next few commits, make resetting the GPU atomic. > Currently, we have prepared gen6+ for atomic resetting of individual > engines, but now there is a requirement to perform the whole device > level reset (just the register poking) from inside an atomi

Re: [Intel-gfx] [PATCH 5/8] drm/i915/guc: Disable global reset

2019-01-17 Thread Mika Kuoppala
guc unviable without, for > example, reserving contiguous vma space and pages for it to use. > > Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala We do want ack from Daniele as well. -Mika > --- > drivers/gpu/drm/i915/i915_reset.c | 3 +++ > 1 file changed, 3 insertions(+

Re: [Intel-gfx] [PATCH] drm/i915/icl: Adding few more device IDs for Ice Lake

2019-01-18 Thread Mika Kuoppala
Rodrigo Vivi writes: > We just got aware that there was more IDs available > at spec, so let's add them already. > > Cc: James Ausmus > Cc: José Roberto de Souza > Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kuoppala > --- > include/drm/i915_pciids.h

Re: [Intel-gfx] [PATCH 05/23] drm/i915: Issue engine resets onto idle engines

2019-01-18 Thread Mika Kuoppala
Chris Wilson writes: > Always perform the requested reset, even if we believe the engine is > idle. Presumably there was a reason the caller wanted the reset, and in > the near future we lose the easy tracking for whether the engine is > idle. > > Signed-off-by: Chris Wilson > --- > drivers/gpu

Re: [Intel-gfx] [PATCH 18/23] drm/i915: Keep all partially allocated HWSP on a freelist

2019-01-18 Thread Mika Kuoppala
Chris Wilson writes: > Keep track of partially allocated pages for use in allocating future > timeline HWSP. This is still without migration, so it is possible for timeline from HWSP? > the system to end up with each timeline in its own page, but we ensure > that no new allocation would needles

Re: [Intel-gfx] [PATCH 02/38] drm/i915: Make all GPU resets atomic

2019-01-18 Thread Mika Kuoppala
om inside an atomic context. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_reset.c | 50 +-- > 1 file changed, 27 insertions(+), 23 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_reset.c >

Re: [Intel-gfx] [PATCH 05/38] drm/i915/selftests: Trim struct_mutex duration for set-wedged selftest

2019-01-18 Thread Mika Kuoppala
Chris Wilson writes: > Trim the struct_mutex hold and exclude the call to i915_gem_set_wedged() > as a reminder that it must be callable without struct_mutex held. > > Signed-off-by: Chris Wilson > Cc: Michal Wajdeczko > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > -

Re: [Intel-gfx] [PATCH] drm/i915: Prevent use of global_seqno=0

2019-01-21 Thread Mika Kuoppala
Chris Wilson writes: > We are not allowed to assign rq->global_seqno=0 as it has a special > meaning of "inactive" (not executing on HW). > > Fixes: 6faf5916e6be ("drm/i915: Remove HW semaphores for gen7 inter-engine > synchronisation") > Signed-

Re: [Intel-gfx] [PATCH] drm/i915: Prevent use of global_seqno=0

2019-01-21 Thread Mika Kuoppala
Chris Wilson writes: > We are not allowed to assign rq->global_seqno=0 as it has a special > meaning of "inactive" (not executing on HW). > > Fixes: 6faf5916e6be ("drm/i915: Remove HW semaphores for gen7 inter-engine > synchronisation") > Signed-

Re: [Intel-gfx] [PATCH 03/34] drm/i915: Show all active engines on hangcheck

2019-01-22 Thread Mika Kuoppala
continue; Looks rather harmless tho there is that local_bh_disable. I was pondering if it was worthwhile to determine idle here with more lightweight approach, but as we already use the exact same method on determining hangcheck action, lets stick to this as it is should be then in p

Re: [Intel-gfx] [PATCH 07/34] drm/i915: Refactor out intel_context_init()

2019-01-22 Thread Mika Kuoppala
put(&ctx->ref, i915_gem_context_release); > } > > +static inline void > +intel_context_init(struct intel_context *ce, > +struct i915_gem_context *ctx, > +struct intel_engine_cs *engine) > +{ > + ce->gem_context = ctx; > +} >

Re: [Intel-gfx] [PATCH 08/34] drm/i915: Make all GPU resets atomic

2019-01-23 Thread Mika Kuoppala
device >> level reset (just the register poking) from inside an atomic context. >> >> Signed-off-by: Chris Wilson >> Reviewed-by: Mika Kuoppala >> --- >> drivers/gpu/drm/i915/i915_reset.c | 50 +-- >> 1 file changed, 27 in

Re: [Intel-gfx] [PATCH] drm/i915/icl: do a posting read after irq install

2019-01-23 Thread Mika Kuoppala
sue has only been observed when the >> full interrupt setup is performed. Scary enough that maybe it would have been warranted inside it. But well we know where to escalate if it shows up elsewhere. Acked-by: Mika Kuoppala >> >> Cc: Mika Kuoppala >> Signed-off-by: Dani

Re: [Intel-gfx] [PATCH] drm/i915/icl: do a posting read after irq install

2019-01-23 Thread Mika Kuoppala
the problem. >> >> Note that the posting read has been purposely added outside of >> gen11_master_intr_enable since the issue has only been observed when the >> full interrupt setup is performed. >> >> Cc: Mika Kuoppala >> Signed-off-by: Daniele Ceraolo

Re: [Intel-gfx] [PATCH] drm/i915/icl: Adding few more device IDs for Ice Lake

2019-01-23 Thread Mika Kuoppala
"Souza, Jose" writes: > On Thu, 2019-01-17 at 21:59 -0800, Rodrigo Vivi wrote: >> We just got aware that there was more IDs available >> at spec, so let's add them already. > > Reviewed-by: José Roberto de Souza Pushed. Thank you for patch and review. -Mika > >> >> Cc: James Ausmus >> Cc: Jo

Re: [Intel-gfx] [PATCH 10/34] drm/i915: Remove GPU reset dependence on struct_mutex

2019-01-24 Thread Mika Kuoppala
Chris Wilson writes: > Now that the submission backends are controlled via their own spinlocks, > with a wave of a magic wand we can lift the struct_mutex requirement > around GPU reset. That is we allow the submission frontend (userspace) > to keep on submitting while we process the GPU reset as

Re: [Intel-gfx] [PATCH i-g-t] i915/gem_mmap_gtt: Reset faster and longer to catch fencing errors

2019-01-24 Thread Mika Kuoppala
>error = true; > + exit(0); > + } > + > + gtt[0][x] = patterns[next_pattern]; > + gtt[1][x] = patterns[next_pattern]; > + } > + > + last_pattern = next_pattern; > +

Re: [Intel-gfx] [PATCH 02/33] drm/i915: Measure the required reserved size for request emission

2019-01-25 Thread Mika Kuoppala
; > + frame->rq.ring = &frame->ring; > + frame->rq.timeline = &frame->timeline; > + > + dw = engine->emit_breadcrumb(&frame->rq, frame->cs) - frame->cs; > + GEM_BUG_ON(dw != engine->emit_breadcrumb_sz); Peace of mind provided =)

Re: [Intel-gfx] [PATCH 03/33] drm/i915: Remove manual breadcumb counting

2019-01-25 Thread Mika Kuoppala
e->emit_breadcrumb_dw * sizeof(u32); *_sz got me startled, raising doubts about the previous patch. But it was misnamed all the way. Obviously merge the previous patch before this one :) Reviewed-by: Mika Kuoppala > > /* >* Record the position of the start of the request

Re: [Intel-gfx] [PATCH 04/33] drm/i915: Compute the HWS offsets explicitly

2019-01-25 Thread Mika Kuoppala
T) > -#define I915_GEM_HWS_SCRATCH_INDEX 0x40 > -#define I915_GEM_HWS_SCRATCH_ADDR (I915_GEM_HWS_SCRATCH_INDEX << > MI_STORE_DWORD_INDEX_SHIFT) I don't find usage nor reasoning for MI_STORE_DWORD_INDEX_SHIFT in the intel_gpu_commands.h. So it should go too. Review

Re: [Intel-gfx] [PATCH 07/33] drm/i915/selftests: Apply a subtest filter

2019-01-25 Thread Mika Kuoppala
Chris Wilson writes: > In bringup on simulated HW even rudimentary tests are slow, and so many > may fail that we want to be able to filter out the noise to focus on the > specific problem. Even just the tests groups provided for igt is not > specific enough, and we would like to isolate one part

Re: [Intel-gfx] [PATCH 10/33] drm/i915: Remove GPU reset dependence on struct_mutex

2019-01-25 Thread Mika Kuoppala
wait_update_request(&wait, rq)) > break; > > - if (flags & I915_WAIT_LOCKED && > - __i915_wait_request_check_and_reset(rq)) > - continue; > - > if (signal_pending_state(

Re: [Intel-gfx] [PATCH 01/28] drm/i915: Wait for a moment before forcibly resetting the device

2019-01-28 Thread Mika Kuoppala
e better between a stuck > engine and a healthy one, and so avoid prematurely forcing the reset and > any extra complications that may entail. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_debugfs.c | 3 ++- > 1 file changed, 2 insertion

Re: [Intel-gfx] [PATCH i-g-t 1/8] lib: Skip unused fork helpers

2019-01-30 Thread Mika Kuoppala
> > + if (!proc->running) /* never even started */ > + return; > + The comment above mentions that it is error to call this on a helper process which hasn't been spawned yet. So as we relax the requirements, remove that comment. With that, Reviewed-by: Mika Kuoppa

Re: [Intel-gfx] [PATCH i-g-t 2/8] i915/gem_eio: Check for allow-hang prior to issuing a reset

2019-01-30 Thread Mika Kuoppala
Chris Wilson writes: > Check that we are allowed to hang/reset the GPU before we actually do so > for the first time. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > tests/i915/gem_eio.c | 8 > 1 file changed, 4 insertions(+), 4 deletion

Re: [Intel-gfx] [PATCH i-g-t 8/8] intel-ci: Drop gem_exec_nop from BAT

2019-01-30 Thread Mika Kuoppala
Signed-off-by: Chris Wilson > Cc: Joonas Lahtinen > Cc: Mika Kuoppala > Cc: Petri Latvala > Cc: Tomi Sarvela I was going to say that I have already stamped this. But re-checking the previous submission, I haven't. Perhaps I forgot to press send. Reviewed-by: Mika Kuoppala

Re: [Intel-gfx] [PATCH i-g-t] i915/gem_eio: 64 batches may be too many for some devices!

2019-01-30 Thread Mika Kuoppala
Chris Wilson writes: > Actually measure how many batches we can fit into a ring before > blocking, or else we may end up hanging the device earlier than > expected! > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > --- > tests/i915/gem_eio.c | 19 +++--

Re: [Intel-gfx] [PATCH i-g-t] i915/gem_eio: 64 batches may be too many for some devices!

2019-01-30 Thread Mika Kuoppala
f-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > tests/i915/gem_eio.c | 23 +-- > 1 file changed, 17 insertions(+), 6 deletions(-) > > diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c > index 09059c311..61054a07e 1006

Re: [Intel-gfx] [PATCH] drm/i915: Reboot CI if forcewake fails

2019-05-08 Thread Mika Kuoppala
ls may be genuine but due to > the HW being dead and not the actual test!) so reboot the machine (CI > checks for a kernel taint in between each test and reboots if the > machine is tainted). > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > Cc: Tvrtko Ursulin Sound

Re: [Intel-gfx] [PATCH 01/40] drm/i915/hangcheck: Replace hangcheck.seqno with RING_HEAD

2019-05-08 Thread Mika Kuoppala
ng RING_HEAD. > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_engine.h | 15 - > drivers/gpu/drm/i915/gt/intel_engine_cs.c| 5 ++- > drivers/gpu/drm/i915/gt/intel_engine_types.h | 3 +- > drivers/gpu/drm/i915/gt/intel_

Re: [Intel-gfx] [PATCH 01/40] drm/i915/hangcheck: Replace hangcheck.seqno with RING_HEAD

2019-05-08 Thread Mika Kuoppala
Chris Wilson writes: > Quoting Mika Kuoppala (2019-05-08 13:30:46) >> Chris Wilson writes: >> >> > After realising we need to sample RING_START to detect context switches >> > from preemption events that do not allow for the seqno to advance, we >> >

Re: [Intel-gfx] [PATCH 29/40] drm/i915: Move GEM object waiting to its own file

2019-05-10 Thread Mika Kuoppala
lookup(file, args->bo_handle); > - if (!obj) > - return -ENOENT; > - > - start = ktime_get(); > - > - ret = i915_gem_object_wait(obj, > - I915_WAIT_INTERRUPTIBLE | > -I915_WAIT_PRIORI

Re: [Intel-gfx] [PATCH 30/40] drm/i915: Move GEM object busy checking to its own file

2019-05-10 Thread Mika Kuoppala
Chris Wilson writes: > Continuing the decluttering of i915_gem.c by moving the object busy > checking into its own file. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala ___ Intel-gfx mailing list Intel-gfx@lists.freedeskt

Re: [Intel-gfx] [PATCH 31/40] drm/i915: Move GEM client throttling to its own file

2019-05-10 Thread Mika Kuoppala
Chris Wilson writes: > Continuing the decluttering of i915_gem.c by moving the client self > throttling into its own file. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala ___ Intel-gfx mailing list Intel-gfx@lists.freedeskt

Re: [Intel-gfx] [PATCH 34/40] drm/i915: Rename intel_context.active to .inflight

2019-05-10 Thread Mika Kuoppala
e; > - struct intel_engine_cs *active; > + struct intel_engine_cs *inflight; Active_on came to my mind when first reading this. As discussed in irc 'active' is already quite overloaded so inflight seems fitting. Reviewed-by: Mika Kuoppala > > struct list_head sig

  1   2   3   4   5   6   7   8   9   10   >