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

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

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

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

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

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

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

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

[Intel-gfx] [RFC PATCH] drm/i915: Restore full symmetry in i915_driver_modeset_probe/remove

2019-10-18 Thread Janusz Krzysztofik
in a related FIXME comment provided by that commit. While being at it, update the name of function mentioned as calling it out of sequence as that name has been changed meanwhile by commit 78dae1ac35dd ("drm/i915: Propagate "_remove" function name suffix down"). Suggested-by:

Re: [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Restore full symmetry in i915_driver_modeset_probe/remove

2019-10-18 Thread Janusz Krzysztofik
On Friday, October 18, 2019 1:43:32 PM CEST Patchwork wrote: > == Series Details == > > Series: drm/i915: Restore full symmetry in i915_driver_modeset_probe/remove > URL : https://patchwork.freedesktop.org/series/68188/ > State : warning > > == Summary == > > $ dim checkpatch origin/drm-tip >

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Restore full symmetry in i915_driver_modeset_probe/remove

2019-10-18 Thread Janusz Krzysztofik
On Friday, October 18, 2019 2:13:18 PM CEST Patchwork wrote: > == Series Details == > > Series: drm/i915: Restore full symmetry in i915_driver_modeset_probe/remove > URL : https://patchwork.freedesktop.org/series/68188/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_7

Re: [Intel-gfx] [PATCH] RFC drm/i915: Allow userspace to specify ringsize on construction

2019-10-21 Thread Janusz Krzysztofik
_param { > * By default, new contexts allow persistence. > */ > #define I915_CONTEXT_PARAM_PERSISTENCE 0xb > + > +/* > + * > + * I915_CONTEXT_PARAM_RINGSIZE: > + * > + * Sets the size of the ringbuffer to use for logical ring contexts. > + * Only possible t

[Intel-gfx] [PATCH 3/3] drm/i915/dmabuf: Implement pread() callback

2019-10-23 Thread Janusz Krzysztofik
We need dmabuf specific pread() callback utilizing dma-buf API, otherwise GEM_PREAD IOCTL will no longer work with dma-buf backed (i.e., PRIME imported) objects on hardware with no mappable aperture. Signed-off-by: Janusz Krzysztofik Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko --- drivers

[Intel-gfx] [PATCH 1/3] drm/i915/dmabuf: Implement pwrite() callback

2019-10-23 Thread Janusz Krzysztofik
We need dmabuf specific pwrite() callback utilizing dma-buf API, otherwise GEM_PWRITE IOCTL will no longer work with dma-buf backed (i.e., PRIME imported) objects on hardware with no mappable aperture. Signed-off-by: Janusz Krzysztofik Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko

[Intel-gfx] [PATCH 2/3] drm/i915: Add vfunc for pread

2019-10-23 Thread Janusz Krzysztofik
From: Matthew Auld Similar to pwrite, we need pread for (better) support of non-GTT backends. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Signed-off-by: Janusz Krzysztofik Cc: Michal Wajdeczko --- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 2 ++ drivers/gpu

[Intel-gfx] [PATCH i-g-t 2/2] tests/gem_exec_reloc: Calculate softpin offsets from batch size

2019-10-23 Thread Janusz Krzysztofik
From: Janusz Krzysztofik The basic-range subtest assumes 4kB minimum batch size. On future backends with possibly bigger minimum batch sizes this subtest will fail as buffer objects may overlap. To avoid object overlapping, offsets need to be calculated with actual minimum batch size in mind

[Intel-gfx] [PATCH i-g-t 1/2] tests/gem_exec_reloc: Don't filter out addresses when on PPGTT

2019-10-23 Thread Janusz Krzysztofik
, that may result in errors other than those intended to be skipped over being silently ignored. Skip over unavailable addresses only when not running on PPGTT. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/gem_exec_reloc.c | 26 ++ 1 file c

Re: [Intel-gfx] [PATCH i-g-t 2/2] tests/gem_exec_reloc: Calculate softpin offsets from batch size

2019-10-23 Thread Janusz Krzysztofik
Hi Chris, On Wednesday, October 23, 2019 11:13:02 AM CEST Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-10-23 10:07:52) > > From: Janusz Krzysztofik > > > > The basic-range subtest assumes 4kB minimum batch size. On future > > backends with possibly bigg

[Intel-gfx] [RFC PATCH v2 2/3] tests/gem_exec_reloc: Calculate softpin offsets from batch size

2019-10-23 Thread Janusz Krzysztofik
From: Janusz Krzysztofik The basic-range subtest assumes 4kB minimum batch size. On future backends with possibly bigger minimum batch sizes this subtest will fail as buffer objects may overlap on softpin. To avoid object overlapping, softpin offsets need to be calculated with actual minimum

[Intel-gfx] [RFC PATCH v2 3/3] tests/gem_exec_reloc: Detect minimum batch size

2019-10-23 Thread Janusz Krzysztofik
instead of using a hardcoded value. To avoid conflicts with addresses occupied by other users, do that only when running on full PPGTT. Platforms without full PPGTT are not expected to support backends with minimum batch sizes greater than 4kB. Signed-off-by: Janusz Krzysztofik --- tests/i915

[Intel-gfx] [RFC PATCH v2 1/3] tests/gem_exec_reloc: Don't filter out addresses on full PPGTT

2019-10-23 Thread Janusz Krzysztofik
full (non-aliasing) PPGTT, that may result in errors other than those intended to be skipped over being silently ignored. Skip over unavailable addresses only when not running on full PPGTT. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/gem_exec_reloc.c | 26 ++-

Re: [Intel-gfx] [PATCH] drm/i915/execlists: Use vfunc to check engine submission mode

2019-10-28 Thread Janusz Krzysztofik
al Wajdeczko > Cc: Chris Wilson > Cc: Janusz Krzysztofik > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 8 +++- > drivers/gpu/drm/i915/gt/intel_lrc.h | 2 ++ > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/d

[Intel-gfx] [RFC PATCH i-g-t v3 2/4] lib: Add GEM minimum page size helper

2019-10-28 Thread Janusz Krzysztofik
assuming them occupied by other users, or may always succeed when examining invalid use patterns. Provide a helper function that detects minimum page size and returns the size order. Tests may use it to calculate softpin offsets suitable for actually used backing store. Signed-off-by: Janusz

[Intel-gfx] [RFC PATCH i-g-t v3 0/4] Calculate softpin offsets from actual page size

2019-10-28 Thread Janusz Krzysztofik
(inspired by Chris), - in former patch 2/2, now 3/4, initialize page size order with an actual minimum returned by the new helper (inspired by Chris), - add a new fix for gem_ctx_shared test (patch 4/4). Janusz Krzysztofik (4): lib/i915: Move redundant local helpers to lib/ lib/i915: Ad

[Intel-gfx] [RFC PATCH i-g-t v3 3/4] tests/gem_exec_reloc: Calculate softpin offsets from actual page size

2019-10-28 Thread Janusz Krzysztofik
From: Janusz Krzysztofik The basic-range subtest assumes 4kB page size while calculating softpin offsets. On future backends with possibly larger minimum page sizes a half of calculated offsets to be tested may be incorrectly detected as occupied by other users and skiped, significantly

[Intel-gfx] [RFC PATCH i-g-t v3 1/4] lib: Move redundant local helpers to lib/

2019-10-28 Thread Janusz Krzysztofik
Two tests - gem_exec_reloc and gem_softpin - define local helpers for calculation of softpin offset canonical addresses. As more users are expected, replace those local instances with a single shared one under lib/. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- lib/igt_x86.c

[Intel-gfx] [RFC PATCH i-g-t v3 4/4] tests/gem_ctx_shared: Calculate object attributs from actual page size

2019-10-28 Thread Janusz Krzysztofik
page size of actual backing store the test is running on. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/gem_ctx_shared.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c index f7852482

[Intel-gfx] [RESEND PATCH i-g-t v2 1/1] tests/i915_module_load: Use new name of fault injection module parameter

2019-10-29 Thread Janusz Krzysztofik
Name of the i915 module parameter providing fault injection function is changing for consistency with a new convention of naming i915 driver internal functions called from the driver PCI .probe entry point. Adjust the test to use the new name. Suggested-by: Joonas Lahtinen Signed-off-by: Janusz

[Intel-gfx] [RESEND PATCH i-g-t v2 0/1] tests/i915_module_load: Use new name of fault injection module parameter

2019-10-29 Thread Janusz Krzysztofik
to correctly support joint testing with a corresponding kernel driver side patch. Janusz Krzysztofik (1): tests/i915_module_load: Use new name of fault injection module parameter tests/i915/i915_module_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0

[Intel-gfx] [RESUBMIT PATCH v2 2/2] drm/i915: Rename "inject_load_failure" module parameter

2019-10-29 Thread Janusz Krzysztofik
ch to the "probe" nomenclature. Suggested-by: Joonas Lahtinen Signed-off-by: Janusz Krzysztofik Cc: Michał Wajdeczko Cc: Michał Winiarski Cc: Piotr Piórkowski Cc: Tomasz Lis Cc: Joonas Lahtinen Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_params.c | 2 +- drivers/gpu/drm/i91

[Intel-gfx] [RESUBMIT PATCH v2 1/2] drm/i915: Fix i915_inject_load_error() name to read *_probe_*

2019-10-29 Thread Janusz Krzysztofik
Suggested-by: Michał Wajdeczko Signed-off-by: Janusz Krzysztofik Cc: Michał Wajdeczko Cc: Michał Winiarski Cc: Piotr Piórkowski Cc: Tomasz Lis Cc: Joonas Lahtinen Reviewed-by: Chris Wilson --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_huc.c

[Intel-gfx] [RESUBMIT PATCH v2 0/2] drm/i915: Conclude load -> probe naming convention switch

2019-10-29 Thread Janusz Krzysztofik
essage of 2/2, there are no such (Chris), * add R-b (thanks Chris), * use correct message ID of (also rerolled) IGT counterpart to be tested with. Janusz Krzysztofik (2): drm/i915: Fix i915_inject_load_error() name to read *_probe_* drm/i915: Rename "inject_load_failure"

Re: [Intel-gfx] [PATCH i-g-t] tests/i915_module_load: Use new name of fault injection module parameter

2019-10-29 Thread Janusz Krzysztofik
Hi Chris, On Tuesday, October 29, 2019 1:49:26 PM CET Chris Wilson wrote: > From: Janusz Krzysztofik > > Name of the i915 module parameter providing fault injection function is > changing for consistency with a new convention of naming i915 driver > internal functions called from

[Intel-gfx] [RFC PATCH i-g-t v3] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-10-30 Thread Janusz Krzysztofik
rted as invalid. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/gem_exec_reloc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c index fdd9661d..1d0c791e 100644 --- a/tests/i915/gem_exec_relo

Re: [Intel-gfx] [igt-dev] [RFC PATCH i-g-t v3] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-10-31 Thread Janusz Krzysztofik
On Wednesday, October 30, 2019 10:19:43 PM CET Vanshidhar Konda wrote: > On Wed, Oct 30, 2019 at 06:15:35PM +0100, Janusz Krzysztofik wrote: > >Commit a355b2d6eb42 ("igt/gem_exec_reloc: Filter out unavailable > >addresses for !ppgtt") introduced filtering of addresses poss

[Intel-gfx] [RESEND PATCH 2/3] drm/i915: Add vfunc for pread

2019-10-31 Thread Janusz Krzysztofik
From: Matthew Auld Similar to pwrite, we need pread for (better) support of non-GTT backends. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Signed-off-by: Janusz Krzysztofik Cc: Michal Wajdeczko --- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 2 ++ drivers/gpu

[Intel-gfx] [RESEND PATCH 3/3] drm/i915/dmabuf: Implement pread() callback

2019-10-31 Thread Janusz Krzysztofik
We need dmabuf specific pread() callback utilizing dma-buf API, otherwise GEM_PREAD IOCTL will no longer work with dma-buf backed (i.e., PRIME imported) objects on hardware with no mappable aperture. Signed-off-by: Janusz Krzysztofik Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko --- drivers

[Intel-gfx] [RESEND PATCH 1/3] drm/i915/dmabuf: Implement pwrite() callback

2019-10-31 Thread Janusz Krzysztofik
We need dmabuf specific pwrite() callback utilizing dma-buf API, otherwise GEM_PWRITE IOCTL will no longer work with dma-buf backed (i.e., PRIME imported) objects on hardware with no mappable aperture. Signed-off-by: Janusz Krzysztofik Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko

[Intel-gfx] [RFC PATCH i-g-t v4 3/4] tests/gem_exec_reloc: Calculate offsets from minimum GTT alignment

2019-10-31 Thread Janusz Krzysztofik
commit message on top of the reintroduced patch that fixes invalid offsets incorrectly assumed as occupied. Signed-off-by: Janusz Krzysztofik Cc: Katarzyna Dec Cc: Stuart Summers Cc: Chris Wilson --- tests/i915/gem_exec_reloc.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions

[Intel-gfx] [RFC PATCH i-g-t v4 4/4] tests/gem_ctx_shared: Align objects using minimum GTT alignment

2019-10-31 Thread Janusz Krzysztofik
minimum GTT alignment of actual backing store the test is running on. v2: Update helper name, use 'minimum GTT alignment' term across the change, adjust variable name. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/gem_ctx_shared.c | 6 -- 1 file changed, 4

[Intel-gfx] [RFC PATCH i-g-t v4 1/4] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-10-31 Thread Janusz Krzysztofik
l significantly distort the intended test pattern. Filter out failing addresses only if not reported as invalid. v2: Skip unavailable addresses only when not running on full PPGTT. v3: Replace the not on full PPGTT requirement for skipping with error code checking. Signed-off-by: Janusz Krzyszt

[Intel-gfx] [RFC PATCH i-g-t v4 2/4] lib: Add minimum GTT alignment helper

2019-10-31 Thread Janusz Krzysztofik
the helper, use 'minimum GTT alignment' term across the change (Chris), - use error numbers to distinguish between invalid offsets and addresses occupied by other users, then - simplify the code (Chris). Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Daniele Cera

[Intel-gfx] [RFC PATCH i-g-t v4 0/4] Calculate softpin offsets from minimum GTT alignment

2019-10-31 Thread Janusz Krzysztofik
oduce former patch 1/2 as 1/4 "tests/gem_exec_reloc: Don't filter out invalid addresses" with the former not on full PPGTT requirement for skipping now replaced with error code checking. Janusz Krzysztofik (4): tests/gem_exec_reloc: Don't filter out invalid addresses

Re: [Intel-gfx] [RFC PATCH i-g-t v4 1/4] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-11-04 Thread Janusz Krzysztofik
ves it own distinct issue, that's why I think they should be kept separate. Thanks, Janusz > Vanshi > > On Thu, Oct 31, 2019 at 04:28:54PM +0100, Janusz Krzysztofik wrote: > >Commit a355b2d6eb42 ("igt/gem_exec_reloc: Filter out unavailable > >addresses for !ppgt

Re: [Intel-gfx] [RFC PATCH i-g-t v4 2/4] lib: Add minimum GTT alignment helper

2019-11-04 Thread Janusz Krzysztofik
Hi Chris, On Friday, November 1, 2019 11:08:45 AM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-10-31 15:28:55) > > Some tests assume 4kB offset alignment while using softpin. That > > assumption may be wrong on future GEM backends with possibly larger > > mini

