[PATCH v2 4/6] drm/ttm: stop allocating dummy resources during BO creation

2023-01-30 Thread Matthew Auld
From: Christian König 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 Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo.c | 7 --- 1 file changed, 7

[PATCH v2 5/6] drm/ttm: stop allocating a dummy resource for pipelined gutting

2023-01-30 Thread Matthew Auld
From: Christian König 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 Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo_util.c | 15 ++- 1 file

[PATCH v2 1/6] drm/i915/ttm: fix sparse warning

2023-01-30 Thread Matthew Auld
: kernel test robot Signed-off-by: Matthew Auld Cc: Christian König Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_ge

[PATCH v2 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL

2023-01-30 Thread Matthew Auld
ial ttm_tt would be created in ttm_bo_validate() with the clear parameter always set to true. Signed-off-by: Matthew Auld Cc: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/

Re: [Intel-gfx] [PATCH 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Matthew Auld
On Mon, 30 Jan 2023 at 11:00, Andrzej Hajda wrote: > > On 30.01.2023 11:12, Matthew Auld wrote: > > In the near future TTM will have NULL bo->resource when the object is > > initially created, plus after calling into pipeline-gutting. Try to > > handle the remaining

[PATCH 4/6] drm/ttm: stop allocating dummy resources during BO creation

2023-01-30 Thread Matthew Auld
From: Christian König 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 Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo.c | 7 --- 1 file changed, 7

[PATCH 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL

2023-01-30 Thread Matthew Auld
ial ttm_tt would be created in ttm_bo_validate() with the clear parameter always set to true. Signed-off-by: Matthew Auld Cc: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 6/6] drm/ttm: prevent moving of pinned BOs

2023-01-30 Thread Matthew Auld
-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 drivers/gpu/drm/nouveau/nouveau_bo.c| 3 --- drivers/gpu/drm/radeon/radeon_ttm.c | 4 drivers/gpu/drm/ttm/ttm_bo.c| 20

[PATCH 5/6] drm/ttm: stop allocating a dummy resource for pipelined gutting

2023-01-30 Thread Matthew Auld
From: Christian König 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 Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo_util.c | 15 ++- 1 file

[PATCH 1/6] drm/i915/ttm: fix sparse warning

2023-01-30 Thread Matthew Auld
: kernel test robot Signed-off-by: Matthew Auld Cc: Christian König --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index 7420276827a5..4758f2

[PATCH 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Matthew Auld
5: audit bo->resource usage v3") Signed-off-by: Matthew Auld Cc: Christian König Cc: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 12 +--- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 7 ++- drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 7 +--

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

Re: [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: [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
n_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: [PATCH 4/5] drm/ttm: prevent moving of pinned BOs

2023-01-24 Thread Matthew Auld
gt; 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: [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: [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

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

Re: [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/01/2023 11

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

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

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

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

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

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

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

Re: [PATCH 1/3] drm/ttm: remove ttm_bo_(un)lock_delayed_workqueue

2022-11-24 Thread Matthew Auld
On Thu, 24 Nov 2022 at 10:03, Christian König wrote: > > Those functions never worked correctly since it is still perfectly > possible that a buffer object is released and the background worker > restarted even after calling them. > > Signed-off-by: Christian König I know you usually do, but

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

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

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

2022-11-15 Thread Matthew Auld
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/i915/gem

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

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

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

Re: [PATCH v5 19/19] drm/i915/vm_bind: Render VM_BIND documentation

2022-10-26 Thread Matthew Auld
On 25/10/2022 07:59, Niranjana Vishwanathapura wrote: Update i915 documentation to include VM_BIND changes and render all VM_BIND related documentation. Signed-off-by: Niranjana Vishwanathapura Thanks for adding this, Reviewed-by: Matthew Auld

Re: [PATCH v5 09/19] drm/i915/vm_bind: Add out fence support

2022-10-26 Thread Matthew Auld
va->fence.flags & I915_TIMELINE_FENCE_WAIT) + ret = -EINVAL; I guess also: if (flags & __I915_TIMELINE_FENCE_UNKNOWN_FLAGS) Reviewed-by: Matthew Auld + obj = i915_gem_object_lookup(file, va->handle); if (!obj) return -ENOENT; @@ -237

Re: [PATCH v5 16/19] drm/i915/vm_bind: userptr dma-resv changes

2022-10-26 Thread Matthew Auld
ana Vishwanathapura Signed-off-by: Andi Shyti Reviewed-by: Matthew Auld

Re: [PATCH v5 17/19] drm/i915/vm_bind: Limit vm_bind mode to non-recoverable contexts

2022-10-26 Thread Matthew Auld
On 25/10/2022 07:59, Niranjana Vishwanathapura wrote: Only support vm_bind mode with non-recoverable contexts. With new vm_bind mode with eb3 submission path, we need not support older recoverable contexts. Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH v2] drm/ttm: rework on ttm_resource to use size_t type

2022-10-25 Thread Matthew Auld
On Tue, 25 Oct 2022 at 16:51, Somalapuram Amaranath wrote: > > Change ttm_resource structure from num_pages to size_t size in bytes. > v1 -> v2: change PFN_UP(dst_mem->size) to ttm->num_pages > v1 -> v2: change bo->resource->size to bo->base.size at some places > v1 -> v2: remove the local

Re: [PATCH] drm/i915: Remove unwanted ghost obj check

2022-10-24 Thread Matthew Auld
On 24/10/2022 15:45, Nirmoy Das wrote: vm_fault_ttm() should not expect ttm ghost obj so remove that check. Suggested-by: Matthew Auld Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld

Re: [PATCH v4 13/17] drm/i915/vm_bind: Update i915_vma_verify_bind_complete()

2022-10-20 Thread Matthew Auld
On 20/10/2022 17:51, Niranjana Vishwanathapura wrote: On Thu, Oct 20, 2022 at 10:16:06AM +0100, Matthew Auld wrote: On 19/10/2022 19:28, Niranjana Vishwanathapura wrote: On Wed, Oct 19, 2022 at 05:07:31PM +0100, Matthew Auld wrote: On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: Ensure

Re: [PATCH v4 15/17] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-10-20 Thread Matthew Auld
On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. v2: Ensure requests wait for bindings to complete. v3: Remove short term pinning with PIN_VALIDATE flag. Individualize fences before adding to

Re: [PATCH v4 15/17] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-10-20 Thread Matthew Auld
to dma_resv obj. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti Reviewed-by: Matthew Auld

Re: [PATCH v4 16/17] drm/i915/vm_bind: userptr dma-resv changes

2022-10-20 Thread Matthew Auld
On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: For persistent (vm_bind) vmas of userptr BOs, handle the user page pinning by using the i915_gem_object_userptr_submit_init() /done() functions v2: Do not double add vma to vm->userptr_invalidated_list Signed-off-by: Niranjana

Re: [PATCH v4 13/17] drm/i915/vm_bind: Update i915_vma_verify_bind_complete()

2022-10-20 Thread Matthew Auld
On 19/10/2022 19:28, Niranjana Vishwanathapura wrote: On Wed, Oct 19, 2022 at 05:07:31PM +0100, Matthew Auld wrote: On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: Ensure i915_vma_verify_bind_complete() handles case where bind is not initiated. Also make it non static, add documentation

Re: [PATCH v4 13/17] drm/i915/vm_bind: Update i915_vma_verify_bind_complete()

2022-10-19 Thread Matthew Auld
ete() - Check for the bind completion of the vma + * @vma: vma to check for bind completion Maybe mention the locking since this is now more than just DEBUG_GEM stuff. I assume we need the object lock or otherwise some guarantee that the vma is pinned? Reviewed-by: Matthew Auld + * + * Retu

Re: [PATCH v4 14/17] drm/i915/vm_bind: Expose i915_request_await_bind()

2022-10-19 Thread Matthew Auld
; /* do not reserve memory to prevent deadlocks */ #define __EXEC_OBJECT_NO_RESERVE BIT(31) +static inline int +i915_request_await_bind(struct i915_request *rq, struct i915_vma *vma) Some kernel doc might be good? Reviewed-by: Matthew Auld +{ + return __i915_request_await_exclusive(rq

Re: [PATCH v4 12/17] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-10-19 Thread Matthew Auld
On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: Implement new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new execbuf3 ioctl will not have any list of objects to validate bind as all required objects

Re: [PATCH v4 09/17] drm/i915/vm_bind: Add out fence support

2022-10-19 Thread Matthew Auld
On 19/10/2022 03:43, Niranjana Vishwanathapura wrote: On Tue, Oct 18, 2022 at 04:28:07PM +0100, Matthew Auld wrote: On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: Add support for handling out fence for vm_bind call. v2: Reset vma->vm_bind_fence.syncobj to NULL at the end     of vm_b

Re: [PATCH v4 15/17] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-10-18 Thread Matthew Auld
On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. v2: Ensure requests wait for bindings to complete. v3: Remove short term pinning with PIN_VALIDATE flag. Individualize fences before adding to

Re: [PATCH v4 12/17] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-10-18 Thread Matthew Auld
xt specified by @ctx_id. +*/ + __u32 engine_idx; + + /** +* @batch_address: Batch gpu virtual address/es. +* +* For normal submission, it is the gpu virtual address of the batch +* buffer. For parallel submission, it is a pointer to an array of +* batch b

Re: [PATCH v4 17/17] drm/i915/vm_bind: Add uapi for user to enable vm_bind_mode

2022-10-18 Thread Matthew Auld
check with i915_gem_vm_is_vm_bind_mode() Reviewed-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 25 +++-- drivers/gpu/drm/i915/gem/i915_gem_context.h | 3 +-- drivers/gpu/drm/i915/gt/intel

Re: [PATCH v4 09/17] drm/i915/vm_bind: Add out fence support

2022-10-18 Thread Matthew Auld
On 18/10/2022 08:16, Niranjana Vishwanathapura wrote: Add support for handling out fence for vm_bind call. v2: Reset vma->vm_bind_fence.syncobj to NULL at the end of vm_bind call. v3: Remove vm_unbind out fence uapi which is not supported yet. Signed-off-by: Niranjana Vishwanathapura

Re: [Intel-gfx] [PATCH v3 09/17] drm/i915/vm_bind: Add out fence support

2022-10-18 Thread Matthew Auld
On 14/10/2022 07:48, Niranjana Vishwanathapura wrote: On Sun, Oct 09, 2022 at 11:58:18PM -0700, Niranjana Vishwanathapura wrote: Add support for handling out fence for vm_bind call. v2: Reset vma->vm_bind_fence.syncobj to NULL at the end    of vm_bind call. Signed-off-by: Niranjana

Re: [PATCH v3 2/2] drm/i915/uapi: expose GTT alignment

2022-10-14 Thread Matthew Auld
On 14/10/2022 17:51, Jordan Justen wrote: On 2022-10-14 03:58:12, Matthew Auld wrote: On 14/10/2022 08:20, Jordan Justen wrote: Acked-by: Jordan Justen Thanks. Can I take that as ack for merging the series from Mesa POV? I think Lionel was going to test this, but I think keeps getting

Re: [PATCH] drm/i915: Refactor ttm ghost obj detection

2022-10-14 Thread Matthew Auld
l_wakeref_t wakeref = 0; vm_fault_t ret; int idx; - obj = i915_ttm_to_gem(bo); - if (!obj) + if (i915_ttm_is_ghost_object(bo)) return VM_FAULT_SIGBUS; I think this one can be dropped, maybe in a separate patch? Otherwise looks good to me, Reviewe

Re: [PATCH v3 2/2] drm/i915/uapi: expose GTT alignment

2022-10-14 Thread Matthew Auld
04:49:15, Matthew Auld wrote: On some platforms we potentially have different alignment restrictions depending on the memory type. We also now have different alignment restrictions for the same region across different kernel versions. Extend the region query to return the minimum required GTT

Re: [PATCH v3 12/17] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-10-12 Thread Matthew Auld
On 10/10/2022 07:58, Niranjana Vishwanathapura wrote: Implement new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new execbuf3 ioctl will not have any list of objects to validate bind as all required objects

Re: [PATCH v3 06/17] drm/i915/vm_bind: Support for VM private BOs

2022-10-11 Thread Matthew Auld
On 11/10/2022 17:27, Matthew Auld wrote: On 10/10/2022 07:58, Niranjana Vishwanathapura wrote: Each VM creates a root_obj and shares it with all of its private objects to use it as dma_resv object. This has a performance advantage as it requires a single dma_resv object update for all private

Re: [PATCH v3 05/17] drm/i915/vm_bind: Implement bind and unbind of object

2022-10-11 Thread Matthew Auld
ing with PIN_VALIDATE flag. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Prathap Kumar Valsan Signed-off-by: Andi Shyti Reviewed-by: Matthew Auld

Re: [PATCH v3 06/17] drm/i915/vm_bind: Support for VM private BOs

2022-10-11 Thread Matthew Auld
On 10/10/2022 07:58, Niranjana Vishwanathapura wrote: Each VM creates a root_obj and shares it with all of its private objects to use it as dma_resv object. This has a performance advantage as it requires a single dma_resv object update for all private BOs vs list of dma_resv objects update for

Re: [PATCH v3 07/17] drm/i915/vm_bind: Add support to handle object evictions

2022-10-11 Thread Matthew Auld
On 11/10/2022 01:55, Niranjana Vishwanathapura wrote: On Mon, Oct 10, 2022 at 05:43:47PM -0700, Niranjana Vishwanathapura wrote: On Mon, Oct 10, 2022 at 06:15:02PM +0100, Matthew Auld wrote: On 10/10/2022 17:11, Niranjana Vishwanathapura wrote: On Mon, Oct 10, 2022 at 02:30:49PM +0100

Re: [PATCH v3 07/17] drm/i915/vm_bind: Add support to handle object evictions

2022-10-10 Thread Matthew Auld
On 10/10/2022 17:11, Niranjana Vishwanathapura wrote: On Mon, Oct 10, 2022 at 02:30:49PM +0100, Matthew Auld wrote: On 10/10/2022 07:58, Niranjana Vishwanathapura wrote: Support eviction by maintaining a list of evicted persistent vmas for rebinding during next submission. Ensure the list do

Re: [PATCH v3 07/17] drm/i915/vm_bind: Add support to handle object evictions

2022-10-10 Thread Matthew Auld
__i915_vma_unbind_async() case. Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- .../drm/i915/gem/i915_gem_vm_bind_object.c| 6 drivers/gpu/drm/i915/gt/intel_gtt.c | 2 ++ drivers/gpu/drm/i915/gt/intel_gtt.h | 4

Re: [PATCH RESEND] drm/i915: Fix display problems after resume

2022-10-05 Thread Matthew Auld
ktop.org/patch/msgid/20220912121957.31310-1-thomas.hellst...@linux.intel.com Cc: Matthew Auld Cc: intel-...@lists.freedesktop.org Cc: # v5.18+ Reported-and-tested-by: Kevin Boulain Tested-by: David de Sousa Reviewed-by: Matthew Auld

[PATCH v3 2/2] drm/i915/uapi: expose GTT alignment

2022-10-04 Thread Matthew Auld
@gem_create@create-ext-placement-alignment Testcase: igt@i915_query@query-regions-sanity-check Suggested-by: Lionel Landwerlin Signed-off-by: Matthew Auld Cc: Michal Mrozek Cc: Thomas Hellström Cc: Stuart Summers Cc: Jordan Justen Cc: Yang A Shi Cc: Nirmoy Das Cc: Niranjana Vishwanathapura

[PATCH v3 1/2] drm/i915: enable PS64 support for DG2

2022-10-04 Thread Matthew Auld
restrictions, as documented in: commit caa574ffc4aaf4f29b890223878c63e2e7772f62 Author: Matthew Auld Date: Sat Feb 19 00:17:49 2022 +0530 drm/i915/uapi: document behaviour for DG2 64K support On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing

Re: [PATCH v2 15/17] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-10-03 Thread Matthew Auld
On 03/10/2022 07:12, Niranjana Vishwanathapura wrote: Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. v2: Ensure requests wait for bindings to complete. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti ---

Re: [PATCH 14/16] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-10-03 Thread Matthew Auld
On 02/10/2022 07:28, Niranjana Vishwanathapura wrote: On Fri, Sep 30, 2022 at 10:47:48AM +0100, Matthew Auld wrote: On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. Signed-off-by: Niranjana

[PATCH] drm/ttm: fix bo->resource check in vm_access

2022-10-03 Thread Matthew Auld
Touching bo->resource looks like it should require first locking the object, since this state is dynamic and could potentially change from under us. It looks we can just use obj->base.size here, which avoids any issues with locking, since this is immutable state. Signed-off-by: Matthew Au

[PATCH] drm/ttm: move bo->resource check in vm_access

2022-09-30 Thread Matthew Auld
Touching bo->resource looks like it should require first locking the object, since this state is dynamic and could potentially change from under us. Signed-off-by: Matthew Auld Cc: Christian König --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deleti

Re: [PATCH 11/16] drm/i915/vm_bind: Use common execbuf functions in execbuf path

2022-09-30 Thread Matthew Auld
On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Update the execbuf path to use common execbuf functions to reduce code duplication with the newer execbuf3 path. Signed-off-by: Niranjana Vishwanathapura Acked-by: Matthew Auld

Re: [PATCH 10/16] drm/i915/vm_bind: Abstract out common execbuf functions

2022-09-30 Thread Matthew Auld
specified fence + * @signal: signal the specified fence + * + * Add the fence specified by drm_syncobj @handle at specified @point in the + * timeline to the Execbuffer fence array @f. If @wait is specified, it is an + * input fence and if @signal is specified it is an output fence. + * + * Returns 0 upon success, -ve error upon failure. Also can return 1, which also means success. Also maybe clarify that zero here is special. Acked-by: Matthew Auld

Re: [PATCH 16/16] drm/i915/vm_bind: Add uapi for user to enable vm_bind_mode

2022-09-30 Thread Matthew Auld
/** @extensions: Zero-terminated chain of extensions. */ __u64 extensions; - /** @flags: reserved for future usage, currently MBZ */ +#define I915_VM_CREATE_FLAGS_USE_VM_BIND (1u << 0) Some kernel-doc for that would be good, even if it's kind of obvious.

Re: [PATCH 14/16] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-09-30 Thread Matthew Auld
On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- .../gpu/drm/i915/gem/i915_gem_execbuffer3.c | 188 +- 1

Re: [PATCH 05/16] drm/i915/vm_bind: Implement bind and unbind of object

2022-09-29 Thread Matthew Auld
On 29/09/2022 17:38, Niranjana Vishwanathapura wrote: On Thu, Sep 29, 2022 at 11:49:30AM +0100, Matthew Auld wrote: On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Add uapi and implement support for bind and unbind of an object at the specified GPU virtual addresses. The vm_bind mode

Re: [PATCH 07/16] drm/i915/vm_bind: Add support to handle object evictions

2022-09-29 Thread Matthew Auld
Acked-by: Matthew Auld --- .../drm/i915/gem/i915_gem_vm_bind_object.c| 6 ++ drivers/gpu/drm/i915/gt/intel_gtt.c | 2 ++ drivers/gpu/drm/i915/gt/intel_gtt.h | 4 drivers/gpu/drm/i915/i915_vma.c | 19 +++ drivers/gpu/drm

Re: [PATCH 04/16] drm/i915/vm_bind: Add support to create persistent vma

2022-09-29 Thread Matthew Auld
. ie., multiple mappings (at different VA) point to the same gtt_view of object. Skip vma_lookup for persistent vmas to support aliasing. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti Acked-by: Matthew Auld

Re: [PATCH 12/16] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-09-29 Thread Matthew Auld
On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Implement new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new execbuf3 ioctl will not have any list of objects to validate bind as all required objects

Re: [PATCH 05/16] drm/i915/vm_bind: Implement bind and unbind of object

2022-09-29 Thread Matthew Auld
On 29/09/2022 10:03, Matthew Auld wrote: On 29/09/2022 06:24, Niranjana Vishwanathapura wrote: On Wed, Sep 28, 2022 at 06:52:21PM +0100, Matthew Auld wrote: On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Add uapi and implement support for bind and unbind of an object at the specified

Re: [PATCH 05/16] drm/i915/vm_bind: Implement bind and unbind of object

2022-09-29 Thread Matthew Auld
On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Add uapi and implement support for bind and unbind of an object at the specified GPU virtual addresses. The vm_bind mode is not supported in legacy execbuf2 ioctl. It will be supported only in the newer execbuf3 ioctl. Signed-off-by:

Re: [PATCH 05/16] drm/i915/vm_bind: Implement bind and unbind of object

2022-09-29 Thread Matthew Auld
On 29/09/2022 06:24, Niranjana Vishwanathapura wrote: On Wed, Sep 28, 2022 at 06:52:21PM +0100, Matthew Auld wrote: On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Add uapi and implement support for bind and unbind of an object at the specified GPU virtual addresses. The vm_bind mode

Re: [PATCH 06/16] drm/i915/vm_bind: Support for VM private BOs

2022-09-28 Thread Matthew Auld
On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Each VM creates a root_obj and shares it with all of its private objects to use it as dma_resv object. This has a performance advantage as it requires a single dma_resv object update for all private BOs vs list of dma_resv objects update for

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