Re: [Intel-gfx] [PATCH] drm/i915: Avoid potential vm use-after-free

2023-01-27 Thread Matthew Auld
> which changed significantly how this works, perhaps there is something > still somewhat easily retrievable from your memory lanes to help with this? Sorry for the delay. Fix looks good to me, Reviewed-by: Matthew Auld Looking at the git history, the fixes tag I think needs to be: Fixes: 9e

[Intel-gfx] [PATCH i-g-t] i915/gem_ppgtt: Terminate batch for evict-vs-shrink*

2023-01-27 Thread Matthew Auld
y GTT eviction with contended locks") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld --- tests/i915/gem_ppgtt.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppg

Re: [Intel-gfx] [PATCH 2/2] drm/ttm: revert "stop allocating dummy resources during BO creation"

2023-01-25 Thread Matthew Auld
On Wed, 25 Jan 2023 at 16:15, Christian König wrote: > > Am 25.01.23 um 17:13 schrieb Matthew Auld: > > On Wed, 25 Jan 2023 at 15:50, Christian König > > wrote: > >> This reverts commit 00984ad39599bb2a1e6ec5d4e9c75a749f7f45c9. > >> > >> It seems to

Re: [Intel-gfx] [PATCH 2/2] drm/ttm: revert "stop allocating dummy resources during BO creation"

2023-01-25 Thread Matthew Auld
On Wed, 25 Jan 2023 at 15:50, Christian König wrote: > > This reverts commit 00984ad39599bb2a1e6ec5d4e9c75a749f7f45c9. > > It seems to still breka i915. We also need to revert the third patch: b49323aa35d5 drm/ttm: prevent moving of pinned BOs It introduces the side effect of no longer calling

Re: [Intel-gfx] [PATCH 1/5] drm/i915: audit bo->resource usage v3

2023-01-25 Thread Matthew Auld
On Wed, 25 Jan 2023 at 14:20, Christian König wrote: > > Am 25.01.23 um 13:53 schrieb Matthew Auld: > > On Wed, 25 Jan 2023 at 11:35, Christian König > > wrote: > >> Am 25.01.23 um 11:21 schrieb Matthew Auld: > >>> On Wed, 25 Jan 2023 at 10:07, Christian Kö

Re: [Intel-gfx] [PATCH 1/5] drm/i915: audit bo->resource usage v3

2023-01-25 Thread Matthew Auld
On Wed, 25 Jan 2023 at 11:35, Christian König wrote: > > Am 25.01.23 um 11:21 schrieb Matthew Auld: > > On Wed, 25 Jan 2023 at 10:07, Christian König > > wrote: > >> Am 25.01.23 um 10:56 schrieb Matthew Auld: > >>> On Tue, 24 Jan 2023 at 17:15, Matthew A

Re: [Intel-gfx] [PATCH 1/5] drm/i915: audit bo->resource usage v3

2023-01-25 Thread Matthew Auld
On Wed, 25 Jan 2023 at 10:07, Christian König wrote: > > > > Am 25.01.23 um 10:56 schrieb Matthew Auld: > > On Tue, 24 Jan 2023 at 17:15, Matthew Auld > > wrote: > >> On Tue, 24 Jan 2023 at 13:48, Matthew Auld > >> wrote: > >>> On T

Re: [Intel-gfx] [PATCH 1/5] drm/i915: audit bo->resource usage v3

2023-01-25 Thread Matthew Auld
On Tue, 24 Jan 2023 at 17:15, Matthew Auld wrote: > > On Tue, 24 Jan 2023 at 13:48, Matthew Auld > wrote: > > > > On Tue, 24 Jan 2023 at 12:57, Christian König > > wrote: > > > > > > From: Christian König > > > > > > Make sure

Re: [Intel-gfx] [PATCH 1/5] drm/i915: audit bo->resource usage v3

2023-01-24 Thread Matthew Auld
On Tue, 24 Jan 2023 at 13:48, Matthew Auld wrote: > > On Tue, 24 Jan 2023 at 12:57, Christian König > wrote: > > > > From: Christian König > > > > Make sure we can at least move and alloc TT objects without backing store. > > > > v2: clear the

Re: [Intel-gfx] [PATCH 5/5] drm/ttm: replace busy placement with flags v2

2023-01-24 Thread Matthew Auld
hould this not be something like: non_busy = domain; domain |= busy; if (domain & VRAM) { if (non_busy & VRAM) flags = 0 else flags = FLAG_BUSY } Otherwise if VRAM is set in both "busy" and "domain", it will only try VRAM when all non-busy first fails, which looks like a change in behaviour? The rest of the patch looks good to me, so with the above fixed or explained, Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 4/5] drm/ttm: prevent moving of pinned BOs

2023-01-24 Thread Matthew Auld
ecessary > any more after removing the extra checks in vmwgfx. > > Signed-off-by: Christian König Idea seems reasonable to me, Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 3/5] drm/ttm: stop allocating a dummy resource for pipelined gutting

