[Intel-gfx] [PATCH v2 0/1] Stop users from using the device on driver unbind

2019-04-18 Thread Janusz Krzysztofik
Use drm_dev_unplug() to have device resources protected from user access by DRM layer as soon as the driver is going to be unbound. Janusz Krzysztofik (1): drm/i915: Use drm_dev_unplug() drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Since this patch

[Intel-gfx] [PATCH v2 1/1] drm/i915: Use drm_dev_unplug()

2019-04-18 Thread Janusz Krzysztofik
From: Janusz Krzysztofik The driver does not currently support unbinding from a device which is in use. Since open file descriptors may still be pointing into kernel memory where the device structures used to be, entirely correct kernel panics protect the driver from being unbound as we should

[Intel-gfx] [PATCH RESEND] drm/i915: Flush buffer pools on driver remove

2021-09-03 Thread Janusz Krzysztofik
that the flush was called and nothing added more in between. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- Resending with Cc: dri-de...@lists.freedesktop.org as requested, and a typo in commit description fixed. Thanks, Janusz drivers/gpu/drm/i915/gt/intel_gt.c | 2 ++ dr

[Intel-gfx] [PATCH RESEND] drm/i915: Mark GPU wedging on driver unregister unrecoverable

2021-09-03 Thread Janusz Krzysztofik
__intel_gt_disable() proved to break some driver probe error unwind paths as well as mock selftest exit path. Signed-off-by: Janusz Krzysztofik Cc: Michał Winiarski --- Resending with Cc: dri-de...@lists.freedesktop.org as requested. Thanks, Janusz drivers/gpu/drm/i915/gt/intel_gt.c | 2 +- 1

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Mark GPU wedging on driver unregister unrecoverable (rev2)

2021-09-06 Thread Janusz Krzysztofik
On piątek, 3 września 2021 21:07:00 CEST Patchwork wrote: > == Series Details == > > Series: drm/i915: Mark GPU wedging on driver unregister unrecoverable (rev2) > URL : https://patchwork.freedesktop.org/series/94247/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_105

Re: [Intel-gfx] [PATCH RESEND] drm/i915: Flush buffer pools on driver remove

2021-09-23 Thread Janusz Krzysztofik
Hi Matt, Thanks for review. On czwartek, 23 września 2021 00:24:29 CEST Matt Roper wrote: > On Fri, Sep 03, 2021 at 04:23:20PM +0200, Janusz Krzysztofik wrote: > > In preparation for clean driver release, attempts to drain work queues > > and release freed objects are taken at dri

[Intel-gfx] [PATCH v2] drm/i915: Flush buffer pools on driver remove

2021-09-24 Thread Janusz Krzysztofik
) flushes those objects so they are released before _any_ code in drm_driver.release() that check completness of those flushes executes. v2: Reword commit descriptiom as suggested by Matt. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Matt Roper --- drivers/gpu/drm/i915/gt/intel_gt.c

[Intel-gfx] [PATCH] drm/i915: Mark GPU wedging on driver unregister unrecoverable

2021-09-01 Thread Janusz Krzysztofik
__intel_gt_disable() proved to break some driver probe error unwind paths as well as mock selftest exit path. Signed-off-by: Janusz Krzysztofik Cc: Michał Winiarski --- drivers/gpu/drm/i915/gt/intel_gt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH] drm/i915: Flush buffer pools on driver remove

2021-09-01 Thread Janusz Krzysztofik
that the flush was called and nothing added more in between. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_gt.c | 2 ++ drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/driver

[Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Show device PCI bus address on errors

2021-11-18 Thread Janusz Krzysztofik
test with the device PCI bus address string it uses also printed. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index b36616688..2f2fb7ac1 100644 --- a/

Re: [Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Show device PCI bus address on errors

2021-11-26 Thread Janusz Krzysztofik
On Friday, 26 November 2021 09:00:06 CET Bernatowicz, Marcin wrote: > > On 11/18/2021 9:41 AM, Janusz Krzysztofik wrote: > > Strange -ENODEV responses from the kernel to i915 driver rebind attempts > > have been sporadically observed. After successfully unbinding the driver &g

[Intel-gfx] [PATCH i-g-t] lib/igt_device: Add support for accessing unbound VF PCI devices

2022-02-18 Thread Janusz Krzysztofik
pci_system_cleanup() not called on errors and instruct users to call it for symmetry when the obtained struct pci_device is no longer needed. Signed-off-by: Janusz Krzysztofik --- lib/igt_device.c | 44 lib/igt_device.h | 1 + 2 files changed, 37 insertions

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] lib/igt_device: Add support for accessing unbound VF PCI devices

2022-02-18 Thread Janusz Krzysztofik
Hi Chris, On Friday, 18 February 2022 17:03:01 CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2022-02-18 15:19:35) > > @@ -206,15 +229,19 @@ static struct pci_device > > *__igt_device_get_pci_device(int fd) > > igt_warn("Couldn't find P

[Intel-gfx] [PATCH i-g-t 1/2] lib: Use safe wrappers around libpciaccess initialization functions

2022-02-22 Thread Janusz Krzysztofik
by pci_system_init(). Introduce safe IGT wrappers around those libpciaccess functions and use those wrappers in IGT library and tests. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- lib/igt_core.c | 20 lib/igt_core.h | 28 lib

[Intel-gfx] [PATCH i-g-t 2/2] lib/igt_device: Add support for accessing unbound VF PCI devices

2022-02-22 Thread Janusz Krzysztofik
: Janusz Krzysztofik Cc: Chris Wilson --- lib/igt_device.c | 34 -- lib/igt_device.h | 1 + 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/lib/igt_device.c b/lib/igt_device.c index c50bf4a1f7..1603bf351c 100644 --- a/lib/igt_device.c +++ b/lib

[Intel-gfx] [PATCH i-g-t v3] lib/igt_device: Add support for accessing unbound VF PCI devices

2022-02-22 Thread Janusz Krzysztofik
numbering convention of Linux PCI ABI (Chris), - fix and improve DOC. Signed-off-by: Janusz Krzysztofik Reviewed-by: Chris Wilson # v2 --- lib/igt_device.c | 33 +++-- lib/igt_device.h | 1 + 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/lib

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v3] lib/igt_device: Add support for accessing unbound VF PCI devices

2022-02-22 Thread Janusz Krzysztofik
Hi Michał, Thanks for review. On Tuesday, 22 February 2022 17:16:54 CET Michal Wajdeczko wrote: > > On 22.02.2022 16:11, Janusz Krzysztofik wrote: > > The library provides igt_device_get_pci_device() function that allows to > > get access to a PCI device from an open DRM devi

[Intel-gfx] [PATCH i-g-t] lib/intel_mmio: Fix mmapped resources not unmapped on fini

2022-03-01 Thread Janusz Krzysztofik
() counterparts to public functions intel_mmio_use_pci_bar() and intel_mmio_use_dump_file(). Signed-off-by: Janusz Krzysztofik --- lib/intel_io.h | 4 +++ lib/intel_mmio.c | 65 ++-- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/lib/in

[Intel-gfx] [PATCH v2 i-g-t] lib/intel_mmio: Fix mmapped resources not unmapped on fini

2022-03-01 Thread Janusz Krzysztofik
() counterparts to public functions intel_mmio_use_pci_bar() and intel_mmio_use_dump_file(). v2: apply last minute fixes, cached but unfortunately not committed before sending Signed-off-by: Janusz Krzysztofik --- lib/intel_io.h | 4 +++ lib/intel_mmio.c | 67

Re: [Intel-gfx] [igt-dev] [PATCH v2 i-g-t] lib/intel_mmio: Fix mmapped resources not unmapped on fini

