On Fri, Jan 17, 2025 at 10:26:16AM +0200, Gwan-gyeong Mun wrote:
>
>
> On 12/18/24 1:33 AM, Matthew Brost wrote:
> > This patch introduces support for GPU Shared Virtual Memory (SVM) in the
> > Direct Rendering Manager (DRM) subsystem. SVM allows for seamless
> > sh
hen restoring a multi-order page (Christian König)
> - Update documentation.
>
> Cc: Christian König
> Cc: Somalapuram Amaranath
> Cc: Matthew Brost
Reviewed-by: Matthew Brost
> Cc:
> Signed-off-by: Thomas Hellström
> ---
> drivers/gpu/drm/ttm/ttm_pool
On Tue, Dec 17, 2024 at 03:33:23PM -0800, Matthew Brost wrote:
> This patch introduces support for GPU Shared Virtual Memory (SVM) in the
> Direct Rendering Manager (DRM) subsystem. SVM allows for seamless
> sharing of memory between the CPU and GPU, enhancing performance and
> flexib
ich would enable using write-back cached pools when
> allocating memory for other caching modes, rather than to resort
> to allocating from the system directly.
>
> v15:
> - Introduce this patch to simplify the upcoming patch that introduces
> restore while allocating.
>
&
On Fri, Jan 10, 2025 at 09:16:44AM +, Tvrtko Ursulin wrote:
>
> On 09/01/2025 19:59, Matthew Brost wrote:
> > On Wed, Jan 08, 2025 at 06:55:16PM +, Tvrtko Ursulin wrote:
> > >
> > > On 08/01/2025 16:57, Danilo Krummrich wrote:
> > > > On Wed
On Wed, Jan 08, 2025 at 06:55:16PM +, Tvrtko Ursulin wrote:
>
> On 08/01/2025 16:57, Danilo Krummrich wrote:
> > On Wed, Jan 08, 2025 at 03:13:39PM +, Tvrtko Ursulin wrote:
> > >
> > > On 08/01/2025 08:31, Danilo Krummrich wrote:
> > > > On Mon, Dec 30, 2024 at 04:52:45PM +, Tvrtko Ur
On Wed, Jan 08, 2025 at 05:57:25PM +0100, Danilo Krummrich wrote:
> On Wed, Jan 08, 2025 at 03:13:39PM +, Tvrtko Ursulin wrote:
Hi, all.
Just catching up on this post holidays. A few thoughts below.
> >
> > On 08/01/2025 08:31, Danilo Krummrich wrote:
> > > On Mon, Dec 30, 2024 at 04:52:45P
On Tue, Dec 17, 2024 at 03:33:23PM -0800, Matthew Brost wrote:
> This patch introduces support for GPU Shared Virtual Memory (SVM) in the
> Direct Rendering Manager (DRM) subsystem. SVM allows for seamless
> sharing of memory between the CPU and GPU, enhancing performance and
> flexib
On Wed, Dec 18, 2024 at 06:26:28PM +0530, Tejas Upadhyay wrote:
> In order to avoid having userspace to use MI_MEM_FENCE,
> we are adding a mechanism for userspace to generate a
> PCI memory barrier with low overhead (avoiding IOCTL call
> as well as writing to VRAM will adds some overhead).
>
> T
On Tue, Dec 17, 2024 at 03:33:23PM -0800, Matthew Brost wrote:
> This patch introduces support for GPU Shared Virtual Memory (SVM) in the
> Direct Rendering Manager (DRM) subsystem. SVM allows for seamless
> sharing of memory between the CPU and GPU, enhancing performance and
> flexib
On Sat, Dec 21, 2024 at 12:20:09AM +0530, Ghimiray, Himal Prasad wrote:
>
>
> On 18-12-2024 05:03, Matthew Brost wrote:
> > Add unbind to SVM garbage collector. To facilitate add unbind support
> > function to VM layer which unbinds a SVM range. Also teach PY layer to
>
On Sat, Dec 21, 2024 at 12:09:55AM +0530, Ghimiray, Himal Prasad wrote:
>
>
> On 18-12-2024 05:03, Matthew Brost wrote:
> > Add SVM device memory mirroring which enables device pages for
> > migration. Enabled via CONFIG_XE_DEVMEM_MIRROR Kconfig. Kconfig option
> >
On Tue, Dec 17, 2024 at 03:33:45PM -0800, Matthew Brost wrote:
> Wire xe_bo_move to GPU SVM migration via new helper xe_svm_bo_evict.
>
Somehow lost the xe_bo.c changes in this rev which call xe_svm_bo_evict.
Ignore this patch.
Matt
> v2:
> - Use xe_svm_bo_evict
> - Drop
ff-by: Matthew Brost
---
mm/memory.c | 13 ++---
mm/migrate_device.c | 64 -
2 files changed, 55 insertions(+), 22 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index 75c2dfd04f72..ae8b11131dad 100644
--- a/mm/memory.c
+++ b/mm/mem
Signed-off-by: Matthew Brost
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_device_types.h | 7 +++
drivers/gpu/drm/xe/xe_svm.c | 30
2 files changed, 37 insertions(+)
diff --git a/drivers/gpu/drm/xe
Add DRM_GPUVA_OP_DRIVER which allows driver to define their own gpuvm
ops. Useful for driver created ops which can be passed into the bind
software pipeline.
v3:
- s/DRM_GPUVA_OP_USER/DRM_GPUVA_OP_DRIVER (Thomas)
- Better commit message (Thomas)
Cc: Danilo Krummrich
Signed-off-by: Matthew
: Niranjana Vishwanathapura
Signed-off-by: Oak Zeng
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/Kconfig | 9
drivers/gpu/drm/xe/xe_device_types.h | 8
drivers/gpu/drm/xe/xe_svm.c | 62 +++-
drivers/gpu/drm/xe/xe_svm.h | 3
Add drm_gpusvm_devmem to xe_bo. Required to enable SVM migrations.
Signed-off-by: Matthew Brost
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_bo_types.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_bo_types.h b/drivers/gpu/drm/xe/xe_bo_types.h
index
ff-by: Matthew Brost
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_svm.c | 40 +
1 file changed, 40 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
index dcd99520a6d9..16d526b2d19a 100644
--- a/drivers/gpu/d
homas)
- Return error to large of migration (Thomas)
Signed-off-by: Oak Zeng
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_migrate.c | 175
drivers/gpu/drm/xe/xe_migrate.h | 10 ++
2 files changed, 185 insertions(+)
diff --git a/drivers/gpu/d
Useful to experiment with notifier size and how it affects performance.
v3:
- Pull missing changes including in following patch (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_module.c | 4
drivers/gpu/drm/xe/xe_module.h | 1 +
drivers/gpu/drm/xe/xe_svm.c| 4 +++-
3
range structure (Thomas)
- Hide migration behind Kconfig
- Kernel doc (Thomas)
- Use check_pages_threshold
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_svm.c | 102 ++--
drivers/gpu/drm/xe/xe_svm.h | 5 ++
2 files changed, 103 insertions(+), 4
Add some useful SVM debug logging fro SVM range which prints the range's
state.
v2:
- Upadte logging with latest structure layout
v3:
- Better commit message (Thomas)
- New range structure (Thomas)
- s/COLLECTOT/s/COLLECTOR (Thomas)
Signed-off-by: Matthew Brost
Reviewed-by: Thomas Hell
-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_module.c | 5 -
drivers/gpu/drm/xe/xe_module.h | 1 +
drivers/gpu/drm/xe/xe_svm.c| 3 +++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
index 2126e99ede01
(Thomas)
- Move some static inlines from head to C file (Thomas)
- Don't allocate pages under page lock in drm_gpusvm_migrate_populate_ram_pfn
(Thomas)
- Change check_pages to a threshold
Cc: Simona Vetter
Cc: Dave Airlie
Cc: Christian König
Cc:
Signed-off-by: Matthew Brost
Signe
Implement with a simple BO put which releases the device memory.
v2:
- Use new drm_gpusvm_devmem_ops
v3:
- Better commit message (Thomas)
Signed-off-by: Matthew Brost
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_svm.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a
as it simplifies the code. This decision can always be revisited if a
use case arises.
v3:
- s/arrises/arises (Thomas)
- s/system allocator/GPU address mirror (Thomas)
- Kernel doc (Thomas)
- Newline between function defs (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_svm.c
xe_svm_copy to clarify behavior (Thomas)
- Better commit message (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_svm.c | 179
1 file changed, 179 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
index
/DRM_GPUVA_OP_USER/DRM_GPUVA_OP_DRIVER (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_pt.c | 84 ++--
drivers/gpu/drm/xe/xe_svm.c | 9 +++-
drivers/gpu/drm/xe/xe_vm.c | 83 +++
drivers/gpu/drm/xe/xe_vm.h | 2
into SVM series (Thomas)
- Wait for pending binds (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 24 +
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h | 2 ++
drivers/gpu/drm/xe/xe_pt.c | 14
drivers/gpu
From: Thomas Hellström
Add dma_addr res cursor which walks an array of drm_pagemap_dma_addr.
Useful for SVM ranges and programing page tables.
v3:
- Better commit message (Thomas)
- Use new drm_pagemap.h location
Signed-off-by: Matthew Brost
Signed-off-by: Thomas Hellström
---
drivers/gpu
pings are unmapped on VM close (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_gt_pagefault.c | 17 +-
drivers/gpu/drm/xe/xe_pt.c | 41 +
drivers/gpu/drm/xe/xe_pt.h | 2 +
drivers/gpu/drm/xe/xe_svm.c | 223 ++-
drivers/gp
Wire xe_bo_move to GPU SVM migration via new helper xe_svm_bo_evict.
v2:
- Use xe_svm_bo_evict
- Drop bo->range
v3:
- Kernel doc (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_svm.c | 14 ++
drivers/gpu/drm/xe/xe_svm.h | 2 ++
2 files changed, 16 inserti
:
- Better commit message (Thomas)
- Kernel doc (Thomas)
- Use list_first_entry_or_null for garbage collector loop (Thomas)
- Don't add to garbage collector if VM is closed (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_svm.c | 90 +++-
drivers/gp
Support for CPU address mirror bindings in SRAM fully in place, enable the
implementation.
v3:
- s/system allocator/CPU address mirror (Thomas)
Signed-off-by: Matthew Brost
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_svm.c | 10 ++
drivers/gpu/drm/xe/xe_vm.c | 6
for system allocator BOs
v3:
- s/XE_BO_FLAG_SYSTEM_ALLOC/XE_BO_FLAG_CPU_ADDR_MIRROR (Thomas)
- Better commit message (Thomas)
- Drop XE_BO_FLAG_SKIP_CLEAR for now
- Add comment about possibly supporting CCS (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_bo.c | 12
d
YSTEM_ALLOCATOR/DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR
(Thomas)
- Rework commit message for expected usage (Thomas)
- Describe state of code after patch in commit message (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_pt.c | 76
drivers/gpu/drm/xe/xe_v
- Use drm_pagemap dma cursor
- Take notifier lock in bind code to check range state
v3:
- Use new GPU SVM range structure (Thomas)
- Kernel doc (Thomas)
- s/DRM_GPUVA_OP_USER/DRM_GPUVA_OP_DRIVER (Thomas)
Signed-off-by: Thomas Hellström
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe
(Thomas)
- Newlines between functions in xe_svm.h (Thomas)
- Call drm_gpusvm_driver_set_lock in init (Thomas)
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/xe_svm.c | 73
drivers/gpu/drm/xe/xe_svm.h | 17
Xe depends on DRM_GPUSVM for SVM implementation, select it in Kconfig.
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index b51a2bde73e2..3a08e16bfada 100644
--- a/drivers
/migrate_device_prepopulated_range
- Drop extra mmu invalidation (Vetter)
v3:
- s/migrate_device_prepopulated_range/migrate_device_pfns (Alistar)
- Use helper to lock device pages (Alistar)
- Update commit message with why this is required (Alistar)
Cc: Andrew Morton
Signed-off-by: Matthew Brost
---
include/linux
works, let the memory provider (drm_pagemap) provide
the mapping functionality.
v3:
- Move to drm level include
Signed-off-by: Matthew Brost
Signed-off-by: Thomas Hellström
---
include/drm/drm_pagemap.h | 103 ++
1 file changed, 103 insertions(+)
create m
TTM doesn't support fair eviction via WW locking, this mitigated in by
using retry loops in exec and preempt rebind worker. Extend this retry
loop to BO allocation. Once TTM supports fair eviction this patch can be
reverted.
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_bo.
mpute-runtime/pull/782
Matthew Brost (27):
drm/xe: Retry BO allocation
mm/migrate: Add migrate_device_pfns
mm/migrate: Trylock device page in do_swap_page
drm/gpusvm: Add support for GPU Shared Virtual Memory
drm/xe: Select DRM_GPUSVM Kconfig
drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_M
On Mon, Dec 02, 2024 at 02:00:44PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add documentation for agree upon GPU SVM design principles, current
> > status, and future plans.
> >
> > Signed-off-by: Matthew Brost
>
On Mon, Dec 02, 2024 at 01:33:29PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add some useful SVM debug logging.
> >
> > v2:
> > - Upadte logging with latest structure layout
> >
> > Signed-off-by: Matthew
ko's patch is
indeed accurate. For what it's worth, we encountered several similar
bugs in Xe that emerged once we added the correct work queue
annotations.
> > There is no need to use WQ_MEM_RECLAIM for the workqueue or do I miss
> > something?
> >
> >
On Mon, Dec 16, 2024 at 11:36:20AM +0100, Thomas Hellström wrote:
> On Wed, 2024-12-11 at 11:17 -0800, Matthew Brost wrote:
> > On Tue, Nov 19, 2024 at 03:45:33PM +0100, Thomas Hellström wrote:
> > > On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > > > A
On Mon, Dec 16, 2024 at 11:01:23AM +0100, Thomas Hellström wrote:
> On Wed, 2024-12-11 at 11:01 -0800, Matthew Brost wrote:
> > On Tue, Nov 19, 2024 at 02:56:12PM +0100, Thomas Hellström wrote:
> > > On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote:
> > > > Ad
On Tue, Nov 19, 2024 at 05:51:50PM +0100, Thomas Hellström wrote:
>
>
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add drm_gpusvm_devmem to xe_bo. Required to enable SVM migrations.
> >
> > Signed-off-by: Matthew Brost
> > ---
> >
On Wed, Dec 11, 2024 at 11:01:14AM -0800, Matthew Brost wrote:
> On Tue, Nov 19, 2024 at 02:56:12PM +0100, Thomas Hellström wrote:
> > On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote:
> > > Add SVM range invalidation vfunc.
> > >
> > > v2:
> > &
On Fri, Dec 13, 2024 at 02:16:51PM -0800, Matthew Brost wrote:
> On Fri, Nov 29, 2024 at 10:31:32AM +1100, Alistair Popple wrote:
> >
> > Matthew Brost writes:
> >
> > > Avoid multiple CPU page faults to the same device page racing by trying
> > > to lock
On Fri, Nov 29, 2024 at 11:00:24AM +1100, Alistair Popple wrote:
>
> Matthew Brost writes:
>
> [...]
>
> > + * 3) Invalidation driver vfunc.
> > + *
> > + * void driver_invalidation(struct drm_gpusvm *gpusvm,
> > + *
On Fri, Nov 29, 2024 at 10:31:32AM +1100, Alistair Popple wrote:
>
> Matthew Brost writes:
>
> > Avoid multiple CPU page faults to the same device page racing by trying
> > to lock the page in do_swap_page before taking an extra reference to the
> > page. This preven
On Thu, Dec 12, 2024 at 11:12:39AM +0100, Simona Vetter wrote:
> On Thu, Dec 12, 2024 at 09:49:24AM +0100, Thomas Hellström wrote:
> > On Mon, 2024-12-09 at 16:31 +0100, Simona Vetter wrote:
> > > On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote:
> > > > Am 09.12.24 um 14:33 schrieb
On Mon, Dec 02, 2024 at 11:13:55AM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add GPUSVM devic memory copy vfunc functions and connect to migration
>
> s/devic/device
Yes.
> >
>
> > layer.
> >
>
On Mon, Dec 02, 2024 at 11:44:47AM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add XE_BO_FLAG_SYSTEM_ALLOC to indicate BO is tied to SVM range.
> >
> > Add XE_BO_FLAG_SKIP_CLEAR to indicate BO does not need to cleared.
> &
On Mon, Dec 02, 2024 at 01:06:33PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Migration is implemented with range granularity, with VRAM backing
> > being
> > a VM private TTM BO (i.e., shares dma-resv with VM). The lifetime
On Mon, Dec 02, 2024 at 01:40:20PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Used to show we can bounce memory multiple times.
> >
> > Signed-off-by: Matthew Brost
> > ---
> > drivers/gpu/drm/xe/xe_module.c |
On Mon, Dec 02, 2024 at 01:37:46PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Useful to experiment with notifier size and how it affects
> > performance.
> >
> > Signed-off-by: Matthew Brost
> > ---
> &
On Mon, Dec 02, 2024 at 01:27:24PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Wire xe_bo_move to GPUSVM migration to SRAM with trylocking of mmap
> > lock.
> >
> > v2:
> > - Use xe_svm_bo_evict
> >
On Wed, Nov 20, 2024 at 05:05:32AM +0200, Gwan-gyeong Mun wrote:
>
>
> On 10/16/24 6:25 AM, Matthew Brost wrote:
> > +/**
> > + * xe_devm_add: Remap and provide memmap backing for device memory
> > + * @tile: tile that the memory region belongs to
> >
On Tue, Nov 19, 2024 at 03:45:33PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add basic SVM garbage collector which can destroy an SVM range upon
> > an
> > MMU UNMAP event.
> >
> > v2:
> > -
On Wed, Nov 20, 2024 at 09:04:20AM +0100, Thomas Hellström wrote:
> On Tue, 2024-11-19 at 15:08 -0800, Matthew Brost wrote:
> > On Tue, Nov 19, 2024 at 05:45:27PM +0100, Thomas Hellström wrote:
> > > On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > > >
On Tue, Nov 19, 2024 at 03:26:32PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add (re)bind to SVM page fault handler. To facilitate add support
> > function to VM layer which (re)binds a SVM range. Also teach PT layer
> >
On Tue, Nov 19, 2024 at 02:56:12PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote:
> > Add SVM range invalidation vfunc.
> >
> > v2:
> > - Don't run invalidation if VM is closed
> > - Cycle not
On Tue, Nov 26, 2024 at 09:19:47AM +0100, Christian König wrote:
> Am 25.11.24 um 18:27 schrieb Matthew Brost:
> > On Mon, Nov 25, 2024 at 05:19:54PM +0100, Christian König wrote:
> > > Am 25.11.24 um 16:29 schrieb Matthew Brost:
> > > > On Fri, Nov 15, 2024 at 1
xe_bo_vmap only works on contiguous BOs, disallow xe_bo_vmap on BO
unless we are certain the BO is contiguous.
Signed-off-by: Matthew Brost
Reviewed-by: Matthew Auld
---
drivers/gpu/drm/xe/xe_bo.c | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a
offset (Mika)
Reported-by: Christoph Manszewski
Suggested-by: Thomas Hellström
Signed-off-by: Matthew Brost
Reviewed-by: Matthew Auld
---
drivers/gpu/drm/xe/xe_bo.c | 59 --
1 file changed, 56 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe
The delayed snapshot capture worker can access the GPU or VRAM both of
which require a PM reference. Take a reference in this worker.
Cc: Rodrigo Vivi
Cc: Maarten Lankhorst
Fixes: 4f04d07c0a94 ("drm/xe: Faster devcoredump")
Signed-off-by: Matthew Brost
Reviewed-by: Matthew Auld
--
We only allow continguous BOs to be vmapped, set XE_BO_FLAG_PINNED on
BOs in migrate selftest as this forces continguous BOs and selftest uses
vmaps.
Signed-off-by: Matthew Brost
Reviewed-by: Matthew Auld
---
drivers/gpu/drm/xe/tests/xe_migrate.c | 13 +
1 file changed, 9
Add xe_bo_vm_access which is wrapper around ttm_bo_vm_access which takes
rpm refs for device access.
Suggested-by: Thomas Hellström
Signed-off-by: Matthew Brost
Reviewed-by: Matthew Auld
---
drivers/gpu/drm/xe/xe_bo.c | 17 -
1 file changed, 16 insertions(+), 1 deletion
Non-contiguous mapping of BO in VRAM doesn't work, use ttm_bo_access
instead.
v2:
- Fix error handling
Fixes: 0eb2a18a8fad ("drm/xe: Implement VM snapshot support for BO's and
userptr")
Suggested-by: Matthew Auld
Signed-off-by: Matthew Brost
Reviewed-by: Matthew Auld
---
Don't open code vmap of a BO, use ttm_bo_access helper which is safe for
non-contiguous BOs and non-visible BOs.
Suggested-by: Matthew Auld
Signed-off-by: Matthew Brost
Reviewed-by: Matthew Auld
---
drivers/gpu/drm/xe/display/intel_bo.c | 25 +
1 file chang
Fully reviewed and resending for final CI.
Dropping non-visible patch for now as it a bit larger, not strickly
required to unblock EU debug, and be sent independently in a follow up.
Matt
Matthew Brost (8):
drm/xe: Add xe_bo_vm_access
drm/ttm: Add ttm_bo_access
drm/xe: Add
ttm_bo_access to ttm_bo_vm.c (Christian)
Cc: Christian König
Reported-by: Christoph Manszewski
Suggested-by: Thomas Hellström
Signed-off-by: Matthew Brost
Tested-by: Mika Kuoppala
Reviewed-by: Matthew Auld
---
drivers/gpu/drm/ttm/ttm_bo_vm.c | 40 ++---
include/drm/ttm
On Mon, Nov 25, 2024 at 05:19:54PM +0100, Christian König wrote:
> Am 25.11.24 um 16:29 schrieb Matthew Brost:
> > On Fri, Nov 15, 2024 at 10:27:59AM -0800, Matthew Brost wrote:
> > > [SNIP]
> > > We use this interface to read a BO marked with a dumpable flag during a
On Fri, Nov 15, 2024 at 10:27:59AM -0800, Matthew Brost wrote:
> On Wed, Nov 13, 2024 at 12:42:35PM +0100, Christian König wrote:
> > Am 13.11.24 um 11:44 schrieb Thomas Hellström:
> > > On Wed, 2024-11-13 at 09:37 +0100, Christian König wrote:
> > > > Am 12.11.24 um
On Fri, Nov 22, 2024 at 05:24:03PM +0100, Philipp Stanner wrote:
> On Thu, 2024-11-21 at 10:05 -0800, Matthew Brost wrote:
> > On Tue, Oct 29, 2024 at 08:22:22AM +0100, Philipp Stanner wrote:
> > > Christian, Sima?
> > >
> > > Matthew? (+CC)
> > >
&
On Thu, Nov 21, 2024 at 10:31:16AM +0100, Christian König wrote:
> Am 20.11.24 um 23:50 schrieb Matthew Brost:
> > On Wed, Nov 20, 2024 at 02:38:49PM +0100, Christian König wrote:
> > > Am 19.11.24 um 00:37 schrieb Matthew Brost:
> > > > Normalize user fence attachmen
On Thu, Nov 21, 2024 at 11:04:47AM +0100, Christian König wrote:
> Am 20.11.24 um 18:36 schrieb Matthew Brost:
> > On Wed, Nov 20, 2024 at 02:31:50PM +0100, Christian König wrote:
> > > Am 19.11.24 um 00:37 schrieb Matthew Brost:
> > > > Add a dma_fence_preempt
On Thu, Nov 21, 2024 at 10:06:54AM +0100, Philipp Stanner wrote:
> +CC Thomas Hellström
>
>
> On Mon, 2024-11-18 at 12:48 +0100, Christian König wrote:
> > Am 15.11.24 um 17:07 schrieb Philipp Stanner:
> >
> > >
> > > On Fri, 2024-11-15 at 15:39 +0100, Christian König wrote:
> > >
> > > >
On Tue, Oct 29, 2024 at 08:22:22AM +0100, Philipp Stanner wrote:
> Christian, Sima?
>
> Matthew? (+CC)
>
Sorry catching up here. Internally in Xe we ref count the scheduler as
the scheduler is embedded into our user queue structure (xe_exec_queue).
Jobs ref the queue once they are armed. Upon qu
On Tue, Nov 19, 2024 at 01:13:26PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote:
> > Add SVM init / close / fini to faulting VMs. Minimual implementation.
> >
> > v2:
> > - Add close function
> >
> > Signed-off-
On Wed, Nov 20, 2024 at 02:38:49PM +0100, Christian König wrote:
> Am 19.11.24 um 00:37 schrieb Matthew Brost:
> > Normalize user fence attachment to a DMA fence. A user fence is a simple
> > seqno write to memory, implemented by attaching a DMA fence callback
> > that
On Wed, Nov 20, 2024 at 02:31:50PM +0100, Christian König wrote:
> Am 19.11.24 um 00:37 schrieb Matthew Brost:
> > Add a dma_fence_preempt base class with driver ops to implement
> > preemption, based on the existing Xe preemptive fence implementation.
> >
> > Annotat
On Tue, Nov 19, 2024 at 05:45:27PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add functions which migrate to / from VRAM accepting a single DPA
> > argument (VRAM) and array of dma addresses (SRAM).
> >
> > v2:
>
On Tue, Nov 19, 2024 at 04:31:05PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > Add unbind to SVM garbage collector. To facilitate add unbind support
> > function to VM layer which unbinds a SVM range. Also teach PY layer
> &
On Tue, Nov 19, 2024 at 05:33:11PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:25 -0700, Matthew Brost wrote:
> > uAPI is designed with the the use case that only mapping a BO to a
> > malloc'd address will unbind a system allocator VMA. Thus it doesn't
On Tue, Nov 19, 2024 at 02:57:56PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote:
> > Add DRM_GPUVA_OP_USER which allows driver to define their own gpuvm
> > ops.
> >
> > Cc: Danilo Krummrich
> > Signed-off-by: Matthe
On Tue, Nov 19, 2024 at 01:15:12PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote:
> > From: Thomas Hellström
> >
> > Useful for SVM ranges in SRAM and programing page tables.
>
> We should look at providing a better commi
On Mon, Nov 18, 2024 at 02:44:58PM +0100, Thomas Hellström wrote:
> On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote:
> > Add the DRM_XE_VM_BIND_FLAG_SYSTEM_ALLOCATOR flag, which is used to
> > create unpopulated virtual memory areas (VMAs) without memory backing
> > o
Preempt fences are used by usermap queues to implement dynamic memory
(BO eviction, userptr invalidation), enable preempt fences on usermap
queues.
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_exec_queue.c | 3 ++-
drivers/gpu/drm/xe/xe_pt.c | 3 +--
drivers/gpu/drm/xe
From: Tejas Upadhyay
In order to avoid having userspace to use MI_MEM_FENCE,
we are adding a mechanism for userspace to generate a
PCI memory barrier with low overhead (avoiding IOCTL call
as well as writing to VRAM will adds some overhead).
This is implemented by memory-mapping a page as uncach
Add a dma_fence_preempt base class with driver ops to implement
preemption, based on the existing Xe preemptive fence implementation.
Annotated to ensure correct driver usage.
Cc: Dave Airlie
Cc: Simona Vetter
Cc: Christian Koenig
Signed-off-by: Matthew Brost
---
drivers/dma-buf/Makefile
Teach xe_sync layer about drm_xe_semaphore which is used import / export
user fences.
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_sync.c | 90 ++
drivers/gpu/drm/xe/xe_sync.h | 8 +++
drivers/gpu/drm/xe/xe_sync_types.h | 5 +-
3 files changed
memory allocations).
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_device.c| 1 +
drivers/gpu/drm/xe/xe_preempt_fence.c | 9 +
drivers/gpu/drm/xe/xe_vm.c| 247 +-
drivers/gpu/drm/xe/xe_vm.h| 2 +
drivers/gpu/drm/xe
Add exec queue post init extension processing which is needed for more
complex extensions in which data is returned to the user.
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_exec_queue.c | 48 ++
1 file changed, 48 insertions(+)
diff --git a/drivers/gpu
The assumption only a VM in preempt fence mode has preempt fences
attached is not true, preempt fences can be attached to a dma-resv VM if
user queues are open.
Signed-off-by: Matthew Brost
---
drivers/gpu/drm/xe/xe_pt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
dma-fence, resume after preemption requires
memory allocations).
FIXME: uAPI likely to change, perhaps in drm generic way. Currently
enough for a PoC and enable initial Mesa development.
Signed-off-by: Matthew Brost
---
include/uapi/drm/xe_drm.h | 62 +++
1
1 - 100 of 1728 matches
Mail list logo