2023-01-24 Thread Matthew Auld
On Tue, 24 Jan 2023 at 12:57, Christian König wrote: > > That should not be necessary any more when drivers should at least be > able to handle a move without a resource. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 2/5] drm/ttm: stop allocating dummy resources during BO creation

2023-01-24 Thread Matthew Auld
On Tue, 24 Jan 2023 at 12:57, Christian König wrote: > > That should not be necessary any more when drivers should at least be > able to handle the move without a resource. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 1/5] drm/i915: audit bo->resource usage v3

2023-01-24 Thread Matthew Auld
t; Signed-off-by: Christian König Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 1/2] drm/ttm: prevent moving of pinned BOs

2023-01-24 Thread Matthew Auld
On Tue, 24 Jan 2023 at 09:51, Christian König wrote: > > Am 11.01.23 um 14:17 schrieb Matthew Auld: > > On Wed, 11 Jan 2023 at 11:43, Christian König > > wrote: > >> We have checks for this in the individual drivers move callback, but > >> it's prob

Re: [Intel-gfx] [PATCH v10 22/23] drm/i915/vm_bind: Properly build persistent map sg table

2023-01-18 Thread Matthew Auld
offset = 0; + if (!length) + break; + } + WARN_ON_ONCE(length); + + return nents; +} + +static noinline struct sg_table * Not sure why this noinline is needed here? Reviewed-by: Matthew Auld +intel_persistent_partial_pages(const

Re: [Intel-gfx] [PATCH v10 23/23] drm/i915/vm_bind: Support capture of persistent mappings

2023-01-18 Thread Matthew Auld
On 18/01/2023 07:16, Niranjana Vishwanathapura wrote: Support dump capture of persistent mappings upon user request. Capture of a mapping is requested with the VM_BIND ioctl and processed during the GPU error handling. They are synchronously unbound during eviction so that no additional vma reso

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-13 Thread Matthew Auld
On 13/01/2023 12:02, Das, Nirmoy wrote: Thanks Matt, I missed the Fixes tag so resent it with fixes and Cc to stable. I don't think kernel selftests are really stable material. AFAIK it's not something normal users care about. On 1/13/2023 12:51 PM, Matthew Auld wrote: On 13/

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-13 Thread Matthew Auld
On 13/01/2023 11:49, Nirmoy Das wrote: From: Chris Wilson Make sure that upon error after we have acquired the wakeref we do release it again. Signed-off-by: Chris Wilson Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 2/2] drm/ttm: replace busy placement with flags

2023-01-11 Thread Matthew Auld
On Wed, 11 Jan 2023 at 14:43, Christian König wrote: > > Am 11.01.23 um 14:03 schrieb Matthew Auld: > > On Wed, 11 Jan 2023 at 11:43, Christian König > > wrote: > >> Instead of a list of separate busy placement add flags which indicate > >> that a placement sh

Re: [Intel-gfx] [PATCH 1/2] drm/ttm: prevent moving of pinned BOs

2023-01-11 Thread Matthew Auld
On Wed, 11 Jan 2023 at 11:43, Christian König wrote: > > We have checks for this in the individual drivers move callback, but > it's probably better to generally forbit that on a higher level. > > Also stops exporting ttm_resource_compat() since that's not necessary > any more after removing the e

Re: [Intel-gfx] [PATCH 2/2] drm/ttm: replace busy placement with flags

2023-01-11 Thread Matthew Auld
On Wed, 11 Jan 2023 at 11:43, Christian König wrote: > > Instead of a list of separate busy placement add flags which indicate > that a placement should only be used when there is room or if we need to > evict. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

Re: [Intel-gfx] [PATCH] drm: Alloc high address for drm buddy topdown flag

2023-01-10 Thread Matthew Auld
On 10/01/2023 12:02, Matthew Auld wrote: On 07/01/2023 15:15, Arunpravin Paneer Selvam wrote: As we are observing low numbers in viewperf graphics benchmark, we are strictly not allowing the top down flag enabled allocations to steal the memory space from cpu visible region. The approach is

Re: [Intel-gfx] [PATCH] drm: Alloc high address for drm buddy topdown flag

2023-01-10 Thread Matthew Auld
On 07/01/2023 15:15, Arunpravin Paneer Selvam wrote: As we are observing low numbers in viewperf graphics benchmark, we are strictly not allowing the top down flag enabled allocations to steal the memory space from cpu visible region. The approach is, we are sorting each order list entries in as

Re: [Intel-gfx] [PATCH] drm/i915: Reserve enough fence slot for i915_vma_unbind_async