Re: [Intel-gfx] [RFC PATCH i-g-t v4 4/4] tests/gem_ctx_shared: Align objects using minimum GTT alignment

2019-11-04 Thread Janusz Krzysztofik
Hi Chris, On Friday, November 1, 2019 10:42:18 AM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-10-31 15:28:57) > > exec-shared-gtt-* subtests use hardcoded values for object size and > > softpin offset, based on 4kB GTT alignment assumption. That may result > &

Re: [Intel-gfx] [RFC PATCH i-g-t v4 2/4] lib: Add minimum GTT alignment helper

2019-11-04 Thread Janusz Krzysztofik
On Monday, November 4, 2019 10:28:37 AM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-11-04 09:23:12) > > Hi Chris, > > > > On Friday, November 1, 2019 11:08:45 AM CET Chris Wilson wrote: > > > Quoting Janusz Krzysztofik (2019-10-31 15:28:55) > &

Re: [Intel-gfx] [RFC PATCH i-g-t v4 1/4] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-11-04 Thread Janusz Krzysztofik
Hi Chris, On Friday, November 1, 2019 11:02:45 AM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-10-31 15:28:54) > > Commit a355b2d6eb42 ("igt/gem_exec_reloc: Filter out unavailable > > addresses for !ppgtt") introduced filtering of addresses possibly >

