[PATCH 3/3] drm/i915: Fix device sysfs teardown tried even if not set up

2025-02-06 Thread Janusz Krzysztofik
-/issues/10887 Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12817 Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index 8775beab9cb

[PATCH 2/3] drm/i915: Fix GT sysfs unregister tried even if not registered

2025-02-06 Thread Janusz Krzysztofik
.org/drm/i915/kernel/-/issues/10887 Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12817 Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/gt/intel_gt_sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_sysfs.c b/drivers/gpu/

[PATCH 1/3] drm/i915: Fix PM reference not released if device register fails

2025-02-06 Thread Janusz Krzysztofik
y hardly seem to belong. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10047 Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9820 Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10131 Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10887 Link: h

[PATCH 0/3] drm/i915: Fix harmfull driver register/unregister assymetry

2025-02-06 Thread Janusz Krzysztofik
ag to avoid it being picked up by stable, which I haven't tested. Janusz Krzysztofik (3): drm/i915: Fix PM reference not released if device register fails drm/i915: Fix GT sysfs unregister tried even if not registered drm/i915: Fix device sysfs teardown tried even if not set up

Re: [PATCH] drm/i915/selftests: Use preemption timeout on cleanup

2024-12-20 Thread Janusz Krzysztofik
Hi Andi, On Tuesday, 17 December 2024 19:00:40 CET Janusz Krzysztofik wrote: > Hi Andi, > > On Tuesday, 17 December 2024 18:12:08 CET Andi Shyti wrote: > > Hi Janusz, > > > > ... > > > > > > > + > > > > >

Re: [PATCH] drm/i915/selftests: Use preemption timeout on cleanup