2023-01-05 Thread Matthew Auld
nc() > dma_resv_add_fence() from -->ttm_bo_move_accel_cleanup() > > Resolve this by adding an extra fence in i915_vma_unbind_async(). > > Suggested-by: Thomas Hellström > Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Does this need a fixes tag? Fixes: 2f6b90da9192 ("

[Intel-gfx] [PATCH i-g-t v4] tests/i915/gem_ppgtt: verify GTT eviction with contended locks

2023-01-04 Thread Matthew Auld
. v2: - Add coverage for explicit softpin - Add timeout for the spinner v3: - Improve the test description v4: (Nirmoy) - We only need one handle2 - Prefer NSEC_PER_SEC References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc

[Intel-gfx] [PATCH] drm/i915/ttm: remove the virtualized start hack

2022-12-20 Thread Matthew Auld
kes care of this for us. Signed-off-by: Matthew Auld Cc: Nirmoy Das Cc: Andrzej Hajda --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c in

[Intel-gfx] [PATCH i-g-t v3] tests/i915/gem_ppgtt: verify GTT eviction with contended locks

2022-12-20 Thread Matthew Auld
. v2: - Add coverage for explicit softpin - Add timeout for the spinner v3: - Improve the test description References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: Mani Milani --- tests/i915/gem_ppgtt.c | 133

Re: [Intel-gfx] [PATCH v2] drm/i915: improve the catch-all evict to handle lock contention

2022-12-19 Thread Matthew Auld
On Sun, 18 Dec 2022 at 23:50, Mani Milani wrote: > > Thank you for updating the docs Matthew. I am looking forward to this > patch landing. Pushed to drm-intel-gt-next. Thanks for the reviews. > > On Fri, Dec 16, 2022 at 10:35 PM Matthew Auld wrote: > > > > The catc

Re: [Intel-gfx] [PATCH] drm/i915: Use helper func to find out map type

2022-12-16 Thread Matthew Auld
On 16/12/2022 15:27, Nirmoy Das wrote: Use i915_coherent_map_type() function to find out map_type of the shmem obj. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/shmem_utils.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/shmem_uti

[Intel-gfx] [PATCH v2] drm/i915: improve the catch-all evict to handle lock contention

2022-12-16 Thread Matthew Auld
intel/-/issues/7570 References: https://bugzilla.mozilla.org/show_bug.cgi?id=1779558 Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: Tvrtko Ursulin Cc: Andrzej Hajda Cc: Mani Milani Cc: # v5.18+ Reviewed-by: Mani Milani Tested-by: Mani Milani --- .

Re: [Intel-gfx] [PATCH] drm/i915: improve the catch-all evict to handle lock contention

2022-12-14 Thread Matthew Auld
at 3:11 AM Matthew Auld wrote: The catch-all evict can fail due to object lock contention, since it only goes as far as trylocking the object, due to us already holding the vm->mutex. Doing a full object lock here can deadlock, since the vm->mutex is always our inner lock. Add another ex

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Remove hardcoded value with a macro

2022-12-13 Thread Matthew Auld
On 13/12/2022 12:00, Nirmoy Das wrote: Use MI_USE_GGTT instead of hardcoded value. Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH v9 23/23] drm/i915/vm_bind: Support capture of persistent mappings

2022-12-13 Thread Matthew Auld
On 12/12/2022 23:15, Niranjana Vishwanathapura wrote: Support dump capture of persistent mappings upon user request. Capture of a mapping is requested with the VM_BIND ioctl and processed during the GPU error handling, thus not adding any additional latency to the submission path. A list of per

Re: [Intel-gfx] [PATCH v8 21/22] drm/i915/vm_bind: Properly build persistent map sg table

2022-12-12 Thread Matthew Auld
On 29/11/2022 07:26, Niranjana Vishwanathapura wrote: Properly build the sg table for persistent mapping which can be partial map of the underlying object. Ensure the sg pages are properly set for page backed regions. The dump capture support requires this for page backed regions. Signed-off-by:

[Intel-gfx] [PATCH 2/2] drm/i915/ttm: consider CCS for backup objects

2022-12-12 Thread Matthew Auld
rning from suspend. Fixes: da0595ae91da ("drm/i915/migrate: Evict and restore the flatccs capable lmem obj") Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Shuicheng Lin Cc: # v5.19+ --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +++

[Intel-gfx] [PATCH 1/2] drm/i915/migrate: fix corner case in CCS aux copying

2022-12-12 Thread Matthew Auld
the surface. Fixes: e3afc690188b ("drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers") Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Shuicheng Lin --- drivers/gpu/drm/i915/gt/intel_migrate.c | 37 +++-- 1 fil

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v6,1/3] drm/i915/migrate: Account for the reserved_space

2022-12-08 Thread Matthew Auld
On 02/12/2022 14:06, Patchwork wrote: *Patch Details* *Series:* series starting with [v6,1/3] drm/i915/migrate: Account for the reserved_space *URL:* https://patchwork.freedesktop.org/series/111583/ *State:*failure *Details:* https://

[Intel-gfx] [PATCH i-g-t v3 1/2] lib/dmabuf_sync_file: move common stuff into lib