Re: [Intel-gfx] [RFC PATCH i-g-t v4 2/4] lib: Add minimum GTT alignment helper

2019-11-04 Thread Janusz Krzysztofik
Hi Vanshi, On Thursday, October 31, 2019 5:58:31 PM CET Vanshidhar Konda wrote: > On Thu, Oct 31, 2019 at 04:28:55PM +0100, Janusz Krzysztofik wrote: > >Some tests assume 4kB offset alignment while using softpin. That > >assumption may be wrong on future GEM backends with

[Intel-gfx] [PATCH i-g-t v5 3/4] tests/gem_exec_reloc: Calculate offsets from minimum GTT alignment

2019-11-04 Thread Janusz Krzysztofik
e on top of the reintroduced patch that fixes invalid offsets incorrectly assumed as occupied. Signed-off-by: Janusz Krzysztofik Cc: Katarzyna Dec Cc: Stuart Summers Reviewed-by: Chris Wilson --- tests/i915/gem_exec_reloc.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions

[Intel-gfx] [PATCH i-g-t v5 0/4] Calculate softpin offsets from minimum GTT alignment

2019-11-04 Thread Janusz Krzysztofik
sed with the central point of the test (Chris), use object validation library helper just introduced, - name the variable 'stride', not 'alignment', it better reflects its purpose (Chris). Janusz Krzysztofik (4): lib/i915: Add minimum GTT alignment helper te