2024-12-17 Thread Janusz Krzysztofik
Hi Andi, On Tuesday, 17 December 2024 18:12:08 CET Andi Shyti wrote: > Hi Janusz, > > ... > > > > > + > > > > cond_resched(); > > > > > > > > - if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) { > > > > + if (intel_gt_wait_for_idle(gt, HZ * timeout_

Re: ✗ i915.CI.Full: failure for drm/i915/selftests: Use preemption timeout on cleanup

2024-12-16 Thread Janusz Krzysztofik
Hi i915-ci-in...@lists.freedesktop.org, On Monday, 16 December 2024 16:42:29 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/selftests: Use preemption timeout on cleanup > URL : https://patchwork.freedesktop.org/series/142582/ > State : failure > > == Summary == > > CI Bug Lo

Re: [PATCH] drm/i915/selftests: Use preemption timeout on cleanup

2024-12-16 Thread Janusz Krzysztofik
Hi Andi, Thanks for review. On Monday, 16 December 2024 14:26:58 CET Andi Shyti wrote: > Hi Janusz, > > ... > > > for_each_gt(gt, i915, i) { > > + struct intel_engine_cs *engine; > > + unsigned long timeout_ms = 0; > > + unsigned int id; > > + > > i

Re: ✗ i915.CI.BAT: failure for drm/i915/selftests: Use preemption timeout on cleanup

2024-12-16 Thread Janusz Krzysztofik
Hi i915-ci-in...@lists.freedesktop.org, On Friday, 13 December 2024 20:48:10 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/selftests: Use preemption timeout on cleanup > URL : https://patchwork.freedesktop.org/series/142582/ > State : failure > > == Summary == > > CI Bug Lo

[PATCH] drm/i915/selftests: Use preemption timeout on cleanup

2024-12-13 Thread Janusz Krzysztofik
cases. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061 Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/selftests/igt_flush_test.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/selftests/igt_flush_test.c b/drivers

[PATCH i-g-t v2 0/2] tests/gem_mmap_offset: Fix OOM hits

2024-11-28 Thread Janusz Krzysztofik
execbuf. v2: Limit the scope of the fix to SMEM exercise. Janusz Krzysztofik (2): tests/gem_mmap_offset: Split 'clear' subtest tests/gem_mmap_offset: Fix OOM hits tests/intel/gem_mmap_offset.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) -- 2.47.0

[PATCH i-g-t v2 2/2] tests/gem_mmap_offset: Fix OOM hits

2024-11-28 Thread Janusz Krzysztofik
M exercise. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11738 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_mmap_offset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/intel/gem_mmap_offset.c b/tests/intel/gem_mmap_offset.c index 20dca17378..8ce10d6144 10

[PATCH i-g-t v2 1/2] tests/gem_mmap_offset: Split 'clear' subtest

2024-11-28 Thread Janusz Krzysztofik
xclusively. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11738 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_mmap_offset.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/intel/gem_mmap_offset.c b/tests/intel/gem_mmap_offs

[PATCH i-g-t 1/2] tests/gem_mmap_offset: Split 'clear' subtest

2024-11-21 Thread Janusz Krzysztofik
xclusively. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11738 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_mmap_offset.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/intel/gem_mmap_offset.c b/tests/intel/gem_mmap_offs

[PATCH i-g-t 0/2] tests/gem_mmap_offset: Fix OOM hits

2024-11-21 Thread Janusz Krzysztofik
cts to execbuf, that happens to exhaust all available physical memory, which is neither the matter nor the goal nor requirement of the exercise. Move the pagefault method, free from the issue, to a new separate subtest, and make sure sufficient amount of physical memory is available before calling anot

[PATCH i-g-t 2/2] tests/gem_mmap_offset: Fix OOM hits

2024-11-21 Thread Janusz Krzysztofik
g/drm/i915/kernel/-/issues/11738 Signed-off-by: Janusz Krzysztofik --- tests/intel/gem_mmap_offset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/intel/gem_mmap_offset.c b/tests/intel/gem_mmap_offset.c index 20dca17378..4b8c25c56b 100644 --- a/tests/intel/gem_mmap_offset.c +++ b/t

[PATCH i-g-t] intel-ci: Blocklist igt@i915_module_load@load

2024-11-15 Thread Janusz Krzysztofik
t coverage, blocklist it instead of maintaining as expected SKIP. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6227 Signed-off-by: Janusz Krzysztofik --- tests/intel-ci/blacklist.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/intel-ci/blacklist.txt b/test

[PATCH i-g-t] lib/gem_mman: Stop lying about I915_MMAP_OFFSET_GTT support

2024-10-10 Thread Janusz Krzysztofik
/kernel/-/issues/11370 Signed-off-by: Janusz Krzysztofik --- lib/i915/gem_mman.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/i915/gem_mman.c b/lib/i915/gem_mman.c index 0b41ba70dd..cd0c65e213 100644 --- a/lib/i915/gem_mman.c +++ b/lib/i915/gem_mman.c @@ -90,6 +90,8 @@ bool

Re: [PATCH] tests: drm_fdinfo: Fix zero tolerance checks

2024-09-30 Thread Janusz Krzysztofik
Hi Peter, On Monday, 30 September 2024 12:47:45 GMT+2 Peter Senna Tschudin wrote: > > On 16.09.2024 11:03, Janusz Krzysztofik wrote: > > When we expect an engine to be busy, we check if its reported busy time > > falls within a +/-5% tolerance range of measurement time period.

[PATCH] tests: drm_fdinfo: Fix zero tolerance checks

2024-09-16 Thread Janusz Krzysztofik
, display messages with the compared values when requested via --debug option or when a failure occurs. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7742 Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik --- tests/intel/drm_fdinfo.c | 51

[PATCH i-g-t 2/2] tests/core_hotunplug: Fix inline comment on missing device nodes

2024-07-26 Thread Janusz Krzysztofik
The comment incorrectly blames udev for being responsible for delays in re-creation of device nodes after driver rebind. While that could be true many years ago, nowadays that's the role of kernel devtmpfs. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 2 +- 1 file chang

[PATCH i-g-t 1/2] tests/device_reset: Wait for device nodes to re-appear

2024-07-26 Thread Janusz Krzysztofik
/drm/i915/kernel/-/issues/11626 Signed-off-by: Janusz Krzysztofik --- tests/device_reset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/device_reset.c b/tests/device_reset.c index a669e1224e..8ed3ef5220 100644 --- a/tests/device_reset.c +++ b/tests/device_reset.c @@ -385,6 +385,8

[PATCH i-g-t 0/2] tests/device_reset: Wait for device nodes to re-appear

2024-07-26 Thread Janusz Krzysztofik
ent above an equivalent solution introduced before to core_hotunplug test. Janusz Krzysztofik (2): tests/device_reset: Wait for device nodes to re-appear tests/core_hotunplug: Fix inline comment on missing device nodes tests/core_hotunplug.c | 2 +- tests/device_reset.c | 2 ++ 2 files c

[PATCH i-g-t 3/3] lib/kunit: Improve a comment on action=list parameter

2024-07-22 Thread Janusz Krzysztofik
Emphasize the fact that test case list of unknown length we want to avoid parsing of is an unstructured free text list. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

[PATCH i-g-t 1/3] lib/kunit: Fix selective execution of test cases

2024-07-22 Thread Janusz Krzysztofik
only as a first step of each dynamic sub-subtest body. Reported-by: Zbigniew Kempczyński Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 33f059199f..5864be29d2 100644

[PATCH i-g-t 2/3] lib/kunit: Drop 'suite' from __igt_kunit arguments list

2024-07-22 Thread Janusz Krzysztofik
onger used argument. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 5864be29d2..a13c6fe063 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -1333,7 +1333,6 @@ static bool kunit

[PATCH i-g-t 0/3] lib/kunit: Fixes and enhancements

2024-07-22 Thread Janusz Krzysztofik
sub-subtest, we use test_suite.test_case obtained from a list of test cases as filter_glob. Resolve the above issues, and also update an inline comment to emphasize the fact that test case list of unknown length we want to avoid parsing of is an unstructured free text list. Janusz Krzysztofik (3): lib/

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

2024-07-18 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 c8c1079223..c251060341 100644 --- a/lib/i915/g

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

2024-07-18 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 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

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

2024-07-18 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 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 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

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

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

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

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

[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: [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/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: ✗ Fi.CI.IGT: failure for drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev4)

2024-05-13 Thread Janusz Krzysztofik
On Friday, 10 May 2024 08:12:02 GMT+2 Patchwork wrote: > == Series Details == > > Series: drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev4) > URL : https://patchwork.freedesktop.org/series/132786/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_14738_f

Re: [PATCH] Revert "drm/i915: Remove extra multi-gt pm-references"

2024-05-07 Thread Janusz Krzysztofik
nks, Janusz > > > Regards, > > Nirmoy > > On 5/6/2024 8:02 PM, Janusz Krzysztofik wrote: > > This reverts commit 1f33dc0c1189efb9ae19c6fc22b64dd3e26261fb. > > > > There was a patch supposed to fix an issue of illegal attempts to free a > > still acti

[PATCH] Revert "drm/i915: Remove extra multi-gt pm-references"

2024-05-06 Thread Janusz Krzysztofik
o VMA would be reopened while we destroy them. That assumption is no longer true in multi-GT configurations, where a VMA we reopen may be handled by a GT different from the one that we already keep active via its engine while we set up an execbuf request. Restoring the extra GT0 PM wakeref remo

Re: [PATCH] drm/i915/gt: Disarm breadcrumbs if engines are already idle

2024-04-29 Thread Janusz Krzysztofik
Hi Andrzej, On Friday, 26 April 2024 18:13:02 CEST Nirmoy Das wrote: > > On 4/23/2024 6:23 PM, Janusz Krzysztofik wrote: > > From: Chris Wilson > > > > The breadcrumbs use a GT wakeref for guarding the interrupt, but are > > disarmed during release of the engi

Re: ✗ Fi.CI.BAT: failure for drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev2)

2024-04-26 Thread Janusz Krzysztofik
Hi @I915-ci-infra, On Thursday, 25 April 2024 19:29:17 CEST Patchwork wrote: > == Series Details == > > Series: drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev2) > URL : https://patchwork.freedesktop.org/series/132786/ > State : failure > > == Summary == > > CI Bug Log - chan

Re: [PATCH v3] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-25 Thread Janusz Krzysztofik
Hi Thomas, On Tuesday, 16 April 2024 18:40:12 CEST Rodrigo Vivi wrote: > On Tue, Apr 16, 2024 at 10:09:46AM +0200, Janusz Krzysztofik wrote: > > Hi Rodrigo, > > > > On Tuesday, 16 April 2024 03:16:31 CEST Rodrigo Vivi wrote: > > > On Mon, Apr 15, 2024 at 09:53:

[PATCH] drm/i915/gt: Disarm breadcrumbs if engines are already idle

2024-04-23 Thread Janusz Krzysztofik
o sleep. Fixes: 9d5612ca165a ("drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission") Closes: https://gitlab.freedesktop.org/drm/intel/issues/10026 Signed-off-by: Chris Wilson Cc: Andrzej Hajda Cc: # v5.12+ Signed-off-by: Janusz Krzysztofik --- drivers/gpu/dr

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

2024-04-17 Thread Janusz Krzysztofik
On Wednesday, 17 April 2024 11:37:55 CEST Kamil Konieczny wrote: > Hi Janusz, > On 2024-04-15 at 19:31:59 +0200, 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: ✗ Fi.CI.IGT: failure for drm/i915/vma: Fix UAF on reopen vs destroy race (rev3)

2024-04-16 Thread Janusz Krzysztofik
On Tuesday, 16 April 2024 12:50:05 CEST Patchwork wrote: > == Series Details == > > Series: drm/i915/vma: Fix UAF on reopen vs destroy race (rev3) > URL : https://patchwork.freedesktop.org/series/132360/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_14582_full -> Pat

Re: [PATCH v3] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-16 Thread Janusz Krzysztofik
Hi Rodrigo, On Tuesday, 16 April 2024 03:16:31 CEST Rodrigo Vivi wrote: > On Mon, Apr 15, 2024 at 09:53:09PM +0200, Janusz Krzysztofik wrote: > > We defer actually closing, unbinding and destroying a VMA until next idle > > point, or until the object is freed in the meantime. By

[PATCH v3] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-15 Thread Janusz Krzysztofik
nk on VMA park so it looks like still on a list, don't try to delete it from the list again after the VMA has been marked as parked. Fixes: b0647a5e79b1 ("drm/i915: Avoid live-lock with i915_vma_parked()") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10608 S

[PATCH v2] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-15 Thread Janusz Krzysztofik
ike still on a list, don't try to delete it from the list again after the VMA has been marked as parked. Fixes: b0647a5e79b1 ("drm/i915: Avoid live-lock with i915_vma_parked()") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10608 Signed-off-by: Janusz Krzysztofik Cc: Ch

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

2024-04-15 Thread Janusz Krzysztofik
, protected from buffer overflow or truncation with a single check for enough buffer space (Lucas), - avoid confusing 'if' statement condition (Lucas). Signed-off-by: Janusz Krzysztofik Cc: Kamil Konieczny Reviewed-by: Lucas De Marchi --- @Lucas: I've assumed your R-b still

[PATCH] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-12 Thread Janusz Krzysztofik
]--- Aso soon as we start unbinding and destroing a VMA, marked it as parked, and also keep it marked as closed for the rest of its life. When a VMA to be opened occurs closed, reopen it only if not yet parked. Fixes: b0647a5e79b1 ("drm/i915: Avoid live-lock with i915_vma_par

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

2024-04-10 Thread Janusz Krzysztofik
Hi Lucas, On Friday, 5 April 2024 19:54:53 CEST 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 extracting > them from dmesg, where they may be interleaved with oth

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

2024-04-05 Thread Janusz Krzysztofik
pathname components concatentated to a local buffer, protected from buffer overflow or truncation with a single check for enough buffer space (Lucas), - avoid confusing 'if' statement condition (Lucas). Signed-off-by: Janusz Krzysztofik Cc: Kamil Konieczny Cc: Lucas

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,

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

[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

[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

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

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

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

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 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: ✗ 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_

[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: [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] 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

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

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

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

[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

  1   2   3   4   5   6   7   8   9   >