2022-12-07 Thread Matthew Auld
So we can use this across different tests. v2 - Add docs for everything (Petri) - Add missing copyright and fix headers slightly (Kamil) v3: - Just return true/false, for the has() family of functions, instead of tripping up an assert() (Kamil) Signed-off-by: Matthew Auld Cc: Kamil

[Intel-gfx] [PATCH i-g-t v3 2/2] tests/i915/gem_exec_balancer: exercise dmabuf import

2022-12-07 Thread Matthew Auld
/drm/intel/-/issues/7532 Signed-off-by: Matthew Auld Cc: Kamil Konieczny Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andrzej Hajda --- tests/i915/gem_exec_balancer.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915

[Intel-gfx] [PATCH] drm/i915/migrate: fix corner case in CCS aux copying

2022-12-07 Thread Matthew Auld
the surface. Fixes: e3afc690188b ("drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers") Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Shuicheng Lin --- drivers/gpu/drm/i915/gt/intel_migrate.c | 37 +++-- 1 fil

Re: [Intel-gfx] [PATCH 7/9] drm/i915: stop using ttm_bo_wait

2022-12-06 Thread Matthew Auld
On 05/12/2022 19:58, Christian König wrote: Am 30.11.22 um 15:06 schrieb Daniel Vetter: On Wed, 30 Nov 2022 at 14:03, Tvrtko Ursulin wrote: On 29/11/2022 18:05, Matthew Auld wrote: On Fri, 25 Nov 2022 at 11:14, Tvrtko Ursulin wrote: + Matt On 25/11/2022 10:21, Christian König wrote: TTM

Re: [Intel-gfx] [PATCH v8 22/22] drm/i915/vm_bind: Support capture of persistent mappings

2022-12-06 Thread Matthew Auld
On 01/12/2022 18:43, Niranjana Vishwanathapura wrote: On Thu, Dec 01, 2022 at 07:27:31AM -0800, Niranjana Vishwanathapura wrote: On Thu, Dec 01, 2022 at 10:49:15AM +, Matthew Auld wrote: On 29/11/2022 07:26, Niranjana Vishwanathapura wrote: Support dump capture of persistent mappings upon

Re: [Intel-gfx] [PATCH v2 4/4] drm/i915/mtl/UAPI: Disable GET/SET_CACHING IOCTL for MTL+

2022-12-06 Thread Matthew Auld
On Tue, 6 Dec 2022 at 08:13, Aravind Iddamsetty wrote: > > From: Pallavi Mishra > > It's a noop on all new platforms starting from MTL. > Refer: (e7737b67ab46) drm/i915/uapi: reject caching ioctls for discrete > > v2: > 1. block get caching ioctl > 2. return ENODEV similar to DGFX > 3. update the

[Intel-gfx] [PATCH] drm/i915: improve the catch-all evict to handle lock contention

2022-12-06 Thread Matthew Auld
org/show_bug.cgi?id=1779558 Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: Tvrtko Ursulin Cc: Andrzej Hajda Cc: Mani Milani Cc: # v5.18+ --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 25 +++-- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- d

Re: [Intel-gfx] [PATCH i-g-t v2 1/2] lib/dmabuf_sync_file: move common stuff into lib