[Intel-gfx] [PATCH i-g-t v5 1/4] lib/i915: Add minimum GTT alignment helper

2019-11-04 Thread Janusz Krzysztofik
ate helper. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Stuart Summers --- lib/Makefile.sources| 2 + lib/i915/gem_gtt_topology.c | 118 lib/i915/gem_gtt_topology.h | 36 +++ lib/meson.build

[Intel-gfx] [PATCH i-g-t v5 4/4] tests/gem_ctx_shared: Align objects using minimum GTT alignment

2019-11-04 Thread Janusz Krzysztofik
minimum GTT alignment of actual backing store the test is running on. v2: Update helper name, use 'minimum GTT alignment' term across the change, adjust variable name. v3: Name the variable 'stride', not 'alignment', it better reflects its purpose (Chris). Sig

[Intel-gfx] [PATCH i-g-t v5 2/4] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-11-04 Thread Janusz Krzysztofik
object validation library helper just introduced. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/gem_exec_reloc.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c index fdd96

Re: [Intel-gfx] [RESEND PATCH 1/3] drm/i915/dmabuf: Implement pwrite() callback

2019-11-05 Thread Janusz Krzysztofik
Hi Daniel, On Tuesday, November 5, 2019 3:27:55 PM CET Daniel Vetter wrote: > On Thu, Oct 31, 2019 at 09:29:56AM +0100, Janusz Krzysztofik wrote: > > We need dmabuf specific pwrite() callback utilizing dma-buf API, > > otherwise GEM_PWRITE IOCTL will no longer work with dma-buf

