[Intel-gfx] [PATCH i-g-t 2/2] tests/i915/perf: Exercise barrier race

2023-01-31 Thread Janusz Krzysztofik
/-/issues/6333 Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/perf.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/tests/i915/perf.c b/tests/i915/perf.c index e33cacc443..11a3ec21ab 100644 --- a/tests/i915/perf.c

Re: [Intel-gfx] [PATCH i-g-t 1/2] i915/perf: Stress opening of new perf streams against existing contexts

2023-01-31 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Tuesday, 31 January 2023 12:59:10 CET Kamil Konieczny wrote: ... > > @@ -5259,6 +5324,15 @@ igt_main > > igt_subtest("whitelisted-registers-userspace-config") > > test_whitelisted_registers_userspace_config(); > > > > Please add description to ne

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 0/2] tests/i915/perf: Add stress / race exercises

2023-01-31 Thread Janusz Krzysztofik
On Tuesday, 31 January 2023 17:19:48 CET Dixit, Ashutosh wrote: > On Tue, 31 Jan 2023 01:17:29 -0800, Janusz Krzysztofik wrote: > > > > Hi Janusz, > > > Users reported oopses on list corruptions when using i915 perf with a > > number of concurrently running graphics

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 0/2] tests/i915/perf: Add stress / race exercises

2023-01-31 Thread Janusz Krzysztofik
On Tuesday, 31 January 2023 17:55:54 CET Dixit, Ashutosh wrote: > On Tue, 31 Jan 2023 08:19:48 -0800, Dixit, Ashutosh wrote: > > > > On Tue, 31 Jan 2023 01:17:29 -0800, Janusz Krzysztofik wrote: > > > > > > > Hi Janusz, > > > > > Users reported o

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 0/2] tests/i915/perf: Add stress / race exercises

2023-02-01 Thread Janusz Krzysztofik
Hi Ashutosh, On Tuesday, 31 January 2023 19:36:50 CET Dixit, Ashutosh wrote: > On Tue, 31 Jan 2023 09:36:30 -0800, Janusz Krzysztofik wrote: > > > > Since Chris' subtest didn't help in triggering the list corruption, I've > > developed a new subtest that can

Re: [Intel-gfx] [PATCH i-g-t 2/2] tests/i915/perf: Exercise barrier race

2023-02-01 Thread Janusz Krzysztofik
Hi Kamil, On Wednesday, 1 February 2023 19:21:57 CET Kamil Konieczny wrote: > Hi Janusz, > > please send patches to igt ML and add other addresses to cc: > I have one nit, see below. > > On 2023-01-31 at 10:17:31 +0100, Janusz Krzysztofik wrote: > > Add a new subte

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 0/2] tests/i915/perf: Add stress / race exercises

2023-02-03 Thread Janusz Krzysztofik
Hi Umesh, Thanks for taking a look. On Friday, 3 February 2023 20:21:38 CET Umesh Nerlige Ramappa wrote: > On Tue, Jan 31, 2023 at 10:17:29AM +0100, Janusz Krzysztofik wrote: > >Users reported oopses on list corruptions when using i915 perf with a > >number of concurrently r

[Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-09 Thread Janusz Krzysztofik
reported bug, but triggering other bugs which I can't see any fixes for queued yet, - move the other new subtest out of tests/i915/perf.c (Ashutosh). Janusz Krzysztofik (1): tests/gem_ctx_exec: Exercise barrier race tests/i915/gem_ctx_exec.c

[Intel-gfx] [PATCH i-g-t v2 1/1] tests/gem_ctx_exec: Exercise barrier race

2023-02-09 Thread Janusz Krzysztofik
/i915/gem_ctx_exec.c. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6333 Signed-off-by: Janusz Krzysztofik --- tests/i915/gem_ctx_exec.c | 123 ++ tests/meson.build | 9 ++- 2 files changed, 131 insertions(+), 1 deletion(-) diff --git a/tests

[Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests

2023-02-09 Thread Janusz Krzysztofik
END Fixes: f7aff600ab16 ("tests/i915/i915_suspend: Disable d3cold_allowed for basic-s2idle-without-i915") Signed-off-by: Janusz Krzysztofik Cc: Riana Tauro --- lib/drmtest.c | 2 +- lib/igt_device_scan.c | 4 tests/i915/i915_suspend.c | 10 +- 3 fi

Re: [Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-09 Thread Janusz Krzysztofik
Hi, On Thursday, 9 February 2023 12:50:38 CET Janusz Krzysztofik wrote: > Users reported oopses on list corruptions when using i915 perf with a > number of concurrently running graphics applications. That indicates we > are currently missing some important tests for such scenarios. Cov

Re: [Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-10 Thread Janusz Krzysztofik
On Friday, 10 February 2023 12:21:58 CET Kamil Konieczny wrote: > Hi, > > On 2023-02-10 at 08:53:12 +0100, Janusz Krzysztofik wrote: > > Hi, > > > > On Thursday, 9 February 2023 12:50:38 CET Janusz Krzysztofik wrote: > > > Users reported oopses on list cor

Re: [Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests

2023-02-10 Thread Janusz Krzysztofik
On Friday, 10 February 2023 15:02:59 CET Kamil Konieczny wrote: > Hi Janusz, > > I have one nit, see below. > > On 2023-02-09 at 20:32:31 +0100, Janusz Krzysztofik wrote: > > If any of *-without-i915 subtests fails or skips for any reason, it may > > leave the i915 mo

Re: [Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests

2023-02-10 Thread Janusz Krzysztofik
On Thursday, 9 February 2023 20:32:31 CET Janusz Krzysztofik wrote: > If any of *-without-i915 subtests fails or skips for any reason, it may > leave the i915 module unloaded while keeping our device list populated > with initially collected data. In a follow up igt_fixture section we t

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v2 1/1] tests/gem_ctx_exec: Exercise barrier race

2023-02-13 Thread Janusz Krzysztofik
Hi Umesh, On Friday, 10 February 2023 18:24:53 CET Umesh Nerlige Ramappa wrote: > On Fri, Feb 10, 2023 at 09:20:25AM -0800, Umesh Nerlige Ramappa wrote: > >On Thu, Feb 09, 2023 at 12:50:39PM +0100, Janusz Krzysztofik wrote: > >>Users reported oopses on list corruptions when usin

[Intel-gfx] [PATCH i-g-t v3 0/1] tests/i915/perf: Add stress / race exercises

2023-02-13 Thread Janusz Krzysztofik
r new subtest out of tests/i915/perf.c (Ashutosh). Janusz Krzysztofik (1): tests: Exercise remote request vs barrier handling race tests/i915/gem_barrier_race.c | 159 ++ tests/meson.build | 8 ++ 2 files changed, 167 insertions(+) create mode 1

[Intel-gfx] [PATCH i-g-t v3 1/1] tests: Exercise remote request vs barrier handling race

2023-02-13 Thread Janusz Krzysztofik
tests/i915/gem_ctx_exec.c. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6333 Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Kamil Konieczny Cc: Ashutosh Dixit Cc: Umesh Nerlige Ramappa --- tests/i915/gem_barrier_race.c | 159 ++ tests/meso

Re: [Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-13 Thread Janusz Krzysztofik
On Friday, 10 February 2023 12:56:12 CET Janusz Krzysztofik wrote: > On Friday, 10 February 2023 12:21:58 CET Kamil Konieczny wrote: > > Hi, > > > > On 2023-02-10 at 08:53:12 +0100, Janusz Krzysztofik wrote: > > > Hi, > > > > > > On Thursday, 9 Feb

Re: [Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 10:51:39 CET Zbigniew Kempczyński wrote: > On Fri, Feb 10, 2023 at 10:33:21PM +0100, Janusz Krzysztofik wrote: > > On Thursday, 9 February 2023 20:32:31 CET Janusz Krzysztofik wrote: > > > If any of *-without-i915 subtests fails or skips for

[Intel-gfx] [PATCH 0/1] drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
est to CI for testing it with a new subtest igt@gem_barrier_race@remote-request, developed for that case, not yet in upstream IGT. I've selected trybot submission of the test, with the test added to BAT testlist, to get results from the widest possible HW range. Janusz Krzysztofik (1): drm/

[Intel-gfx] [PATCH 1/1] drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
s/6333 Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/i915_active.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index 7412abf1

[Intel-gfx] [PATCH i-g-t v2] tests/i915_suspend: Refresh device list after *-without-i915 subtests

2023-02-13 Thread Janusz Krzysztofik
./csu/libc-start.c:128 __libc_start_main@@GLIBC_2.34() (i915_suspend:9050) igt_core-INFO: #6 [_start+0x2a] END Fixes: f7aff600ab16 ("tests/i915/i915_suspend: Disable d3cold_allowed for basic-s2idle-without-i915") Signed-off-by: Janusz Krzysztofik Cc: Riana Tauro --- lib/d

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for tests/i915/perf: Add stress / race exercises (rev3)

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 12:19:10 CET Patchwork wrote: > == Series Details == > > Series: tests/i915/perf: Add stress / race exercises (rev3) > URL : https://patchwork.freedesktop.org/series/113522/ > State : failure > > == Summary == > > CI Bug Log - changes from IGT_7160_full -> IGTPW_848

Re: [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 14:47:42 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/active: Fix misuse of non-idle barriers as fence trackers > URL : https://patchwork.freedesktop.org/series/113950/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_1273

[Intel-gfx] [PATCH 0/1] drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
ce trackers", I'm submitting this fix with a request to CI for testing it with trybot submission of the new igt@gem_barrier_race@remote-request subtest, not yet in upstream IGT, to get comparable results from the widest possible HW range. Janusz Krzysztofik (1): drm/i915/active: Serialize ac

[Intel-gfx] [PATCH 1/1] drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
rrier from other kernel requests") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 6 +++ .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 10 - drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 ++ drivers/

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 19:28:50 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/active: Serialize access to barrier tasks lists > URL : https://patchwork.freedesktop.org/series/113962/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_12732 -> Patch

[Intel-gfx] [PATCH 0/2] Resolve barrier tasks list related issues

2023-02-13 Thread Janusz Krzysztofik
rriers from an engine's barrier tasks list. Note: Again, I'm submitting this series with a request to CI for testing it with trybot submission of the new igt@gem_barrier_race@remote-request subtest, not yet in upstream IGT, to get comparable results from the widest possible HW range. Janus

[Intel-gfx] [PATCH 1/2] drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
s/6333 Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/i915_active.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index 7412abf1

[Intel-gfx] [PATCH 2/2] drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
rrier from other kernel requests") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 6 +++ .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 10 - drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 ++ drivers/

Re: [Intel-gfx] ✓ Fi.CI.BAT: success for Resolve barrier tasks list related issues

2023-02-14 Thread Janusz Krzysztofik
On Tuesday, 14 February 2023 01:11:42 CET Patchwork wrote: > == Series Details == > > Series: Resolve barrier tasks list related issues > URL : https://patchwork.freedesktop.org/series/113975/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_12734 -> Patchwork_113975v1

Re: [Intel-gfx] ✓ Fi.CI.IGT: success for Resolve barrier tasks list related issues

2023-02-14 Thread Janusz Krzysztofik
On Tuesday, 14 February 2023 04:38:12 CET Patchwork wrote: > == Series Details == > > Series: Resolve barrier tasks list related issues > URL : https://patchwork.freedesktop.org/series/113975/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_12734_full -> Patchwork_1139

Re: [Intel-gfx] [PATCH i-g-t v3 1/1] tests: Exercise remote request vs barrier handling race

2023-02-14 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Tuesday, 14 February 2023 22:20:10 CET Kamil Konieczny wrote: > Hi Janusz, > > On 2023-02-13 at 10:31:32 +0100, Janusz Krzysztofik wrote: > > Users reported oopses on list corruptions when using i915 perf with a > > number of concurre

[Intel-gfx] [PATCH i-g-t v4] tests: Exercise remote request vs barrier handling race

2023-02-15 Thread Janusz Krzysztofik
op.org/drm/intel/-/issues/6333 Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Kamil Konieczny Cc: Ashutosh Dixit Cc: Umesh Nerlige Ramappa --- tests/i915/gem_barrier_race.c | 153 ++ tests/meson.build | 8 ++ 2 files changed, 161 insertio

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for tests: Exercise remote request vs barrier handling race

2023-02-16 Thread Janusz Krzysztofik
On Thursday, 16 February 2023 01:30:47 CET Patchwork wrote: > == Series Details == > > Series: tests: Exercise remote request vs barrier handling race > URL : https://patchwork.freedesktop.org/series/114045/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_12741_full ->

[Intel-gfx] [PATCH i-g-t] tests/gem_barrier_race: Extend support over compute engines

2023-02-20 Thread Janusz Krzysztofik
This test can work not only on render engines, as its current code suggests, but also on compute class engines. Add them to the set of engine classes supported by the test, in case a future platform has only those and no RCS available. Suggested-by: Chris Wilson Signed-off-by: Janusz

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_barrier_race: Extend support over compute engines

2023-02-21 Thread Janusz Krzysztofik
On Monday, 20 February 2023 21:49:46 CET Kamil Konieczny wrote: > On 2023-02-20 at 14:24:45 +0100, Janusz Krzysztofik wrote: > > This test can work not only on render engines, as its current code > > suggests, but also on compute class engines. Add them to the set of > > eng

Re: [Intel-gfx] [PATCH i-g-t v2] tests/i915_suspend: Refresh device list after *-without-i915 subtests

2023-02-24 Thread Janusz Krzysztofik
On Friday, 24 February 2023 09:38:54 CET Kamil Konieczny wrote: > On 2023-02-13 at 15:34:45 +0100, Janusz Krzysztofik wrote: > > If any of *-without-i915 subtests fails or skips for any reason, it may > > leave the i915 module unloaded while keeping our device list populated >

[PATCH] drm/i915/selftests: Fix dependency of some timeouts on HZ

2024-02-22 Thread Janusz Krzysztofik
and custom kernel configs. Rename the symbol to clearly indicate intended units and convert it to jiffies before use. Fixes: 3a4bfa091c46 ("drm/i915/selftest: Fix workarounds selftest for GuC submission") Signed-off-by: Janusz Krzysztofik Cc: Rahul Kumar Singh Cc: John Harrison C

[PATCH i-g-t v2 0/2] lib/kunit: Execute test cases synchronously

2024-02-27 Thread Janusz Krzysztofik
changes, - rebase the former patch 1 on top of the new patch 1, update its commit message and description and provide it as patch 2. Janusz Krzysztofik (2): lib/kunit: Execute test cases synchronously lib/kunit: Minimize code duplication lib/igt_kmod.c | 172

[PATCH i-g-t v2 2/2] lib/kunit: Minimize code duplication

2024-02-27 Thread Janusz Krzysztofik
KTAP report, no matter how many test suites and test cases it covers. Then, it's a good candidate for reuse in other scenarios when a single KTAP report is handled, e.g., when we collect a list of test cases from a single test suite or test module. Go for it. Signed-off-by: Janusz Krzysz

[PATCH i-g-t v2 1/2] lib/kunit: Execute test cases synchronously

2024-02-27 Thread Janusz Krzysztofik
- subtests if unloading the test module fails, - update commit description with a more detailed justification of why we need these changes. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab --- lib/igt_kmod.c | 157 - 1 file changed

[PATCH] drm/i915/selftest_hangcheck: Check sanity with more patience

2024-02-28 Thread Janusz Krzysztofik
h the i915 module also when loaded in selftest mode, relax our expectations on time consumed by the sanity check request before it completes. Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH v6 0/3] drm/i915: Fix VMA UAF on destroy against deactivate race

2024-02-29 Thread Janusz Krzysztofik
split out removal of former insufficient workarounds and move them to separate patches (Nirmoy). - clean up commit message and description a bit. v3: Identify root cause more precisely, and a commit to blame, - identify and drop former workarounds, - update commit message and descriptio

[PATCH v6 1/3] drm/i915/vma: Fix UAF on destroy against retire race

2024-02-29 Thread Janusz Krzysztofik
lame, - identify and drop former workarounds, - update commit message and description. v2: Get the wakeref before VM mutex to avoid circular locking dependency, - drop questionable Fixes: tag. Fixes: d93939730347 ("drm/i915: Remove the vma refcount") Closes: https://gitlab.freed

[PATCH v6 2/3] drm/i915: Remove extra multi-gt pm-references

2024-02-29 Thread Janusz Krzysztofik
o drop the no longer used .wakeref_gt0 field from struct i915_execbuffer. v2: Avoid the word "revert" in commit message (Rodrigo), - update commit description reusing relevant chunks dropped from the description of the proper fix (Rodrigo). Signed-off-by: Janusz Krzysztofik Cc

[PATCH v6 3/3] Revert "drm/i915: Wait for active retire before i915_active_fini()"

2024-02-29 Thread Janusz Krzysztofik
This reverts commit 7a2280e8dcd2f1f436db9631287c0b21cf6a92b0, obsoleted by "drm/i915/vma: Fix UAF on destroy against retire race". Signed-off-by: Janusz Krzysztofik Cc: Nirmoy Das --- drivers/gpu/drm/i915/i915_vma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gp

Re: ✗ Fi.CI.IGT: failure for drm/i915/selftest_hangcheck: Check sanity with more patience

2024-03-01 Thread Janusz Krzysztofik
On Thursday, 29 February 2024 23:16:22 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/selftest_hangcheck: Check sanity with more patience > URL : https://patchwork.freedesktop.org/series/130512/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_14362_fu

Re: ✗ Fi.CI.IGT: failure for drm/i915/selftests: Fix dependency of some timeouts on HZ

2024-03-01 Thread Janusz Krzysztofik
On Friday, 23 February 2024 05:10:10 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/selftests: Fix dependency of some timeouts on HZ > URL : https://patchwork.freedesktop.org/series/130249/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_14316_full ->

[PATCH v7 0/3] drm/i915: Fix VMA UAF on destroy against deactivate race

2024-03-05 Thread Janusz Krzysztofik
insufficient workarounds and move them to separate patches (Nirmoy). - clean up commit message and description a bit. v3: Identify root cause more precisely, and a commit to blame, - identify and drop former workarounds, - update commit message and description. v2: Get the wakeref before VM m

[PATCH v7 2/3] drm/i915: Remove extra multi-gt pm-references

2024-03-05 Thread Janusz Krzysztofik
o drop the no longer used .wakeref_gt0 field from struct i915_execbuffer. v2: Avoid the word "revert" in commit message (Rodrigo), - update commit description reusing relevant chunks dropped from the description of the proper fix (Rodrigo). Signed-off-by: Janusz Krzysztofik Cc

[PATCH v7 1/3] drm/i915/vma: Fix UAF on destroy against retire race

2024-03-05 Thread Janusz Krzysztofik
former workarounds, - update commit message and description. v2: Get the wakeref before VM mutex to avoid circular locking dependency, - drop questionable Fixes: tag. Fixes: d93939730347 ("drm/i915: Remove the vma refcount") Closes: https://gitlab.freedesktop.org/drm/intel/issues/8875 Sig

[PATCH v7 3/3] Revert "drm/i915: Wait for active retire before i915_active_fini()"

2024-03-05 Thread Janusz Krzysztofik
This reverts commit 7a2280e8dcd2f1f436db9631287c0b21cf6a92b0, obsoleted by "drm/i915/vma: Fix UAF on destroy against retire race". Signed-off-by: Janusz Krzysztofik Cc: Nirmoy Das --- drivers/gpu/drm/i915/i915_vma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gp

[PATCH] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-11 Thread Janusz Krzysztofik
_pm_get+0x19/0xa0 [i915] <4> [197.789070] hwm_energy+0x55/0x100 [i915] <4> [197.793183] hwm_read+0x9a/0x310 [i915] <4> [197.797124] hwmon_attr_show+0x36/0x120 <4> [197.800946] dev_attr_show+0x15/0x60 <4> [197.804509] sysfs_kf_seq_show+0xb5/0x100 However, the lock

Re: [PATCH] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-11 Thread Janusz Krzysztofik
On Monday, 11 March 2024 18:35:43 CET Guenter Roeck wrote: > On 3/11/24 09:58, Rodrigo Vivi wrote: > > On Mon, Mar 11, 2024 at 09:06:46AM +0100, Janusz Krzysztofik wrote: > >> In i915 hwmon sysfs getter path we now take a hwmon_lock, then acquire an > >> rpm wak

[PATCH v2] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-11 Thread Janusz Krzysztofik
ef before the lock and hold it as long as the lock is also held. Follow that pattern across the whole source file where similar lock inversion can happen. v2: Keep hardware read under the lock so the whole operation of updating energy from hardware is still atomic (Guenter), - instead

Re: ✗ Fi.CI.IGT: failure for drm/i915/hwmon: Fix locking inversion in sysfs getter (rev2)

2024-03-12 Thread Janusz Krzysztofik
Hi Bug Filing, On Tuesday, 12 March 2024 11:02:19 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/hwmon: Fix locking inversion in sysfs getter (rev2) > URL : https://patchwork.freedesktop.org/series/130966/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_

Re: [PATCH v2] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-12 Thread Janusz Krzysztofik
Hi Ashutosh, On Tuesday, 12 March 2024 17:25:14 CET Dixit, Ashutosh wrote: > On Mon, 11 Mar 2024 13:34:58 -0700, Janusz Krzysztofik wrote: > > > > In i915 hwmon sysfs getter path we now take a hwmon_lock, then acquire an > > rpm wakeref. That results in lock inversion: &g

Re: [PATCH v2] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-12 Thread Janusz Krzysztofik
On Tuesday, 12 March 2024 18:09:37 CET Andi Shyti wrote: > Hi Janusz, > > On Mon, Mar 11, 2024 at 09:34:58PM +0100, Janusz Krzysztofik wrote: > > In i915 hwmon sysfs getter path we now take a hwmon_lock, then acquire an > > rpm wakeref. That results in lock inversion: >

Re: [PATCH i-g-t v2 1/2] lib/kunit: Execute test cases synchronously

2024-03-14 Thread Janusz Krzysztofik
On Thursday, 14 March 2024 11:29:38 CET Kamil Konieczny wrote: > Hi Janusz, > On 2024-02-27 at 16:10:41 +0100, Janusz Krzysztofik wrote: > > Up to now we were loading a KUnit test module in test execution mode only > > once per subtest, in background, and then, in parallel

[PATCH i-g-t v3 0/5] lib/kunit: Execute test cases synchronously

2024-03-18 Thread Janusz Krzysztofik
module, and errors they return are handled, - update commit description with a more detailed justification of why we need these changes, - rebase the former patch 1 on top of the new patch 1, update its commit message and description and provide it as patch 2. Janusz Krzysztofik (5

[PATCH i-g-t v3 1/5] lib/kunit: Store igt_ktap_results pointer in a central location

2024-03-18 Thread Janusz Krzysztofik
-by: Janusz Krzysztofik --- lib/igt_kmod.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index b4b8848983..ca20012a97 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -1207,10 +1207,10 @@ static void

[PATCH i-g-t v3 3/5] lib/kunit: Time out promptly on missing KTAP report

2024-03-18 Thread Janusz Krzysztofik
t and parse that report. Suggested-by: Kamil Konieczny Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 8a6824ea7e..f0e4d5ec76 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -12

[PATCH i-g-t v3 4/5] lib/kunit: Execute test cases synchronously

2024-03-18 Thread Janusz Krzysztofik
tailed justification of why we need these changes. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab Cc: Jonathan Cavitt Cc: Kamil Konieczny --- lib/igt_kmod.c | 156 + 1 file changed, 54 insertions(+), 102 deletions(-) diff --gi

[PATCH i-g-t v3 2/5] lib/kunit: Let igt_ktap_free() take care of pointer reset

2024-03-18 Thread Janusz Krzysztofik
that location as an argument and reset the pointer after freeing the structure. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +--- lib/igt_ktap.c | 5 +++-- lib/igt_ktap.h | 2 +- lib/tests/igt_ktap_parser.c | 24

[PATCH i-g-t v3 5/5] lib/kunit: Minimize code duplication

2024-03-18 Thread Janusz Krzysztofik
es to struct igt_ktap_results pointer handling. v2: Rebased on invalid test suite name workaround. Signed-off-by: Janusz Krzysztofik Cc: Jonathan Cavitt --- lib/igt_kmod.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index c495d

[PATCH] drm/i915/gt: Reset queue_priority_hint on parking

2024-03-18 Thread Janusz Krzysztofik
e/0x130 <4>[ 167.305997] ret_from_fork+0x2c/0x50 <4>[ 167.306001] ret_from_fork_asm+0x1b/0x30 <4>[ 167.306004] It is necessary for the queue_priority_hint to be lower than the next request submission upon waking up, as we rely on the hint to decide when to kick the

Re: [PATCH] drm/i915/gt: Reset queue_priority_hint on parking

2024-03-20 Thread Janusz Krzysztofik
> > Cc: Mika Kuoppala > > Signed-off-by: Janusz Krzysztofik > > Cc: Chris Wilson > > Cc: # v5.4+ > > this tag list is a bit confusing. Let's keep all Cc's together > and, besides, Cc'eing the author looks a bit redundant. You're right, please

[PATCH] drm/i915/hwmon: Fix potential UAF on driver unbind

2024-03-22 Thread Janusz Krzysztofik
mon when unregistering i915, and teach hwmon sysfs accessors to start with checking validity of those pointers and fail immediately if no longer valid. Suggested-by: Ashutosh Dixit Fixes: b3b088e28183 ("drm/i915/hwmon: Add HWMON infrastructure") Closes: https://gitlab.freedesktop.org

[PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-27 Thread Janusz Krzysztofik
debugfs support is found not configured then fall back to legacy processing path. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 143 - 1 file changed, 105 insertions(+), 38 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-27 Thread Janusz Krzysztofik
On Wednesday, 27 March 2024 17:03:01 CET Lucas De Marchi wrote: > On Wed, Mar 27, 2024 at 12:22:54PM +0100, Janusz Krzysztofik wrote: > >KUnit can provide KTAP reports from test modules via debugfs files, one > >per test suite. Using that source of test results instead of extracti

Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-27 Thread Janusz Krzysztofik
On Wednesday, 27 March 2024 18:27:50 CET Kamil Konieczny wrote: > Hi Janusz, > On 2024-03-27 at 12:22:54 +0100, Janusz Krzysztofik wrote: > > KUnit can provide KTAP reports from test modules via debugfs files, one > > per test suite. Using that source of test results ins

Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-28 Thread Janusz Krzysztofik
On Wednesday, 27 March 2024 22:54:53 CET Janusz Krzysztofik wrote: > On Wednesday, 27 March 2024 17:03:01 CET Lucas De Marchi wrote: > > On Wed, Mar 27, 2024 at 12:22:54PM +0100, Janusz Krzysztofik wrote: > > >KUnit can provide KTAP reports from test modules via debugfs files,

[PATCH] drm/i915/selftest_hangcheck: Fix potential UAF after HW fence revoke

2024-05-29 Thread Janusz Krzysztofik
fter reset it triggers for actual completion of a request that it forced to claim using a hardware fence before it releases allocated resources. Fix it. Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

Re: [PATCH] drm/i915/selftest_hangcheck: Fix potential UAF after HW fence revoke

2024-05-29 Thread Janusz Krzysztofik
On Wednesday, 29 May 2024 13:37:23 GMT+2 Janusz Krzysztofik wrote: > CI is sporadically reporting the following issue triggered by > igt@i915_selftest@live@hangcheck test case: > > <6> [414.049203] i915: Running > intel_hangcheck_live_selftests/igt_reset_evict_fence > ...

[PATCH] drm/i915/gt: Fix potential UAF by revoke of fence registers

2024-06-03 Thread Janusz Krzysztofik
s on one side and sequential execution of signal callbacks invoked on completion of a request that was using them on the other, still processed in parallel to revocation of those fence registers. Fix it by waiting for idleness of vma->fence->active in i915_vma_revoke_fence(). Fixes: 0d86ee3509

Re: ✗ Fi.CI.IGT: failure for drm/i915/gt: Fix potential UAF by revoke of fence registers

2024-06-04 Thread Janusz Krzysztofik
On Tuesday, 4 June 2024 12:01:43 GMT+2 Patchwork wrote: > == Series Details == > > Series: drm/i915/gt: Fix potential UAF by revoke of fence registers > URL : https://patchwork.freedesktop.org/series/134411/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_14870_full ->

Re: [PATCH] drm/i915/gt: Fix potential UAF by revoke of fence registers

2024-06-04 Thread Janusz Krzysztofik
Hi Andi, Thanks for review. On Tuesday, 4 June 2024 02:48:43 GMT+2 Andi Shyti wrote: > Hi Janusz, > > On Mon, Jun 03, 2024 at 09:54:45PM +0200, Janusz Krzysztofik wrote: > > CI has been sporadically reporting the following issue triggered by > > igt@i915_selftest@live@h

[PATCH i-g-t 0/5] tests/gem_ctx_exec: Fix failing preempt timeout updates

2024-07-15 Thread Janusz Krzysztofik
ot on rcs0 within the 1 second limit. Fix the issue. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Janusz Krzysztofik (5): tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update lib: Add more debug messages to error paths lib/gem_engine_topology: Fix premature

[PATCH i-g-t 1/5] tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update

2024-07-15 Thread Janusz Krzysztofik
ntext preemption. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_ctx_exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/intel/gem_ctx_exec.c b/tests/intel/gem_ctx_exec.c index d6aa8

[PATCH i-g-t 2/5] lib: Add more debug messages to error paths

2024-07-15 Thread Janusz Krzysztofik
On an attempt to resolve the issue of mysteriously failing updates of sysfs entries representing engine preempt timeout values, add debug messages to error paths of involved library functions. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik

[PATCH i-g-t 3/5] lib/gem_engine_topology: Fix premature break from primary find loop

2024-07-15 Thread Janusz Krzysztofik
When looking for a primary counterpart of a render device, we try to open each primary minor. When one fails, we should continue rather then break, since contiguity of minor numbers assigned to devices is not guaranteed. Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 2

[PATCH i-g-t 4/5] lib/gem_engine_topology: Simplify the method of opening a primary

2024-07-15 Thread Janusz Krzysztofik
relative. While that construct gives the expected result anyway, it makes the picture unclear. Use open() and drop unused code. Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/i915

[PATCH i-g-t 5/5] lib/gem_engine_topology: Fix broken compare of device links

2024-07-15 Thread Janusz Krzysztofik
reedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c index d14190f253..777fbca938 100644 --- a/lib/i915/g

[PATCH i-g-t v2 0/5] tests/gem_ctx_exec: Fix failing preempt timeout updates

2024-07-15 Thread Janusz Krzysztofik
ot on rcs0 within the 1 second limit. Fix the issue. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 v2: Fix missing closing parenthesis. Janusz Krzysztofik (5): tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update lib: Add more debug messages to error paths

[PATCH i-g-t v2 1/5] tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update

2024-07-15 Thread Janusz Krzysztofik
ntext preemption. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_ctx_exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/intel/gem_ctx_exec.c b/tests/intel/gem_ctx_exec.c index d6aa8

[PATCH i-g-t v2 2/5] lib: Add more debug messages to error paths

2024-07-15 Thread Janusz Krzysztofik
On an attempt to resolve the issue of mysteriously failing updates of sysfs entries representing engine preempt timeout values, add debug messages to error paths of involved library functions. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik

[PATCH i-g-t v2 4/5] lib/gem_engine_topology: Simplify the method of opening a primary

2024-07-15 Thread Janusz Krzysztofik
relative. While that construct gives the expected result anyway, it makes the picture unclear. Use open() and drop unused code. Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/i915

[PATCH i-g-t v2 5/5] lib/gem_engine_topology: Fix broken compare of device links

2024-07-15 Thread Janusz Krzysztofik
ng parenthesis. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c index d14190f25

[PATCH i-g-t v2 3/5] lib/gem_engine_topology: Fix premature break from primary find loop

2024-07-15 Thread Janusz Krzysztofik
When looking for a primary counterpart of a render device, we try to open each primary minor. When one fails, we should continue rather then break, since contiguity of minor numbers assigned to devices is not guaranteed. Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 2

[PATCH i-g-t v3 1/5] tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update

2024-07-17 Thread Janusz Krzysztofik
spin termination. v2: No changes. v3: Don't fail on unsuccessful update of preempt_timeout_ms, older platforms don't support it but can still succeed. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_ctx_exec.c | 11

[PATCH i-g-t v3 3/5] lib/gem_engine_topology: Fix premature break from primary find loop

2024-07-17 Thread Janusz Krzysztofik
When looking for a primary counterpart of a render device, we try to open each primary minor. When one fails, we should continue rather then break, since contiguity of minor numbers assigned to devices is not guaranteed. Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 2

[PATCH i-g-t v3 4/5] lib/gem_engine_topology: Simplify the method of opening a primary

2024-07-17 Thread Janusz Krzysztofik
relative. While that construct gives the expected result anyway, it makes the picture unclear. Use open() and drop unused code. Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/i915

[PATCH i-g-t v3 2/5] lib: Add more debug messages to error paths

2024-07-17 Thread Janusz Krzysztofik
/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 19 +++ lib/igt_sysfs.c| 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c index afb576afb2

[PATCH i-g-t v3 0/5] tests/gem_ctx_exec: Fix failing preempt timeout updates

2024-07-17 Thread Janusz Krzysztofik
till more debug messages. Janusz Krzysztofik (5): tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update lib: Add more debug messages to error paths lib/gem_engine_topology: Fix premature break from primary find loop lib/gem_engine_topology: Simplify the method of opening

[PATCH i-g-t v3 5/5] lib/gem_engine_topology: Fix broken compare of device links

2024-07-17 Thread Janusz Krzysztofik
reedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c index 8d21be3f1f..ada150a659 100644 --- a/lib/i915/g

Re: [PATCH i-g-t v3 2/5] lib: Add more debug messages to error paths

2024-07-18 Thread Janusz Krzysztofik
On Wednesday, 17 July 2024 14:26:13 GMT+2 Janusz Krzysztofik wrote: > while (dir >= 0 && (path = va_arg(ap, const char *))) { > int fd; > > - fd = openat(dir, path, O_RDONLY); > + igt_debug_on_f((fd = openat

[PATCH i-g-t v4 0/5] tests/gem_ctx_exec: Fix failing preempt timeout updates

2024-07-18 Thread Janusz Krzysztofik
n. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Janusz Krzysztofik (5): tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update lib: Add more debug messages to error paths lib/gem_engine_topology: Fix premature break from primary find loop lib/gem_engine_topology: Simplif

[PATCH i-g-t v4 1/5] tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update

2024-07-18 Thread Janusz Krzysztofik
spin termination. v2: No changes. v3: Don't fail on unsuccessful update of preempt_timeout_ms, older platforms don't support it but can still succeed. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_ctx_exec.c | 11

[PATCH i-g-t v4 2/5] lib: Add more debug messages to error paths

2024-07-18 Thread Janusz Krzysztofik
://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268 Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_engine_topology.c | 19 +++ lib/igt_sysfs.c| 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/i915/gem_engine_topology.c b/lib/i915

<    1   2   3   4   5   6   7   8   9   >