2022-12-05 Thread Matthew Auld
On 05/12/2022 16:31, Kamil Konieczny wrote: Hi Matt, after re-reading I have few more nits. On 2022-12-02 at 12:02:41 +, Matthew Auld wrote: So we can use this across different tests. v2 - Add docs for everything (Petri) - Add missing copyright and fix headers slightly (Kamil

[Intel-gfx] [PATCH v6 2/3] drm/i915/selftests: use live_subtests for live_migrate

2022-12-02 Thread Matthew Auld
Probably a good idea to do an igt_flush_test() at the end of each subtest, just to be sure the previous work has been flushed and doesn't somehow interfere with the current subtest. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Nirmoy Das --- driver

[Intel-gfx] [PATCH v6 3/3] drm/i915/selftests: exercise emit_pte() with nearly full ring

2022-12-02 Thread Matthew Auld
s: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_migrate.c| 6 +- drivers/gpu/drm/i915/gt/selftest_migrate.c | 145 + 2 files changed, 149 insertio

[Intel-gfx] [PATCH v6 1/3] drm/i915/migrate: Account for the reserved_space

2022-12-02 Thread Matthew Auld
.org/drm/intel/-/issues/6889 Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Andi Shyti Cc: Nirmoy Das Cc: # v5.15+ Tested-by: Nirmoy Das Reviewed-by: Nirmoy Das --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH i-g-t v2 1/2] lib/dmabuf_sync_file: move common stuff into lib

2022-12-02 Thread Matthew Auld
So we can use this across different tests. v2 - Add docs for everything (Petri) - Add missing copyright and fix headers slightly (Kamil) Signed-off-by: Matthew Auld Cc: Kamil Konieczny Cc: Petri Latvala Cc: Andrzej Hajda Cc: Nirmoy Das --- .../igt-gpu-tools/igt-gpu-tools-docs.xml

[Intel-gfx] [PATCH i-g-t v2 2/2] tests/i915/gem_exec_balancer: exercise dmabuf import

2022-12-02 Thread Matthew Auld
/drm/intel/-/issues/7532 Signed-off-by: Matthew Auld Cc: Kamil Konieczny Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andrzej Hajda --- tests/i915/gem_exec_balancer.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915

[Intel-gfx] [PATCH v5 3/3] drm/i915/selftests: exercise emit_pte() with nearly full ring

2022-12-02 Thread Matthew Auld
s: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_migrate.c| 6 +- drivers/gpu/drm/i915/gt/selftest_migrate.c | 145 + 2 files changed, 149 insertio

[Intel-gfx] [PATCH v5 2/3] drm/i915/selftests: use live_subtests for live_migrate

2022-12-02 Thread Matthew Auld
Probably a good idea to do an igt_flush_test() at the end of each subtest, just to be sure the previous work has been flushed and doesn't somehow interfere with the current subtest. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Nirmoy Das --- driver

[Intel-gfx] [PATCH v5 1/3] drm/i915/migrate: Account for the reserved_space

2022-12-02 Thread Matthew Auld
: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Andi Shyti Cc: Nirmoy Das Cc: # v5.15+ Tested-by: Nirmoy Das Reviewed-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_migrate.c | 16

[Intel-gfx] [PATCH i-g-t 2/2] tests/i915/gem_exec_balancer: exercise dmabuf import

2022-12-01 Thread Matthew Auld
/drm/intel/-/issues/7532 Signed-off-by: Matthew Auld Cc: Kamil Konieczny Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andrzej Hajda --- tests/i915/gem_exec_balancer.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915

[Intel-gfx] [PATCH i-g-t 1/2] lib/dmabuf_sync_file: move common stuff into lib

2022-12-01 Thread Matthew Auld
So we can use this across different tests. Signed-off-by: Matthew Auld Cc: Kamil Konieczny Cc: Andrzej Hajda Cc: Nirmoy Das --- lib/dmabuf_sync_file.c | 138 +++ lib/dmabuf_sync_file.h | 19 ++ lib/meson.build | 1 + tests

Re: [Intel-gfx] [PATCH v8 22/22] drm/i915/vm_bind: Support capture of persistent mappings

2022-12-01 Thread Matthew Auld
On 29/11/2022 07:26, Niranjana Vishwanathapura wrote: Support dump capture of persistent mappings upon user request. Signed-off-by: Brian Welty Signed-off-by: Niranjana Vishwanathapura --- .../drm/i915/gem/i915_gem_vm_bind_object.c| 11 +++ drivers/gpu/drm/i915/gt/intel_gtt.c

Re: [Intel-gfx] [PATCH v7 20/20] drm/i915/vm_bind: Async vm_unbind support

2022-12-01 Thread Matthew Auld
On 29/11/2022 23:26, Niranjana Vishwanathapura wrote: On Wed, Nov 23, 2022 at 11:42:58AM +, Matthew Auld wrote: On 16/11/2022 00:37, Niranjana Vishwanathapura wrote: On Tue, Nov 15, 2022 at 03:15:03PM -0800, Niranjana Vishwanathapura wrote: On Tue, Nov 15, 2022 at 08:33:47AM -0800

Re: [Intel-gfx] [PATCH 7/9] drm/i915: stop using ttm_bo_wait

2022-11-29 Thread Matthew Auld
On Fri, 25 Nov 2022 at 11:14, Tvrtko Ursulin wrote: > > > + Matt > > On 25/11/2022 10:21, Christian König wrote: > > TTM is just wrapping core DMA functionality here, remove the mid-layer. > > No functional change. > > > > Signed-off-by: Christian König > > --- > > drivers/gpu/drm/i915/gem/i915

[Intel-gfx] [PATCH v4 3/3] drm/i915/selftests: exercise emit_pte() with nearly full ring

2022-11-24 Thread Matthew Auld
add some debug logging. v4: Fix the min request construction to account for reserved_space + I915_EMIT_PTE_NUM_DWORDS References: https://gitlab.freedesktop.org/drm/intel/-/issues/7535 References: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Signed-off-by: Matthew Auld Cc: Chris Wi

[Intel-gfx] [PATCH v4 2/3] drm/i915/selftests: use live_subtests for live_migrate

2022-11-24 Thread Matthew Auld
Probably a good idea to do an igt_flush_test() at the end of each subtest, just to be sure the previous work has been flushed and doesn't somehow interfere with the current subtest. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Nirmoy Das --- driver

[Intel-gfx] [PATCH v4 1/3] drm/i915/migrate: Account for the reserved_space

2022-11-24 Thread Matthew Auld
: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Andi Shyti Cc: Nirmoy Das Cc: # v5.15+ Tested-by: Nirmoy Das Reviewed-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_migrate.c | 16

[Intel-gfx] [PATCH i-g-t v2] tests/i915/gem_ppgtt: verify GTT eviction with contended locks

2022-11-23 Thread Matthew Auld
. v2: - Add coverage for explicit softpin - Add timeout for the spinner References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das --- tests/i915/gem_ppgtt.c | 120 + 1 file changed

Re: [Intel-gfx] [PATCH v7 20/20] drm/i915/vm_bind: Async vm_unbind support

2022-11-23 Thread Matthew Auld
On 16/11/2022 00:37, Niranjana Vishwanathapura wrote: On Tue, Nov 15, 2022 at 03:15:03PM -0800, Niranjana Vishwanathapura wrote: On Tue, Nov 15, 2022 at 08:33:47AM -0800, Niranjana Vishwanathapura wrote: On Tue, Nov 15, 2022 at 04:20:54PM +, Matthew Auld wrote: On 15/11/2022 16:15

[Intel-gfx] [PATCH i-g-t] tests/i915/gem_shrink: verify GTT eviction with contended locks

2022-11-22 Thread Matthew Auld
. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das --- tests/i915/gem_shrink.c | 107 1 file changed, 107 insertions(+) diff --git a/tests/i915/gem_shrink.c b/tests/i915

[Intel-gfx] [PATCH v3 1/2] drm/i915/migrate: Account for the reserved_space

2022-11-21 Thread Matthew Auld
: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: # v5.15+ Tested-by: Nirmoy Das Reviewed-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_migrate.c | 16 1 file chan

[Intel-gfx] [PATCH v3 2/2] drm/i915/selftests: exercise emit_pte() with nearly full ring

2022-11-21 Thread Matthew Auld
add some debug logging. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7535 References: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andrzej Hajda Cc: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_migrate.c| 6 +-

[Intel-gfx] [PATCH i-g-t v2] tests/i915/gem_lmem_evict: verify async eviction with madvise

2022-11-21 Thread Matthew Auld
Simple regression test for lmem to check if an in-progress async unbind and eviction is syncronised with discarding the pages when marking the object as DONTNEED. v2: Convert into new test to avoid damaging other test when forcing the lmem_size and unloading the driver. Signed-off-by: Matthew

[Intel-gfx] [PATCH i-g-t] tests/i915/gem_exec_balancer: exercise dmabuf import

2022-11-18 Thread Matthew Auld
With parallel submission it should be easy to get a fence array as the output fence. Try importing this into dma-buf reservation object, to see if anything explodes. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7532 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das

[Intel-gfx] [PATCH v2 2/2] drm/i915/selftests: exercise emit_pte() with nearly full ring

2022-11-18 Thread Matthew Auld
-/issues/6889 Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andrzej Hajda Cc: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_migrate.c| 6 +- drivers/gpu/drm/i915/gt/selftest_migrate.c | 152 + 2 files changed, 156 insertions(+), 2 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH v2 1/2] drm/i915/migrate: Account for the reserved_space