[Intel-gfx] [PATCH i-g-t v5] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-11-05 Thread Janusz Krzysztofik
of 'occupied by other users' in commit description, they better correspond to the original commit being fixed as well as the comment proposed by Chris. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Vanshidhar Konda Cc: Joonas Lahtinen --- tests/i915/gem_exec

Re: [Intel-gfx] [PATCH i-g-t v5 2/4] tests/gem_exec_reloc: Don't filter out invalid addresses

2019-11-05 Thread Janusz Krzysztofik
Hi, On Monday, November 4, 2019 9:46:28 PM CET Vanshidhar Konda wrote: > On Mon, Nov 04, 2019 at 06:13:28PM +0100, Janusz Krzysztofik wrote: > >Commit a355b2d6eb42 ("igt/gem_exec_reloc: Filter out unavailable > >addresses for !ppgtt") introduced filtering of addresse

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v5 1/4] lib/i915: Add minimum GTT alignment helper

2019-11-08 Thread Janusz Krzysztofik
Hi Jonas, On Tuesday, November 5, 2019 10:14:20 AM CET Joonas Lahtinen wrote: > Quoting Janusz Krzysztofik (2019-11-04 19:13:27) > > Some tests assume 4kB offset alignment while using softpin. That > > assumption may be wrong on future GEM backends with possibly larger > &g