2022-03-04 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Friday, 4 March 2022 16:14:05 CET Kamil Konieczny wrote: > Hi Janusz, > > Dnia 2022-03-01 at 15:07:55 +0100, Janusz Krzysztofik napisał(a): > > Commit 5f3cfa485eb4 ("lib: Use safe wrappers around libpciaccess > > initialization fu

[Intel-gfx] [PATCH v3 i-g-t] lib/intel_mmio: Fix mmapped resources not unmapped on fini

2022-03-07 Thread Janusz Krzysztofik
ent initialization status, - shorten warning messages (Kamil), - don't fill .mmio_size field until initialization succeeds (Kamil) Signed-off-by: Janusz Krzysztofik Cc: Kamil Konieczny --- lib/intel_io.h | 4 +++ lib/intel_mmio.c | 64 +--- 2 file

Re: [Intel-gfx] [PATCH v3 i-g-t] lib/intel_mmio: Fix mmapped resources not unmapped on fini

2022-03-07 Thread Janusz Krzysztofik
Hi Kamil, On Monday, 7 March 2022 14:23:30 CET Kamil Konieczny wrote: > Hi Janusz, > > Dnia 2022-03-07 at 09:26:43 +0100, Janusz Krzysztofik napisał(a): > > Commit 5f3cfa485eb4 ("lib: Use safe wrappers around libpciaccess > > initialization functions") took care

[Intel-gfx] [PATCH i-g-t] lib/intel_mmio: Fix mmapped resources not unmapped on fini

2022-03-08 Thread Janusz Krzysztofik
ent initialization status, - shorten warning messages (Kamil), - don't fill .mmio_size field until initialization succeeds (Kamil) v4: fix condition of forcewake release, broken in v3, - improve comments and warning messages (Kamil) Signed-off-by: Janusz Krzysztofik Cc: Kamil Konieczny ---

[Intel-gfx] [PATCH 1/2] drm/i915/gem: Avoid taking runtime-pm under the shrinker

2022-07-20 Thread Janusz Krzysztofik
CPU1 <4> [437.542719] <4> [437.542721] lock(fs_reclaim); <4> [437.542725] lock(acpi_device_lock); <4> [437.542728]lock(fs_reclaim); <4> [437.542732] lock(acpi

[Intel-gfx] [RFC PATCH 2/2] drm/i915/gem: Perform active shrinking from a background thread

2022-07-20 Thread Janusz Krzysztofik
https://gitlab.freedesktop.org/drm/intel/-/issues/6449 Fixes: 178a30c90ac7 ("drm/i915: Unbind objects in shrinker only if device is runtime active") Signed-off-by: Chris Wilson Cc: Thomas Hellström Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: sta...@vger.kernel.org # v4.8+ Signed-off-by: Janusz Krzysztofi

[Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Wait for device nodes to re-appear

2023-08-22 Thread Janusz Krzysztofik
es: https://gitlab.freedesktop.org/drm/intel/-/issues/8830 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/500 Signed-off-by: Janusz Krzysztofik Cc: Petri Latvala --- tests/core_hotunplug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/core_hotunplug.c b/tests/core_ho

[Intel-gfx] [RFC PATCH] kunit: Fix test log size limit too low for some tests

2023-08-30 Thread Janusz Krzysztofik
tools that rely on parsing of debugfs results can fail. Increase kunit test case log size limit to 4096 bytes. Signed-off-by: Janusz Krzysztofik --- include/kunit/test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kunit/test.h b/include/kunit/test.h index

Re: [Intel-gfx] [RFC PATCH] kunit: Fix test log size limit too low for some tests

2023-08-30 Thread Janusz Krzysztofik
On Wednesday, 30 August 2023 11:23:43 CEST David Gow wrote: > On Wed, 30 Aug 2023 at 15:55, Janusz Krzysztofik > wrote: > > > > Now we have memory space available to a kunit test case log exposed via > > debugfs limited to 2048 bytes, while some para

[Intel-gfx] [PATCH i-g-t] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-15 Thread Janusz Krzysztofik
available mmap methods and caching modes expected to be device coherent. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Signed-off-by: Janusz Krzysztofik --- tests/i915/kms_fb_coherency.c | 354 ++ tests/meson.build | 1 + 2 files

Re: [Intel-gfx] [PATCH i-g-t] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Monday, 15 May 2023 22:02:51 CEST Kamil Konieczny wrote: > Hi Janusz, > > On 2023-05-15 at 10:50:20 +0200, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor

[Intel-gfx] [PATCH i-g-t v2] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
subtest bodies to an updated and renamed helper, - drop "derived from ..." info from copyrights comment (Kamil), - fix order of includes (Kamil), - fix whitespace (Kamil), - Cc: Bhanuprakash (Kamil). Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Signed-off-by: Janusz K

Re: [Intel-gfx] [PATCH i-g-t v2] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
Hi Andrzej, Thanks for review. On Tuesday, 16 May 2023 16:08:26 CEST Andrzej Hajda wrote: > On 16.05.2023 12:05, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor. Those observations have been

[Intel-gfx] [PATCH i-g-t v3] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-19 Thread Janusz Krzysztofik
"derived from ..." info from copyrights comment (Kamil), - fix order of includes (Kamil), - fix whitespace (Kamil), - Cc: Bhanuprakash (Kamil). Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Cc: Bhanuprakash Modem Reviewed-by: Andrzej Hajda # v2 Signed-off-by: Janusz K

Re: [Intel-gfx] [PATCH i-g-t v3] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-19 Thread Janusz Krzysztofik
On Friday, 19 May 2023 12:28:49 CEST Andrzej Hajda wrote: > On 19.05.2023 11:43, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor. Those observations have been confirmed with > > failures fr

Re: [Intel-gfx] [RESUBMIT][PATCH] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-05 Thread Janusz Krzysztofik
(fixed misspelled Cc: email address of intel-gfx list) On Friday, 2 June 2023 16:53:30 CEST Juergen Gross wrote: > On 02.06.23 16:48, Juergen Gross wrote: > > On 02.06.23 16:43, Borislav Petkov wrote: > >> On Thu, Jun 01, 2023 at 10:47:39AM +0200, Juergen Gross wrote: > >>> As described in the com

[Intel-gfx] [PATCH i-g-t 00/17] Fix IGT Kunit implementation issues

2023-09-08 Thread Janusz Krzysztofik
Janusz Krzysztofik (17): lib/kunit: Drop unused file stream lib/kunit: Stop loading kunit module explicitly lib/kunit: Fix struct kmod_module kunit_kmod not freed lib/kunit: Optimize calls to igt_success/skip/fail() lib/kunit: Fix illegal igt_fail() calls inside subtest body lib/ktap

[Intel-gfx] [PATCH i-g-t 01/17] lib/kunit: Drop unused file stream

2023-09-08 Thread Janusz Krzysztofik
fileno() and the data is read with read(). Drop the unnecessary conversions and teach functions to accept and process just the file descriptor of /dev/kmsg. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +- lib/igt_ktap.c | 62

[Intel-gfx] [PATCH i-g-t 02/17] lib/kunit: Stop loading kunit module explicitly

2023-09-08 Thread Janusz Krzysztofik
essary operation. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 97667a896f..faf31afabc 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -789,12 +789,6 @@ static void __igt_kunit(const char

[Intel-gfx] [PATCH i-g-t 04/17] lib/kunit: Optimize calls to igt_success/skip/fail()

2023-09-08 Thread Janusz Krzysztofik
makes the code more compact. Go for it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 34ddec3fad..1d1cd51170 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -814,12

[Intel-gfx] [PATCH i-g-t 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-08 Thread Janusz Krzysztofik
preceding igt_fixture section. Replace remaining illegal igt_fail() calls with more friendly skips. Let igt_runner decide if abort is needed. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 75 +++--- 1 file changed, 22 insertions(+), 53 deletions

[Intel-gfx] [PATCH i-g-t 03/17] lib/kunit: Fix struct kmod_module kunit_kmod not freed

2023-09-08 Thread Janusz Krzysztofik
We obtain a kmod_module structure for kunit module in order to check if it is modular or built-in, then we never release that structure. Fix it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

[Intel-gfx] [PATCH i-g-t 06/17] lib/ktap: Make sure we fail on premature cancel

2023-09-08 Thread Janusz Krzysztofik
by result of KTAP parsing. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 123a40d183..84fb13218f 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -579,9 +579,7

[Intel-gfx] [PATCH i-g-t 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-08 Thread Janusz Krzysztofik
igt_runner has no problems with killing us promptly on timeout. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 84fb13218f..3cfb55ec97 100644 --- a/lib/igt_ktap.c +++ b/lib

[Intel-gfx] [PATCH i-g-t 10/17] lib/ktap: Read /dev/kmsg in blocking mode

2023-09-08 Thread Janusz Krzysztofik
high CPU usage can be observed. Simplify reading KTAP reports by first switching the file descriptor back to blocking mode. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 7 - lib/igt_ktap.c | 81 ++ 2 files changed, 28 insertions(+

[Intel-gfx] [PATCH i-g-t 08/17] lib/kunit: Cancel KTP parser on module load failure

2023-09-08 Thread Janusz Krzysztofik
break the test immediately. Cancel the KTAP parser thread right after module load error and before joining it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + lib/igt_ktap.c | 6 ++ lib/igt_ktap.h | 1 + 3 files changed, 8 insertions(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c

[Intel-gfx] [PATCH i-g-t 09/17] lib/ktap: Drop is_running flag

2023-09-08 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 32 1 file changed, 32 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 1e75b2ec23..fe77b62680 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -18,7 +18,6 @@ struct ktap_parser_args { int

[Intel-gfx] [PATCH i-g-t 11/17] lib/kunit: Fail / skip on kernel taint

2023-09-08 Thread Janusz Krzysztofik
Similar to how igt_kselftest() handles kernel taints, fail current dynamic sub-subtest and skip remaining ones when a kernel taint is detected during execution of kunit test cases. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +++- 1 file changed, 11 insertions(+), 1

[Intel-gfx] [PATCH i-g-t 12/17] lib/ktap: Use IGT linked lists for storing KTAP results

2023-09-08 Thread Janusz Krzysztofik
For code simplicity and clarity, use existing IGT linked lists library instead of open coding a custom implementation of a list of KTAP results. While being at it, flatten the code by inverting a check for pending results. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 28

[Intel-gfx] [PATCH i-g-t 13/17] lib/ktap: Reimplement KTAP parser

2023-09-08 Thread Janusz Krzysztofik
ctness of their parsing is also provided. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 422 lib/igt_ktap.h | 15 ++ lib/tests/igt_ktap_parser.c | 235 lib/tests/meson.build | 1 + 4 files changed,

[Intel-gfx] [PATCH i-g-t 15/17] lib/kunit: Parse KTAP report from the main process thread

2023-09-08 Thread Janusz Krzysztofik
needed functions from igt_ktap soruces. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 158 +++--- lib/igt_ktap.c | 568 - lib/igt_ktap.h | 22 -- 3 files changed, 123 insertions(+), 625 deletions(-) diff --git a/lib/igt_kmod.c b/lib

[Intel-gfx] [PATCH i-g-t 16/17] lib/kunit: Strip "_test" or "_kunit" suffix from subtest names

2023-09-08 Thread Janusz Krzysztofik
t carry any useful information. Strip those suffixes from IGT subtest names. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 26 ++ tests/drm_mm.c | 42 +- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/lib/igt

[Intel-gfx] [PATCH i-g-t 14/17] lib/kunit: Load test modules in background

2023-09-08 Thread Janusz Krzysztofik
parser, without waiting for completion of module loading. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index c692954911..bbde3929f2 100644 --- a/lib

[Intel-gfx] [PATCH i-g-t 17/17] lib/kunit: Omit suite name prefix if the same as subtest name

2023-09-08 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/

[Intel-gfx] [PATCH i-g-t v2 00/17] Fix IGT Kunit implementation issues

2023-09-08 Thread Janusz Krzysztofik
v2: Fix incorrect and missing includes in the test source file, - add license and copyright clauses to the test source file. Janusz Krzysztofik (17): lib/kunit: Drop unused file stream lib/kunit: Stop loading kunit module explicitly lib/kunit: Fix struct kmod_module kunit_kmod not freed

[Intel-gfx] [PATCH i-g-t v2 01/17] lib/kunit: Drop unused file stream

2023-09-08 Thread Janusz Krzysztofik
fileno() and the data is read with read(). Drop the unnecessary conversions and teach functions to accept and process just the file descriptor of /dev/kmsg. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +- lib/igt_ktap.c | 62

[Intel-gfx] [PATCH i-g-t v2 03/17] lib/kunit: Fix struct kmod_module kunit_kmod not freed

2023-09-08 Thread Janusz Krzysztofik
We obtain a kmod_module structure for kunit module in order to check if it is modular or built-in, then we never release that structure. Fix it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

[Intel-gfx] [PATCH i-g-t v2 02/17] lib/kunit: Stop loading kunit module explicitly

2023-09-08 Thread Janusz Krzysztofik
essary operation. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 97667a896f..faf31afabc 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -789,12 +789,6 @@ static void __igt_kunit(const char

[Intel-gfx] [PATCH i-g-t v2 04/17] lib/kunit: Optimize calls to igt_success/skip/fail()

2023-09-08 Thread Janusz Krzysztofik
makes the code more compact. Go for it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 34ddec3fad..1d1cd51170 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -814,12

[Intel-gfx] [PATCH i-g-t v2 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-08 Thread Janusz Krzysztofik
preceding igt_fixture section. Replace remaining illegal igt_fail() calls with more friendly skips. Let igt_runner decide if abort is needed. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 75 +++--- 1 file changed, 22 insertions(+), 53 deletions

[Intel-gfx] [PATCH i-g-t v2 06/17] lib/ktap: Make sure we fail on premature cancel

2023-09-08 Thread Janusz Krzysztofik
by result of KTAP parsing. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 123a40d183..84fb13218f 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -579,9 +579,7

[Intel-gfx] [PATCH i-g-t v2 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-08 Thread Janusz Krzysztofik
igt_runner has no problems with killing us promptly on timeout. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 84fb13218f..3cfb55ec97 100644 --- a/lib/igt_ktap.c +++ b/lib

[Intel-gfx] [PATCH i-g-t v2 08/17] lib/kunit: Cancel KTP parser on module load failure

2023-09-08 Thread Janusz Krzysztofik
break the test immediately. Cancel the KTAP parser thread right after module load error and before joining it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + lib/igt_ktap.c | 6 ++ lib/igt_ktap.h | 1 + 3 files changed, 8 insertions(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c

[Intel-gfx] [PATCH i-g-t v2 09/17] lib/ktap: Drop is_running flag

2023-09-08 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 32 1 file changed, 32 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 1e75b2ec23..fe77b62680 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -18,7 +18,6 @@ struct ktap_parser_args { int

[Intel-gfx] [PATCH i-g-t v2 10/17] lib/ktap: Read /dev/kmsg in blocking mode

2023-09-08 Thread Janusz Krzysztofik
high CPU usage can be observed. Simplify reading KTAP reports by first switching the file descriptor back to blocking mode. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 7 - lib/igt_ktap.c | 81 ++ 2 files changed, 28 insertions(+

[Intel-gfx] [PATCH i-g-t v2 12/17] lib/ktap: Use IGT linked lists for storing KTAP results

2023-09-08 Thread Janusz Krzysztofik
For code simplicity and clarity, use existing IGT linked lists library instead of open coding a custom implementation of a list of KTAP results. While being at it, flatten the code by inverting a check for pending results. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 28

[Intel-gfx] [PATCH i-g-t v2 13/17] lib/ktap: Reimplement KTAP parser

2023-09-08 Thread Janusz Krzysztofik
ctness of their parsing is also provided. v2: Fix incorrect and missing includes in the test source file, - add license and copyright clauses to the test source file. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 422 lib/igt_ktap.h

[Intel-gfx] [PATCH i-g-t v2 14/17] lib/kunit: Load test modules in background

2023-09-08 Thread Janusz Krzysztofik
parser, without waiting for completion of module loading. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index c692954911..bbde3929f2 100644 --- a/lib

[Intel-gfx] [PATCH i-g-t v2 15/17] lib/kunit: Parse KTAP report from the main process thread

2023-09-08 Thread Janusz Krzysztofik
needed functions from igt_ktap soruces. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 158 +++--- lib/igt_ktap.c | 568 - lib/igt_ktap.h | 22 -- 3 files changed, 123 insertions(+), 625 deletions(-) diff --git a/lib/igt_kmod.c b/lib

[Intel-gfx] [PATCH i-g-t v2 11/17] lib/kunit: Fail / skip on kernel taint

2023-09-08 Thread Janusz Krzysztofik
Similar to how igt_kselftest() handles kernel taints, fail current dynamic sub-subtest and skip remaining ones when a kernel taint is detected during execution of kunit test cases. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +++- 1 file changed, 11 insertions(+), 1

[Intel-gfx] [PATCH i-g-t v2 16/17] lib/kunit: Strip "_test" or "_kunit" suffix from subtest names

2023-09-08 Thread Janusz Krzysztofik
t carry any useful information. Strip those suffixes from IGT subtest names. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 26 ++ tests/drm_mm.c | 42 +- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/lib/igt

[Intel-gfx] [PATCH i-g-t v2 17/17] lib/kunit: Omit suite name prefix if the same as subtest name

2023-09-08 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/

Re: [Intel-gfx] [PATCH i-g-t v2 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-11 Thread Janusz Krzysztofik
Hi Mauro, Thanks for review. On Monday, 11 September 2023 10:52:51 CEST Mauro Carvalho Chehab wrote: > On Fri, 8 Sep 2023 14:32:39 +0200 > Janusz Krzysztofik wrote: > > > In a body of a subtest with dynamic sub-subtests, it is illegal to call > > igt_fail() and its varia

[Intel-gfx] [PATCH] drm/tests: Fix incorrect argument in drm_test_mm_insert_range

2023-09-11 Thread Janusz Krzysztofik
t;= start) is triggered. Fix it by restoring the original value. Fixes: fc8d29e298cf ("drm: selftest: convert drm_mm selftest to KUnit") Signed-off-by: Janusz Krzysztofik Cc: "Maíra Canal" Cc: Arthur Grillo Cc: Javier Martinez Canillas Cc: Daniel Latypov Cc: sta...@vger.ke

Re: [Intel-gfx] [PATCH i-g-t v2 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-13 Thread Janusz Krzysztofik
On Monday, 11 September 2023 13:57:29 CEST Mauro Carvalho Chehab wrote: > On Mon, 11 Sep 2023 11:28:32 +0200 > Janusz Krzysztofik wrote: > > > Hi Mauro, > > > > Thanks for review. > > > > On Monday, 11 September 2023 10:52:51 CEST Mauro Carvalho Chehab wr

Re: [Intel-gfx] [PATCH i-g-t v2 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-13 Thread Janusz Krzysztofik
On Monday, 11 September 2023 11:01:42 CEST Mauro Carvalho Chehab wrote: > On Fri, 8 Sep 2023 14:32:41 +0200 > Janusz Krzysztofik wrote: > > > While reading KTAP data from /dev/kmsg we now ignore interrupt signals > > that may occur during read() and we continue

Re: [Intel-gfx] [PATCH i-g-t v2 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-15 Thread Janusz Krzysztofik
On Friday, 15 September 2023 14:25:24 CEST Mauro Carvalho Chehab wrote: > On Wed, 13 Sep 2023 16:04:10 +0200 > Janusz Krzysztofik wrote: > > > On Monday, 11 September 2023 11:01:42 CEST Mauro Carvalho Chehab wrote: > > > On Fri, 8 Sep 2023 14:32:41 +0200 > &g

Re: [Intel-gfx] [PATCH i-g-t v2 13/17] lib/ktap: Reimplement KTAP parser

2023-09-15 Thread Janusz Krzysztofik
Hi Mauro, On Friday, 15 September 2023 14:28:49 CEST Mauro Carvalho Chehab wrote: > On Fri, 8 Sep 2023 14:32:47 +0200 > Janusz Krzysztofik wrote: > > Forgot to mention on my past review: > > > + &n, &l

Re: [Intel-gfx] [PATCH i-g-t v2 13/17] lib/ktap: Reimplement KTAP parser

2023-09-15 Thread Janusz Krzysztofik
On Friday, 15 September 2023 15:09:58 CEST Janusz Krzysztofik wrote: > Hi Mauro, > > On Friday, 15 September 2023 14:28:49 CEST Mauro Carvalho Chehab wrote: > > On Fri, 8 Sep 2023 14:32:47 +0200 > > Janusz Krzysztofik wrote: > > > > Fo

Re: [Intel-gfx] [PATCH] drm/tests: Fix incorrect argument in drm_test_mm_insert_range

2023-09-15 Thread Janusz Krzysztofik
Hi Maíra, Thanks for review. On Friday, 15 September 2023 16:01:31 CEST Maira Canal wrote: > Hi, > > On 9/11/23 10:03, Janusz Krzysztofik wrote: > > While drm_mm test was converted form igt selftest to kunit, unexpected > > value of "end" argument equal "star

[Intel-gfx] [PATCH i-g-t v3 00/17] Fix IGT Kunit implementation issues

2023-09-18 Thread Janusz Krzysztofik
includes in the test source file, - add license and copyright clauses to the test source file. Janusz Krzysztofik (17): lib/kunit: Drop unused file stream lib/kunit: Stop loading kunit module explicitly lib/kunit: Fix struct kmod_module kunit_kmod not freed lib/kunit: Optimize calls to

[Intel-gfx] [PATCH i-g-t v3 01/17] lib/kunit: Drop unused file stream

2023-09-18 Thread Janusz Krzysztofik
descriptor with fileno() and raw data is read with read(). Drop the unnecessary conversions and teach functions to accept and process just the file descriptor of /dev/kmsg. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 12 +- lib/igt_ktap.c | 62

[Intel-gfx] [PATCH i-g-t v3 02/17] lib/kunit: Stop loading kunit module explicitly

2023-09-18 Thread Janusz Krzysztofik
essary operation. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 97667a896f..faf31afabc 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -789,12 +789,6 @@ stat

[Intel-gfx] [PATCH i-g-t v3 04/17] lib/kunit: Optimize calls to igt_success/skip/fail()

2023-09-18 Thread Janusz Krzysztofik
makes the code more compact. Go for it. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 34ddec3fad..1d1cd51170 100644 --- a/lib

[Intel-gfx] [PATCH i-g-t v3 03/17] lib/kunit: Fix struct kmod_module kunit_kmod not freed

2023-09-18 Thread Janusz Krzysztofik
We obtain a kmod_module structure for kunit module in order to check if it is modular or built-in, then we never release that structure. Fix it. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib

[Intel-gfx] [PATCH i-g-t v3 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-18 Thread Janusz Krzysztofik
from igt_ktest_fini() when only listing subtests, - call igt_ktest_end() from igt_fixture so it is not unnecessarily called when only listing subtests. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab --- lib/igt_kmod.c | 76 +++--- 1

[Intel-gfx] [PATCH i-g-t v3 06/17] lib/ktap: Make sure we fail on premature cancel

2023-09-18 Thread Janusz Krzysztofik
by result of KTAP parsing. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_ktap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 123a40d183..84fb13218f 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c

[Intel-gfx] [PATCH i-g-t v3 07/17] lib/ktap: Drop checks for EINTR on read() failures

2023-09-18 Thread Janusz Krzysztofik
user interrupt, only the whole process should be terminated. Drop checks for errno == EINTR as not applicable. v2: Drop handling of EINTR completely, update commit message and descripion. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab --- lib/igt_ktap.c | 15 --- 1

[Intel-gfx] [PATCH i-g-t v3 08/17] lib/kunit: Cancel KTP parser on module load failure

2023-09-18 Thread Janusz Krzysztofik
break the test immediately. Cancel the KTAP parser thread right after module load error and before joining it. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 1 + lib/igt_ktap.c | 6 ++ lib/igt_ktap.h | 1 + 3 files changed, 8 insertions(+) diff

[Intel-gfx] [PATCH i-g-t v3 09/17] lib/ktap: Drop is_running flag

2023-09-18 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_ktap.c | 32 1 file changed, 32 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 0db42d1243..5bc5e003d7 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -18,7 +18,6

[Intel-gfx] [PATCH i-g-t v3 10/17] lib/ktap: Read /dev/kmsg in blocking mode

2023-09-18 Thread Janusz Krzysztofik
IGINT default signal handler kills the whole process anyway, - update commit description to also mention read error handling fix. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab # v1 --- lib/igt_kmod.c | 7 +- lib/igt_ktap.c

[Intel-gfx] [PATCH i-g-t v3 11/17] lib/kunit: Fail / skip on kernel taint

2023-09-18 Thread Janusz Krzysztofik
Similar to how igt_kselftest() handles kernel taints, fail current dynamic sub-subtest and skip remaining ones when a kernel taint is detected during execution of kunit test cases. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 12 +++- 1 file

[Intel-gfx] [PATCH i-g-t v3 14/17] lib/kunit: Load test modules in background

2023-09-18 Thread Janusz Krzysztofik
parser, without waiting for completion of module loading. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 2941524bb4

[Intel-gfx] [PATCH i-g-t v3 13/17] lib/ktap: Reimplement KTAP parser

2023-09-18 Thread Janusz Krzysztofik
the test source file, - add license and copyright clauses to the test source file. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_ktap.c | 422 lib/igt_ktap.h | 15 ++ lib/tests/igt

[Intel-gfx] [PATCH i-g-t v3 12/17] lib/ktap: Use IGT linked lists for storing KTAP results

2023-09-18 Thread Janusz Krzysztofik
For code simplicity and clarity, use existing IGT linked lists library instead of open coding a custom implementation of a list of KTAP results. While being at it, flatten the code by inverting a check for pending results. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab

[Intel-gfx] [PATCH i-g-t v3 15/17] lib/kunit: Parse KTAP report from the main process thread

2023-09-18 Thread Janusz Krzysztofik
needed functions from igt_ktap soruces. v2: Interrupt blocking read() on modprobe failure. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 208 ++ lib/igt_ktap.c | 568 - lib/igt_ktap.h | 22 -- 3 files changed, 166 insertions

[Intel-gfx] [PATCH i-g-t v3 16/17] lib/kunit: Strip "_test" or "_kunit" suffix from subtest names

2023-09-18 Thread Janusz Krzysztofik
t carry any useful information. Strip those suffixes from IGT subtest names. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 23 --- tests/drm_mm.c | 42 +- 2 files changed, 41 insertions(+), 24

[Intel-gfx] [PATCH i-g-t v3 17/17] lib/kunit: Omit suite name prefix if the same as subtest name

2023-09-18 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/

[Intel-gfx] [PATCH i-g-t 0/9] Kunit fixes and improvements

2023-10-03 Thread Janusz Krzysztofik
Janusz Krzysztofik (9): lib/kunit: Fix handling of potential errors from F_GETFL lib/kunit: Be more verbose on errors lib/kunit: Fix misplaced igt_kunit() doc lib/kunit: Parse KTAP report from the main process thread lib/kunit: Omit suite name prefix if the same as subtest name tests

[Intel-gfx] [PATCH i-g-t 1/9] lib/kunit: Fix handling of potential errors from F_GETFL

2023-10-03 Thread Janusz Krzysztofik
Function fcntl(..., F_GETFL, ...) that returns file status flags may also return a negative error code. Handle that error instead of blindly using the returned value as flags. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Intel-gfx] [PATCH i-g-t 2/9] lib/kunit: Be more verbose on errors

2023-10-03 Thread Janusz Krzysztofik
Use a more verbose variant of igt_fail() when failing a dynamic sub- subtest on kernel taint. Also, print a debug message on string duplication failure. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b

  1   2   3   4   5   6   7   8   9   >