2022-11-18 Thread Matthew Auld
: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: # v5.15+ --- drivers/gpu/drm/i915/gt/intel_migrate.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a

[Intel-gfx] [PATCH 1/2] drm/i915/migrate: Account for the reserved_space

2022-11-18 Thread Matthew Auld
: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: # v5.15+ --- drivers/gpu/drm/i915/gt/intel_migrate.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a

[Intel-gfx] [PATCH 2/2] drm/i915/selftests: exercise emit_pte() with nearly full ring

2022-11-18 Thread Matthew Auld
Simple regression test to check that we don't trample the rq->reserved_space when returning from emit_pte(), if the ring is nearly full. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7535 References: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Signed-off-by:

Re: [Intel-gfx] [PATCH 1/2] drm/print: Add drm_dbg_ratelimited

2022-11-17 Thread Matthew Auld
On Thu, 13 Oct 2022 at 09:40, Nirmoy Das wrote: > > Add a function for ratelimitted debug print. > > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > Signed-off-by: Nirmoy Das Reviewed-by: Matthew

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Ratelimit debug log in vm_fault_ttm

2022-11-17 Thread Matthew Auld
On 13/10/2022 09:40, Nirmoy Das wrote: Test like i915_gem_mman_live_selftests/igt_mmap_migrate can cause dmesg spamming. Use ratelimit api to reduce log rate. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7038 Cc: Matthew Auld Signed-off-by: Nirmoy Das Reviewed-by: Matthew

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: call i915_request_await_object from _i915_vma_move_to_active

2022-11-16 Thread Matthew Auld
On 15/11/2022 18:13, Andrzej Hajda wrote: On 08.11.2022 11:24, Matthew Auld wrote: On 19/10/2022 22:59, Andrzej Hajda wrote: Since almost all calls to i915_vma_move_to_active are prepended with i915_request_await_object, let's call the latter from _i915_vma_move_to_active by default an