Re: [Intel-gfx] [RESEND PATCH 1/3] drm/i915/dmabuf: Implement pwrite() callback

2019-11-08 Thread Janusz Krzysztofik
Hi, On Tuesday, November 5, 2019 3:27:55 PM CET Daniel Vetter wrote: > On Thu, Oct 31, 2019 at 09:29:56AM +0100, Janusz Krzysztofik wrote: > > We need dmabuf specific pwrite() callback utilizing dma-buf API, > > otherwise GEM_PWRITE IOCTL will no longer work with dma-buf backed &

[Intel-gfx] [RFC PATCH] drm/i915: Suppress page allocation warnings on engine park

2020-04-02 Thread Janusz Krzysztofik
On memory constrained systems it may happen that no pages are available for serving object creation attempt during engine park. Since we can and we do ignore that failure, let's suppress possible warnings from page allocator to avoid confusion and make CI happy. Signed-off-by: Janusz Krzysz

Re: [Intel-gfx] [RFC PATCH] drm/i915: Suppress page allocation warnings on engine park

2020-04-02 Thread Janusz Krzysztofik
On Thu, 2020-04-02 at 11:21 +0100, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2020-04-02 11:19:06) > > On memory constrained systems it may happen that no pages are available > > for serving object creation attempt during engine park. Since we can > > and we do ignor

Re: [Intel-gfx] [RFC PATCH] drm/i915: Suppress page allocation warnings on engine park

2020-04-02 Thread Janusz Krzysztofik
On Thu, 2020-04-02 at 11:32 +0100, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2020-04-02 11:28:03) > > On Thu, 2020-04-02 at 11:21 +0100, Chris Wilson wrote: > > > Quoting Janusz Krzysztofik (2020-04-02 11:19:06) > > > > On memory constrained systems i

Re: [Intel-gfx] [RFC PATCH] drm/i915: Suppress page allocation warnings on engine park

2020-04-02 Thread Janusz Krzysztofik
On Thu, 2020-04-02 at 11:42 +0100, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2020-04-02 11:36:21) > > On Thu, 2020-04-02 at 11:32 +0100, Chris Wilson wrote: > > > Quoting Janusz Krzysztofik (2020-04-02 11:28:03) > > > > On Thu, 2020-04-02 at 1

Re: [Intel-gfx] [PATCH v2] drm/i915: Use per-engine request pools

2020-04-02 Thread Janusz Krzysztofik
at we never fail to park the engine due to > oom. > > v2: Only use the mempool for nonblocking allocations which are not > expected to fail. LGTM. Thanks for addressing the issue. Reviewed-by: Janusz Krzysztofik Thanks, Janusz > > Signed-off-by: Chris Wilson > Cc: Janusz K

[Intel-gfx] [PATCH i-g-t v2] lib: Fix device lists not cleaned up sufficiently before rescan