Re: [Intel-gfx] [PATCH v7 20/20] drm/i915/vm_bind: Async vm_unbind support

2022-11-15 Thread Matthew Auld
On 15/11/2022 16:15, Niranjana Vishwanathapura wrote: On Tue, Nov 15, 2022 at 11:05:21AM +, Matthew Auld wrote: On 13/11/2022 07:57, Niranjana Vishwanathapura wrote: Asynchronously unbind the vma upon vm_unbind call. Fall back to synchronous unbind if backend doesn't support async u

Re: [Intel-gfx] [PATCH v7 20/20] drm/i915/vm_bind: Async vm_unbind support

2022-11-15 Thread Matthew Auld
g and user need not try to sequence any operation with the unbind completion. v2: use i915_vma_destroy_async in vm_unbind ioctl Signed-off-by: Niranjana Vishwanathapura This only does it for non-partial vma, right? Or was that changed somewhere? Reviewed-by: Matthew Auld --- .../drm/i91

[Intel-gfx] [PATCH v2] drm/i915/ttm: never purge busy objects

2022-11-15 Thread Matthew Auld
se: igt@gem_madvise@dontneed-evict-race Fixes: 213d50927763 ("drm/i915/ttm: Introduce a TTM i915 gem object backend") Reported-by: Niranjana Vishwanathapura Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: # v5.15+ Reviewed-by: Niranjana Vishwanathapura --- drivers/gp

[Intel-gfx] [PATCH i-g-t] tests/i915/madvise: verify async eviction with madvise

2022-11-15 Thread Matthew Auld
Simple regression test for lmem to check if an in-progress async unbind and eviction is syncronised with discarding the pages when marking the object as DONTNEED. Signed-off-by: Matthew Auld Cc: Niranjana Vishwanathapura Cc: Andrzej Hajda Cc: Nirmoy Das --- tests/i915/gem_madvise.c | 130

Re: [Intel-gfx] [PATCH v6 00/20] drm/i915/vm_bind: Add VM_BIND functionality

2022-11-10 Thread Matthew Auld
On 10/11/2022 14:47, Tvrtko Ursulin wrote: On 10/11/2022 05:49, Niranjana Vishwanathapura wrote: On Wed, Nov 09, 2022 at 04:16:25PM -0800, Zanoni, Paulo R wrote: On Mon, 2022-11-07 at 00:51 -0800, Niranjana Vishwanathapura wrote: DRM_I915_GEM_VM_BIND/UNBIND ioctls allows UMD to bind/unbind GE

Re: [Intel-gfx] [PATCH] drm/i915: Fix unhandled deadlock in grab_vma()

2022-11-10 Thread Matthew Auld
On 10/11/2022 05:31, Mani Milani wrote: At present, the gpu thread crashes at times when grab_vma() attempts to acquire a gem object lock when in a deadlock state. Problems: I identified the following 4 issues in the current code: 1. Since grab_vma() calls i915_gem_object_trylock(), which conseq

Re: [Intel-gfx] [PATCH v6 20/20] drm/i915/vm_bind: Async vm_unbind support

2022-11-09 Thread Matthew Auld
On Mon, 7 Nov 2022 at 08:53, Niranjana Vishwanathapura wrote: > > Asynchronously unbind the vma upon vm_unbind call. > Fall back to synchronous unbind if backend doesn't support > async unbind or if async unbind fails. > > No need for vm_unbind out fence support as i915 will internally > handle al

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/ttm: never purge busy objects

2022-11-08 Thread Matthew Auld
On 07/11/2022 17:57, Patchwork wrote: *Patch Details* *Series:* drm/i915/ttm: never purge busy objects *URL:* https://patchwork.freedesktop.org/series/110601/ *State:*failure *Details:* https://intel-gfx-ci.01.org/tree/drm-tip/Pa

[Intel-gfx] [PATCH v2] drm/i915: use i915_sg_dma_sizes() for all backends

2022-11-08 Thread Matthew Auld
other backends we already just call i915_sg_dma_sizes() on the final mapping, so rather just move that into __i915_gem_object_set_pages() to avoid such issues coming back to bite us later. v2: Update missing conversion in gvt Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Auld Cc: Stuart

Re: [Intel-gfx] [PATCH v2 2/2] drm/i915/selftests: add igt_vma_move_to_active_unlocked

2022-11-08 Thread Matthew Auld
Hajda Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: call i915_request_await_object from _i915_vma_move_to_active

2022-11-08 Thread Matthew Auld
d not introduce functional changes. Signed-off-by: Andrzej Hajda I thought someone already reviewed this series. Anyway, Reviewed-by: Matthew Auld

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/2] drm/i915/ttm: fix uaf with lmem_userfault_list handling