2020-04-03 Thread Janusz Krzysztofik
the list before device attributes are destroyed Signed-off-by: Janusz Krzysztofik Reviewed-by: Zbigniew Kempczyński --- lib/igt_device_scan.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c index cf7c4d951

Re: [Intel-gfx] [PATCH] drm/i915: Keep a per-engine request pools

2020-04-03 Thread Janusz Krzysztofik
oach, looks still better. Reviewed-and-Tested-by: Janusz Krzysztofik Thanks, Janusz > > Signed-off-by: Chris Wilson > Cc: Janusz Krzysztofik > Cc: Tvrtko Ursulin > --- > drivers/gpu/drm/i915/gt/intel_engine_cs.c| 7 + > drivers/gpu/drm/i915/gt/intel_en

[Intel-gfx] [PATCH i-g-t 1/2] tests/gem_userptr_blits: Refresh readonly-mmap-unsync exercise

2020-04-06 Thread Janusz Krzysztofik
Upgrade the subtest to use MMAP_GTT API v4 (aka MMAP_OFFSET), dynamically examine each mapping type supported by i915 driver. Signed-off-by: Janusz Krzysztofik Reviewed-by: Zbigniew Kempczyński --- tests/i915/gem_userptr_blits.c | 21 - 1 file changed, 16 insertions(+), 5

[Intel-gfx] [PATCH i-g-t v2 0/2] tests/gem_userptr_blits: Refresh still MMAP_GTT dependent subtests

2020-04-06 Thread Janusz Krzysztofik
Refresh subtests which are still using pre-v4 MMAP_GTT API. v2: Patch 2/2: clear 'map' before reuse (Zbigniew). Janusz Krzysztofik (2): tests/gem_userptr_blits: Refresh readonly-mmap-unsync exercise tests/gem_userptr_blits: Refresh other still MMAP_GTT dependent subtests

[Intel-gfx] [PATCH i-g-t v2 2/2] tests/gem_userptr_blits: Refresh other still MMAP_GTT dependent subtests

2020-04-06 Thread Janusz Krzysztofik
type if there are any. v2: Clear 'map' before reuse (Zbigniew). Signed-off-by: Janusz Krzysztofik Reviewed-by: Zbigniew Kempczyński --- tests/i915/gem_userptr_blits.c | 111 - 1 file changed, 81 insertions(+), 30 deletions(-) diff --git a/

[Intel-gfx] [PATCH i-g-t v12] tests: Add a test for device hot unplug

2020-04-08 Thread Janusz Krzysztofik
From: Janusz Krzysztofik There is a test which verifies unloading of i915 driver module but no test exists that checks how a driver behaves when it gets unbound from a device or when the device gets unplugged. Implement such test using sysfs interface. Two minimalistic subtests - "u

[Intel-gfx] [PATCH i-g-t v13] tests: Add a test for device hot unplug

2020-04-09 Thread Janusz Krzysztofik
From: Janusz Krzysztofik There is a test which verifies unloading of i915 driver module but no test exists that checks how a driver behaves when it gets unbound from a device or when the device gets unplugged. Implement such test using sysfs interface. Two minimalistic subtests - "u

[Intel-gfx] [PATCH i-g-t 1/2] tests/gem_userptr_blits: Refresh readonly-mmap-unsync exercise

2020-04-09 Thread Janusz Krzysztofik
Upgrade the subtest to use MMAP_GTT API v4 (aka MMAP_OFFSET), dynamically examine each mapping type supported by i915 driver. Signed-off-by: Janusz Krzysztofik Reviewed-by: Zbigniew Kempczyński --- tests/i915/gem_userptr_blits.c | 21 - 1 file changed, 16 insertions(+), 5

[Intel-gfx] [PATCH i-g-t v3 2/2] tests/gem_userptr_blits: Refresh other still MMAP_GTT dependent subtests

2020-04-09 Thread Janusz Krzysztofik
type if there are any. v2: Clear 'map' before reuse (Zbigniew). v3: Kill out-of-context errno check (Chris). Signed-off-by: Janusz Krzysztofik Reviewed-by: Zbigniew Kempczyński Cc: Chris Wilson --- tests/i915/gem_userptr_blits.c | 111 - 1 file c

[Intel-gfx] [PATCH i-g-t v3 0/2] tests/gem_userptr_blits: Refresh still MMAP_GTT dependent subtests

2020-04-09 Thread Janusz Krzysztofik
Refresh subtests which are still using pre-v4 MMAP_GTT API. v2: Patch 2/2: clear 'map' before reuse (Zbigniew). v3: Patch 2/2: kill out-of-context errno check (Chris). Janusz Krzysztofik (2): tests/gem_userptr_blits: Refresh readonly-mmap-unsync exercise tests/gem_userptr_blit

[Intel-gfx] [PATCH i-g-t v14] tests: Add a test for device hot unplug

2020-04-14 Thread Janusz Krzysztofik
From: Janusz Krzysztofik There is a test which verifies unloading of i915 driver module but no test exists that checks how a driver behaves when it gets unbound from a device or when the device gets unplugged. Implement such test using sysfs interface. Two minimalistic subtests - "u

[Intel-gfx] [PATCH i-g-t v15] tests: Add a test for device hot unplug

2020-04-15 Thread Janusz Krzysztofik
From: Janusz Krzysztofik There is a test which verifies unloading of i915 driver module but no test exists that checks how a driver behaves when it gets unbound from a device or when the device gets unplugged. Implement such test using sysfs interface. Two minimalistic subtests - "u

[Intel-gfx] [PATCH i-g-t v16] tests: Add a test for device hot unplug

2020-04-16 Thread Janusz Krzysztofik
From: Janusz Krzysztofik There is a test which verifies unloading of i915 driver module but no test exists that checks how a driver behaves when it gets unbound from a device or when the device gets unplugged. Implement such test using sysfs interface. Two minimalistic subtests - "u

Re: [Intel-gfx] Shutdown hooks

2019-05-17 Thread Janusz Krzysztofik
On Thursday, May 16, 2019 8:20:18 AM CEST Janusz Krzysztofik wrote: > On Wednesday, May 15, 2019 5:00:40 PM CEST Chris Wilson wrote: > > Janus, some old patches that may be of use for shutdown prior to kexec. > > -Chris > > Hi Chris, > > Thanks for sharing. >

[Intel-gfx] [RFC PATCH] drm/i915: Tolerate file owned GEM contexts on hot unbind

2019-05-17 Thread Janusz Krzysztofik
From: Janusz Krzysztofik During i915_driver_unload(), GEM contexts are verified restrictively inside i915_gem_fini() if they don't consume shared resources which should be cleaned up before the driver is released. If those checks don't result in kernel panic, one more check is perfor

Re: [Intel-gfx] [RFC PATCH] drm/i915: Tolerate file owned GEM contexts on hot unbind

2019-05-20 Thread Janusz Krzysztofik
On Friday, May 17, 2019 4:32:35 PM CEST Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-05-17 15:06:17) > > From: Janusz Krzysztofik > > > > During i915_driver_unload(), GEM contexts are verified restrictively > > inside i915_gem_fini() if they don'

[Intel-gfx] [RFC PATCH 1/1] drm/i915: Split off pci_driver.remove() tail to drm_driver.release()

2019-05-30 Thread Janusz Krzysztofik
as soon as all references to the driver are put. As a result, those cleanups will be now run on last drm_dev_put(), either still called from pci_driver.remove() if all device file descriptors are already closed, or on last drm_release() file operation. Signed-off-by: Janusz Krzysztofik

[Intel-gfx] [RFC PATCH 0/1] drm/i915: Split off pci_driver.remove() tail to drm_driver.release()

2019-05-30 Thread Janusz Krzysztofik
river unbind. Thanks, Janusz Janusz Krzysztofik (1): drm/i915: Split off pci_driver.remove() tail to drm_driver.release() drivers/gpu/drm/i915/i915_drv.c | 17 + drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 10 +- 3 files changed, 23 insertions(

<    1   2   3   4   5   6   7   8   9   >