2022-11-08 Thread Matthew Auld
On 08/11/2022 00:09, Patchwork wrote: *Patch Details* *Series:* series starting with [1/2] drm/i915/ttm: fix uaf with lmem_userfault_list handling *URL:* https://patchwork.freedesktop.org/series/110613/ *State:*failure *Details:* http

[Intel-gfx] [PATCH] drm/i915: use i915_sg_dma_sizes() for all backends

2022-11-07 Thread Matthew Auld
other backends we already just call i915_sg_dma_sizes() on the final mapping, so rather just move that into __i915_gem_object_set_pages() to avoid such issues coming back to bite us later. Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Auld Cc: Stuart Summers Cc: Andrzej Hajda --- drivers

[Intel-gfx] [PATCH 2/2] drm/i915/ttm: add some sanity checks for lmem_userfault_list

2022-11-07 Thread Matthew Auld
ssues/7469 Signed-off-by: Matthew Auld Cc: Anshuman Gupta Cc: Rodrigo Vivi Cc: Andrzej Hajda Cc: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c

[Intel-gfx] [PATCH 1/2] drm/i915/ttm: fix uaf with lmem_userfault_list handling

2022-11-07 Thread Matthew Auld
n rpm suspend") Signed-off-by: Matthew Auld Cc: Anshuman Gupta Cc: Rodrigo Vivi Cc: Andrzej Hajda Cc: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/dr

[Intel-gfx] [PATCH] drm/i915/ttm: never purge busy objects

2022-11-07 Thread Matthew Auld
quot;) Reported-by: Niranjana Vishwanathapura Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: # v5.15+ --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915

[Intel-gfx] [PATCH i-g-t] tests/i915/gem_mmap_offset: use cpu_size in always_clear

2022-11-07 Thread Matthew Auld
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7382 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das --- tests/i915/gem_mmap_offset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c index 0ad

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Set PROBE_PREFER_ASYNCHRONOUS

2022-11-04 Thread Matthew Auld
On Thu, 3 Nov 2022 at 00:14, Brian Norris wrote: > > On Wed, Nov 02, 2022 at 12:18:37PM +, Matthew Auld wrote: > > On Tue, 1 Nov 2022 at 21:58, Brian Norris wrote: > > > > > > On Fri, Oct 28, 2022 at 5:24 PM Patchwork > > > wrote: > > > >

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Set PROBE_PREFER_ASYNCHRONOUS

2022-11-04 Thread Matthew Auld
On Thu, 3 Nov 2022 at 00:14, Brian Norris wrote: > > On Wed, Nov 02, 2022 at 12:18:37PM +, Matthew Auld wrote: > > On Tue, 1 Nov 2022 at 21:58, Brian Norris wrote: > > > > > > On Fri, Oct 28, 2022 at 5:24 PM Patchwork > > > wrote: > > > >

[Intel-gfx] [PATCH i-g-t] tests/i915/module_load: restore gem_sanitycheck for discrete

2022-11-02 Thread Matthew Auld
cted error. Signed-off-by: Matthew Auld Cc: Janga Rahul Kumar Cc: Priyanka Dandamudi --- tests/i915/i915_module_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i915/i915_module_load.c b/tests/i915/i915_module_load.c index eebb3167..d3a86b11 100644 --- a/

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Set PROBE_PREFER_ASYNCHRONOUS

2022-11-02 Thread Matthew Auld
On Tue, 1 Nov 2022 at 21:58, Brian Norris wrote: > > On Fri, Oct 28, 2022 at 5:24 PM Patchwork > wrote: > > > > Patch Details > > Series:drm/i915: Set PROBE_PREFER_ASYNCHRONOUS > > URL:https://patchwork.freedesktop.org/series/110277/ > > State:failure > > Details:https://intel-gfx-ci.01.org/tree/

[Intel-gfx] [PATCH i-g-t] tests/i915/gem_create: use cpu_size in always_clear

2022-11-02 Thread Matthew Auld
pages. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6967 Signed-off-by: Matthew Auld Cc: Nirmoy Das --- tests/i915/gem_create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c index 9c695fa4..af530ccc 100644 -

Re: [Intel-gfx] [PATCH] drm/i915: Do not set cache_dirty for DGFX

2022-11-02 Thread Matthew Auld
n on non-LLC") Acked-by: Nirmoy Das Any idea why this escaped our testing in CI? Perhaps something to improve. Reviewed-by: Matthew Auld Suggested-by: Matthew Auld Reported-by: Niranjana Vishwanathapura Signed-off-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i915/gem/i915_gem_sh

[Intel-gfx] [PATCH i-g-t] tests/i915/query: use 48B_ADDRESS in upload

2022-10-31 Thread Matthew Auld
Our working set could be larger than 4G here. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6671 Signed-off-by: Matthew Auld Cc: Nirmoy Das --- tests/i915/i915_query.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/i915/i915_query.c b/tests/i915

<    1   2   3   4   5   6   7   8   9   10   >