Re: [PATCH 3/6] drm/ttm: fix error handling in ttm_buffer_object_transfer

2025-06-23 Thread Matthew Brost
bably can merge this one by itself ahead of the rest of the series. With that: Reviewed-by: Matthew Brost > --- > drivers/gpu/drm/ttm/ttm_bo_util.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c > b/

Re: [PATCH 2/2] drm/amdgpu: Reset the clear flag in buddy during resume

2025-06-23 Thread Matthew Brost
On Mon, Jun 23, 2025 at 01:37:35PM +0100, Matthew Auld wrote: > +Matt B who is adding clear-on-free support in xe. I'm not sure if we might > also see something like this. > Thanks for the heads up. > On 23/06/2025 06:52, Arunpravin Paneer Selvam wrote: > > - Added a handler in DRM buddy manager

Re: [PATCH 2/6] drm/xe: stop asserting on the TTM refcount

2025-06-23 Thread Matthew Brost
On Mon, Jun 16, 2025 at 03:07:22PM +0200, Christian König wrote: > The TTM refcount is about to be removed. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/xe/xe_bo.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c > i

Re: DRM scheduler issue with spsc_queue

2025-06-20 Thread Matthew Brost
On Mon, Jun 16, 2025 at 12:42:53PM +0200, Simona Vetter wrote: > On Mon, Jun 16, 2025 at 09:24:38AM +0200, Christian König wrote: > > On 6/13/25 21:11, Matthew Brost wrote: > > > On Fri, Jun 13, 2025 at 07:26:22PM +0200, Christian König wrote: > > >> On 6/13

Re: [PATCH v4 1/3] drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap

2025-06-18 Thread Matthew Brost
On Wed, Jun 18, 2025 at 05:26:48PM +0200, Thomas Hellström wrote: > Hi, Matt, > > On Wed, 2025-06-18 at 08:26 -0700, Matthew Brost wrote: > > On Wed, Jun 18, 2025 at 04:21:22PM +0530, Ghimiray, Himal Prasad > > wrote: > > > > > > > > > On 18-06-

Re: [PATCH v4 1/3] drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap

2025-06-18 Thread Matthew Brost
On Wed, Jun 18, 2025 at 04:21:22PM +0530, Ghimiray, Himal Prasad wrote: > > > On 18-06-2025 14:56, Thomas Hellström wrote: > > From: Matthew Brost > > > > The migration functionality and track-keeping of per-pagemap VRAM > > mapped to the CPU mm is not p

Re: [PATCH v3 1/3] drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap

2025-06-17 Thread Matthew Brost
On Tue, Jun 17, 2025 at 09:37:28PM +0200, Thomas Hellström wrote: > On Tue, 2025-06-17 at 10:04 -0700, Matthew Brost wrote: > > On Tue, Jun 17, 2025 at 04:55:26PM +0200, Thomas Hellström wrote: > > > On Tue, 2025-06-17 at 20:17 +0530, Ghimiray, Himal Prasad wrote: > > >

Re: [PATCH v3 3/3] drm/xe: Implement and use the drm_pagemap populate_mm op

2025-06-17 Thread Matthew Brost
*/ > if (err) { > if (migrate_try_count || !ctx.devmem_only) { > @@ -1054,6 +1047,29 @@ int xe_svm_range_get_pages(struct xe_vm *vm, struct > xe_svm_range *range, > > #if IS_ENABLED(CONFIG_DRM_XE_PAGEMAP) > > +/** > + * xe_svm_alloc

Re: [PATCH v3 2/3] drm/pagemap: Add a populate_mm op

2025-06-17 Thread Matthew Brost
off-by: Thomas Hellström > Reviewed-by: Matthew Brost #v1 Review is still valid on this rev. Matt > --- > drivers/gpu/drm/drm_gpusvm.c | 7 ++-- > drivers/gpu/drm/drm_pagemap.c | 67 --- > include/drm/drm_pagemap.h | 34 ++ &

Re: [PATCH v3 1/3] drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap

2025-06-17 Thread Matthew Brost
> > > > > > > > > > > On 13-06-2025 19:32, Thomas Hellström wrote: > > > > > From: Matthew Brost > > > > > > > > > > The migration functionality and track-keeping of per-pagemap > > > > > VRAM > >

Re: DRM scheduler issue with spsc_queue

2025-06-16 Thread Matthew Brost
On Mon, Jun 16, 2025 at 09:24:38AM +0200, Christian König wrote: > On 6/13/25 21:11, Matthew Brost wrote: > > On Fri, Jun 13, 2025 at 07:26:22PM +0200, Christian König wrote: > >> On 6/13/25 19:01, Matthew Brost wrote: > >>> All, > >>> > >>> A

[PATCH] drm/sched: Increment job count before swapping tail spsc queue

2025-06-13 Thread Matthew Brost
ue to scheduler.") Cc: sta...@vger.kernel.org Signed-off-by: Matthew Brost --- include/drm/spsc_queue.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/drm/spsc_queue.h b/include/drm/spsc_queue.h index 125f096c88cb..ee9df8cc67b7 100644 --- a/include/drm/spsc_q

Re: DRM scheduler issue with spsc_queue

2025-06-13 Thread Matthew Brost
On Fri, Jun 13, 2025 at 07:26:22PM +0200, Christian König wrote: > On 6/13/25 19:01, Matthew Brost wrote: > > All, > > > > After about six hours of debugging, I found an issue in a fairly > > aggressive test case involving the DRM scheduler function > > drm_sche

DRM scheduler issue with spsc_queue

2025-06-13 Thread Matthew Brost
All, After about six hours of debugging, I found an issue in a fairly aggressive test case involving the DRM scheduler function drm_sched_entity_push_job. The problem is that spsc_queue_push does not correctly return first on a job push, causing the queue to fail to run even though it is ready. I

Re: [PATCH v4 7/8] drm/xe/userptr: replace xe_hmm with gpusvm

2025-06-09 Thread Matthew Brost
USVM > config. (Matt B) > - Always make .read_only match xe_vma_read_only() for the ctx. (Dafna) > > Signed-off-by: Matthew Auld > Cc: Himal Prasad Ghimiray > Cc: Thomas Hellström > Cc: Dafna Hirschfeld > Cc: Matthew Brost Reviewed-by: Matthew Brost > ---

Re: [PATCH v4 6/8] drm/xe/vm: split userptr bits into separate file

2025-06-09 Thread Matthew Brost
t; runtime due to something not being initialised, even though it passed > the build. Should be no functional change here. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Matthew Brost > --- > drivers/gpu/drm/xe/Makefile | 1 + > drivers/gpu/drm/xe/xe

Re: [PATCH v2 1/3] drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap

2025-06-05 Thread Matthew Brost
On Wed, Jun 04, 2025 at 11:35:34AM +0200, Thomas Hellström wrote: > From: Matthew Brost > > The migration functionality and track-keeping of per-pagemap VRAM > mapped to the CPU mm is not per GPU_vm, but rather per pagemap. > This is also reflected by the functions not needing

Re: [PATCH v2 3/3] drm/xe: Implement and use the drm_pagemap populate_mm op

2025-06-05 Thread Matthew Brost
On Wed, Jun 04, 2025 at 11:35:36AM +0200, Thomas Hellström wrote: > Add runtime PM since we might call populate_mm on a foreign device. > Also create the VRAM bos as ttm_bo_type_kernel. This avoids the > initial clearing and the creation of an mmap handle. > I didn't read this part - skipping the

Re: [PATCH] drm/xe: don't store the xe device pointer inside xe_ttm_tt

2025-06-04 Thread Matthew Brost
arly always available without storing > > an extra copy for each tt in the system. > > > > Just noticed this while reading over the xe shrinker code. > > Reviewed-by: Matthew Brost I'm not seeing a CI run for this on patchworks. Can you resend intel-xe? You should

Re: [PATCH v2 2/3] drm/pagemap: Add a populate_mm op

2025-06-04 Thread Matthew Brost
On Wed, Jun 04, 2025 at 11:35:35AM +0200, Thomas Hellström wrote: > Add an operation to populate a part of a drm_mm with device > private memory. > With the kernel doc fixed: Reviewed-by: Matthew Brost > Signed-off-by: Thomas Hellström > --- > drivers/gpu/drm/

Re: [PATCH] drm/sched: Discourage usage of separate workqueues

2025-06-04 Thread Matthew Brost
On Wed, Jun 04, 2025 at 06:53:44PM +0200, Danilo Krummrich wrote: > On Wed, Jun 04, 2025 at 09:45:00AM -0700, Matthew Brost wrote: > > On Wed, Jun 04, 2025 at 05:07:15PM +0200, Simona Vetter wrote: > > > We should definitely document this trick better though, I didn't fin

Re: [PATCH] drm/sched: Discourage usage of separate workqueues

2025-06-04 Thread Matthew Brost
On Wed, Jun 04, 2025 at 05:07:15PM +0200, Simona Vetter wrote: > On Wed, Jun 04, 2025 at 11:41:25AM +0200, Christian König wrote: > > On 6/4/25 10:16, Philipp Stanner wrote: > > > struct drm_sched_init_args provides the possibility of letting the > > > scheduler use user-controlled workqueues, inst

Re: [PATCH v2 3/3] drm/xe: Implement and use the drm_pagemap populate_mm op

2025-06-04 Thread Matthew Brost
On Wed, Jun 04, 2025 at 11:35:36AM +0200, Thomas Hellström wrote: > Add runtime PM since we might call populate_mm on a foreign device. I think taking a runtime PM will fix hard to hit splat [1] too. [1] https://patchwork.freedesktop.org/patch/648954/?series=147849&rev=1 > Also create the VRAM b

Re: [PATCH] drm/xe: Fix NPD when saving default context

2025-05-28 Thread Matthew Brost
On Wed, May 28, 2025 at 10:55:03PM -0600, Upadhyay, Tejas wrote: > > > > -Original Message- > > From: Intel-xe On Behalf Of Lucas > > De Marchi > > Sent: 29 May 2025 03:12 > > To: intel...@lists.freedesktop.org > > Cc: Brost, Matthew ; dri- > > de...@lists.freedesktop.org; De Marchi, Luc

Re: [PATCH] drm/xe: Fix NPD when saving default context

2025-05-28 Thread Matthew Brost
the drm client_id in drm_sched_fence") > Cc: Christian König > Cc: Pierre-Eric Pelloux-Prayer > Cc: Philipp Stanner > Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Brost > --- > drivers/gpu/drm/xe/xe_sched_job.c | 2 +- > 1 file changed, 1 insertion(+), 1 d

Re: [RFC v2 13/13] drm/xe: Make dma-fences compliant with the safe access rules

2025-05-12 Thread Matthew Brost
-by: Tvrtko Ursulin This makes sense in the context of the series (e.g. assuming patch #9 lands). With that: Reviewed-by: Matthew Brost > --- > drivers/gpu/drm/xe/xe_guc_exec_queue_types.h | 2 ++ > drivers/gpu/drm/xe/xe_guc_submit.c | 7 ++- > drivers/gpu/drm/xe

Re: [RFC v4 04/16] drm/sched: Avoid double re-lock on the job free path

2025-05-12 Thread Matthew Brost
t from this series, to make the series completely about the > new scheduling policy, not general other improvements. > > > P. > > > > > Signed-off-by: Tvrtko Ursulin > > Cc: Christian König > > Cc: Danilo Krummrich > > Cc: Matthew Brost > > Cc: Philipp Stann

Re: [RFC v2 01/13] drm/i915: Use provided dma_fence_is_chain

2025-05-09 Thread Matthew Brost
On Fri, May 09, 2025 at 04:33:40PM +0100, Tvrtko Ursulin wrote: > Replace open-coded helper with the subsystem one. > You probably can just send this one by itself as it good cleanup and independent. Reviewed-by: Matthew Brost > Signed-off-by: Tvrtko Ursulin > --- > drivers/g

Re: [RFC v7 00/23] DRM scheduling cgroup controller

2025-05-07 Thread Matthew Brost
t. It's a large series so I will put most people on Cc only in > the cover letter as a ping of a sort. Whoever is interested can for now find > the > series in the archives. > > 1) > https://lore.kernel.org/dri-devel/20231024160727.282960-1-tvrtko.ursu...@linux.intel.com/ >

Re: [PATCH 1/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-05-06 Thread Matthew Brost
On Mon, May 05, 2025 at 07:41:09PM -0700, Matthew Brost wrote: > On Sat, May 03, 2025 at 05:59:52PM -0300, Maíra Canal wrote: > > When the DRM scheduler times out, it's possible that the GPU isn't hung; > > instead, a job may still be running, and there may be no vali

Re: [PATCH 7/8] drm/xe: Use DRM_GPU_SCHED_STAT_RUNNING to skip the reset

2025-05-05 Thread Matthew Brost
On Sat, May 03, 2025 at 05:59:58PM -0300, Maíra Canal wrote: > Xe can skip the reset if TDR has fired before the free job worker. Instead > of using the scheduler internals to add the job to the pending list, use > the DRM_GPU_SCHED_STAT_RUNNING status to skip the reset and rearm the > timer. > >

Re: [PATCH 1/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-05-05 Thread Matthew Brost
e that the job > should be reinserted into the pending list, and the driver will still > signal its completion. > > Signed-off-by: Maíra Canal Reviewed-by: Matthew Brost > --- > drivers/gpu/drm/scheduler/sched_main.c | 14 ++ > include/drm/gpu_scheduler.h

Re: [PATCH] drm/ttm: Fix ttm_backup kerneldoc

2025-05-05 Thread Matthew Brost
On Fri, May 02, 2025 at 03:01:01PM +0200, Thomas Hellström wrote: > The docs were not properly updated from an earlier version of the code. > > Fixes: e7b5d23e5d47 ("drm/ttm: Provide a shmem backup implementation") > Cc: Christian König > Cc: Matthew Brost Reviewed

Re: [PATCH v2] drm/ttm: Silence randstruct warning about casting struct file

2025-05-01 Thread Matthew Brost
On Fri, May 02, 2025 at 05:31:49AM +0100, Al Viro wrote: > On Thu, May 01, 2025 at 09:26:25PM -0700, Matthew Brost wrote: > > > I;m fairly certain is just aliasing... but I do understand a file cannot > > be embedded. Would comment help here indicating no other fields shou

Re: [PATCH v2] drm/ttm: Silence randstruct warning about casting struct file

2025-05-01 Thread Matthew Brost
On Fri, May 02, 2025 at 03:34:47AM +0100, Al Viro wrote: > On Thu, May 01, 2025 at 07:13:12PM -0700, Matthew Brost wrote: > > On Thu, May 01, 2025 at 05:24:38PM -0700, Kees Cook wrote: > > > Casting through a "void *" isn't sufficient to convince the randstruct &g

Re: [PATCH v2] drm/ttm: Silence randstruct warning about casting struct file

2025-05-01 Thread Matthew Brost
/ttm/ttm_backup.c: In function 'ttm_file_to_backup': > drivers/gpu/drm/ttm/ttm_backup.c:21:16: note: randstruct: casting between > randomized structure pointer types (ssa): 'struct ttm_backup' and 'struct > file' >21 | return (void *)file; &g

Re: [PATCH] drm/ttm: Silence randstruct warning about casting struct file

2025-05-01 Thread Matthew Brost
> |^~~~ > > Fixes: e7b5d23e5d47 ("drm/ttm: Provide a shmem backup implementation") > Signed-off-by: Kees Cook > --- > Cc: Thomas Hellström > Cc: Christian Koenig > Cc: Somalapuram Amaranath > Cc: Matthew Brost What if we did somethi

Re: [PATCH] drm/xe: fix devcoredump chunk alignmnent calculation

2025-04-29 Thread Matthew Brost
On Tue, Apr 29, 2025 at 10:51:18AM -0700, Matthew Brost wrote: > On Tue, Apr 29, 2025 at 09:34:00AM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > The device core dumps are copied in 1.5GB chunks, which leads to a > > link-time error on 32-bit builds bec

Re: [PATCH] drm/xe: fix devcoredump chunk alignmnent calculation

2025-04-29 Thread Matthew Brost
On Tue, Apr 29, 2025 at 09:34:00AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The device core dumps are copied in 1.5GB chunks, which leads to a > link-time error on 32-bit builds because of the 64-bit division not > getting trivially turned into mask and shift operations: > > ERROR:

Re: [PATCH] drm/xe/tests: fix the bo evict build break

2025-04-27 Thread Matthew Brost
On Mon, Apr 28, 2025 at 01:40:42PM +1000, Dave Airlie wrote: > From: Dave Airlie > Thanks Dave, I already merge this fix. I guess our new CI policy rejected this though - I'll follow up on allowing you trigger our CI for anything going forward. Matt > Fixes: 55df7c0c62c1 ("drm/ttm/xe: drop unu

Re: [PATCH v23 2/5] drm/xe/xe_gt_pagefault: Move pagefault struct to header

2025-04-27 Thread Matthew Brost
es in regs folder (Michal W) > > - Move xe_guc_pagefault_desc to regs folder (Michal W) > > > > Bspec: 77412 > > Signed-off-by: Jonathan Cavitt > > Reviewed-by: Shuicheng Lin > > Acked-by: Matthew Brost > > Cc: Michal Wajdeczko > > --- > > drivers

Re: [PATCH v23 2/5] drm/xe/xe_gt_pagefault: Move pagefault struct to header

2025-04-27 Thread Matthew Brost
On Sun, Apr 27, 2025 at 06:51:30PM -0700, Matthew Brost wrote: Ignore this one... I screwed up the reply list as intel-xe is not include. Replying again to include intel-xe. Matt > On Sun, Apr 27, 2025 at 02:57:22PM +0300, Dafna Hirschfeld wrote: > > On 24.04.2025 20:49, Jonathan Cav

Re: [PATCH v23 2/5] drm/xe/xe_gt_pagefault: Move pagefault struct to header

2025-04-27 Thread Matthew Brost
es in regs folder (Michal W) > > - Move xe_guc_pagefault_desc to regs folder (Michal W) > > > > Bspec: 77412 > > Signed-off-by: Jonathan Cavitt > > Reviewed-by: Shuicheng Lin > > Acked-by: Matthew Brost > > Cc: Michal Wajdeczko > > --- > > drivers

Re: [PATCH] drm/ttm/xe: drop unused force_alloc flag

2025-04-27 Thread Matthew Brost
On Wed, Apr 23, 2025 at 12:29:20PM +1000, Dave Airlie wrote: > From: Dave Airlie > > This flag used to be used in the old memory tracking code, that > code got migrated into the vmwgfx driver[1], and then got removed > from the tree[2], but this piece got left behind. > > [1] f07069da6b4c ("drm/

Re: [PATCH v4 2/5] drm/xe: Strict migration policy for atomic SVM faults

2025-04-25 Thread Matthew Brost
On Fri, Apr 25, 2025 at 09:18:19AM +0200, Thomas Hellström wrote: > On Thu, 2025-04-24 at 11:03 -0700, Matthew Brost wrote: > > On Thu, Apr 24, 2025 at 04:39:21PM +0200, Thomas Hellström wrote: > > > On Tue, 2025-04-22 at 10:04 -0700, Matthew Brost wrote: > > > > M

Re: [PATCH v3 7/7] drm/xe/pt: unify xe_pt_svm_pre_commit with userptr

2025-04-24 Thread Matthew Brost
ombine svm/userptr handling further down into op_check_svm_userptr. > > Suggested-by: Matthew Brost The Kconfig issues pointed out in the previous patch need to be fixed but implementation here look correct: Reviewed-by: Matthew Brost > Signed-off-by: Matthew Auld > Cc: Himal

Re: [PATCH v3 6/7] drm/xe/userptr: replace xe_hmm with gpusvm

2025-04-24 Thread Matthew Brost
which is now provided by gpusvm. > > v2: > - Reuse the same SVM vm struct we use for full SVM, that way we can > use the same lock (Matt B & Himal) > v3: > - Re-use svm_init/fini for userptr. > > Signed-off-by: Matthew Auld > Cc: Himal Prasad Ghimiray

Re: [PATCH v3 5/7] drm/gpusvm: export drm_gpusvm_pages API

2025-04-24 Thread Matthew Brost
On Thu, Apr 24, 2025 at 03:01:21PM -0700, Matthew Brost wrote: > On Thu, Apr 24, 2025 at 01:18:33PM +0100, Matthew Auld wrote: > > Export get/unmap/free pages API. We also need to tweak the SVM init to > > allow skipping much of the unneeded parts. > > > > Signed-o

Re: [PATCH v3 5/7] drm/gpusvm: export drm_gpusvm_pages API

2025-04-24 Thread Matthew Brost
On Thu, Apr 24, 2025 at 01:18:33PM +0100, Matthew Auld wrote: > Export get/unmap/free pages API. We also need to tweak the SVM init to > allow skipping much of the unneeded parts. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Matthew Brost > --- > driv

Re: [PATCH v3 4/7] drm/gpusvm: refactor core API to use pages struct

2025-04-24 Thread Matthew Brost
On Thu, Apr 24, 2025 at 01:18:32PM +0100, Matthew Auld wrote: > Refactor the core API of get/unmap/free pages to all operate on > drm_gpusvm_pages. In the next patch we want to export a simplified core > API without needing fully blown svm range etc. > > Suggested-by: Matthew Bros

Re: [PATCH v22 0/5] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-04-24 Thread Matthew Brost
erge request to this cover letter > > v19: > - Perform kzalloc outside of lock (Auld) > > v20: > - Fix inconsistent use of whitespace in defines > > v21: > - Remove unnecessary size assertion (jcavitt) > > v22: > - Fix xe_vm_fault_entry kernel docs (Shuichen

Re: [PATCH v22 1/5] drm/xe/xe_gt_pagefault: Disallow writes to read-only VMAs

2025-04-24 Thread Matthew Brost
quot;) > Signed-off-by: Jonathan Cavitt > Suggested-by: Matthew Brost Reviewed-by: Matthew Brost > Reviewed-by: Shuicheng Lin > --- > drivers/gpu/drm/xe/xe_gt_pagefault.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/xe/xe_gt_pagefau

Re: [PATCH v22 5/5] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-04-24 Thread Matthew Brost
4: > - Map access type, fault type, and fault level to user macros (Matt > Brost, Ivan) > > v15: > - Remove unnecessary size assertion (jcavitt) > > Signed-off-by: Jonathan Cavitt > Suggested-by: Matthew Brost > Reviewed-by: Shuicheng Lin > Cc: Jainxun Zhang > Cc: Shui

Re: [PATCH v4 2/5] drm/xe: Strict migration policy for atomic SVM faults

2025-04-24 Thread Matthew Brost
On Thu, Apr 24, 2025 at 04:39:21PM +0200, Thomas Hellström wrote: > On Tue, 2025-04-22 at 10:04 -0700, Matthew Brost wrote: > > Mixing GPU and CPU atomics does not work unless a strict migration > > policy of GPU atomics must be device memory. Enforce a policy of must > >

Re: [RFC 0/4] Some (drm_sched_|dma_)fence lifetime issues

2025-04-23 Thread Matthew Brost
counting > > all > > the involved objects has been rejected in the past. And since the problem > > probably expands to all dma fences it certainly isn't easy. > > > > To be clear once more - lets not focus on how this does not fix it fully - > > I am

Re: [PATCH v21 3/5] drm/xe/uapi: Define drm_xe_vm_get_property

2025-04-23 Thread Matthew Brost
pe, and fault level (Matt Brost, > > Ivan) > > > > v6: > > - Fix inconsistent use of whitespace in defines > > > > Signed-off-by: Jonathan Cavitt > > Cc: Zhang Jianxun > > Cc: Ivan Briano > > Cc: Matthew Brost > > --- > > include/u

Re: [PATCH v2 7/7] drm/xe/pt: unify xe_pt_svm_pre_commit with userptr

2025-04-23 Thread Matthew Brost
On Mon, Apr 07, 2025 at 08:29:11AM +0100, Matthew Auld wrote: > On 04/04/2025 18:02, Matthew Brost wrote: > > On Fri, Apr 04, 2025 at 09:19:34AM +0100, Matthew Auld wrote: > > > On 03/04/2025 22:25, Matthew Brost wrote: > > > > On Fri, Mar 28, 2025 at 06:10:

Re: [PATCH v4 2/5] drm/xe: Strict migration policy for atomic SVM faults

2025-04-23 Thread Matthew Brost
On Tue, Apr 22, 2025 at 10:51:44PM +0530, Ghimiray, Himal Prasad wrote: > > > On 22-04-2025 22:34, Matthew Brost wrote: > > Mixing GPU and CPU atomics does not work unless a strict migration > > policy of GPU atomics must be device memory. Enforce a policy of must be >

Re: [PATCH v4 1/5] drm/gpusvm: Introduce devmem_only flag for allocation

2025-04-23 Thread Matthew Brost
On Tue, Apr 22, 2025 at 10:04:11AM -0700, Matthew Brost wrote: > From: Himal Prasad Ghimiray > > This commit adds a new flag, devmem_only, to the drm_gpusvm structure. The > purpose of this flag is to ensure that the get_pages function allocates > memory exclusively from the devi

Re: [PATCH] drm/ttm/xe: drop unused force_alloc flag

2025-04-22 Thread Matthew Brost
1] f07069da6b4c ("drm/ttm: move memory accounting into vmwgfx v4") > [2] 8aadeb8ad874 ("drm/vmwgfx: Remove the dedicated memory accounting") > > Cleanup the dead code. > > Signed-off-by: Dave Airlie Reviewed-by: Matthew Brost > --- > drivers/gpu/drm/

Re: force_alloc in ttm_operation_ctx

2025-04-22 Thread Matthew Brost
On Tue, Apr 22, 2025 at 06:48:08PM -0700, Matthew Brost wrote: > On Wed, Apr 23, 2025 at 09:35:35AM +1000, Dave Airlie wrote: > > Hey, > > > > Been digging a bit into cgroups stuff and I found this force_alloc > > flags in the TTM operation context that seemed like I s

Re: force_alloc in ttm_operation_ctx

2025-04-22 Thread Matthew Brost
On Wed, Apr 23, 2025 at 09:35:35AM +1000, Dave Airlie wrote: > Hey, > > Been digging a bit into cgroups stuff and I found this force_alloc > flags in the TTM operation context that seemed like I should dig > deeper, but I can't see this flag being used anywhere, places set it > but I can't spot th

[PATCH v4 1/5] drm/gpusvm: Introduce devmem_only flag for allocation

2025-04-22 Thread Matthew Brost
rn an -EFAULT error. v3: - s/vram_only/devmem_only/ Signed-off-by: Matthew Brost Signed-off-by: Himal Prasad Ghimiray --- drivers/gpu/drm/drm_gpusvm.c | 5 + include/drm/drm_gpusvm.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gp

[PATCH v4 3/5] drm/gpusvm: Add timeslicing support to GPU SVM

2025-04-22 Thread Matthew Brost
Add timeslicing support to GPU SVM which will guarantee the GPU a minimum execution time on piece of physical memory before migration back to CPU. Intended to implement strict migration policies which require memory to be in a certain placement for correct execution. Signed-off-by: Matthew Brost

[PATCH v4 2/5] drm/xe: Strict migration policy for atomic SVM faults

2025-04-22 Thread Matthew Brost
set vram_only on DGFX (Himal) - Bail on get_pages failure if vram_only and retry count exceeded (Himal) - s/vram_only/devmem_only - Update xe_svm_range_is_valid to accept devmem_only argument v4: - Fix logic bug get_pages failure Signed-off-by: Himal Prasad Ghimiray Signed-off-by: Matthew Brost

[PATCH v4 4/5] drm/xe: Timeslice GPU on atomic SVM fault

2025-04-22 Thread Matthew Brost
Ensure GPU can make forward progress on an atomic SVM GPU fault by giving the GPU a timeslice of 5ms v2: - Reduce timeslice to 5ms - Double timeslice on retry - Split out GPU SVM changes into independent patch Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_svm.c | 3 +++ 1 file

[PATCH v4 5/5] drm/xe: Add atomic_svm_timeslice_ms debugfs entry

2025-04-22 Thread Matthew Brost
Add some informal control for atomic SVM fault GPU timeslice to be able to play around with values and tweak performance. v2: - Reduce timeslice default value to 5ms Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_debugfs.c | 38 drivers/gpu/drm/xe

[PATCH v4 0/5] Enable SVM atomics in Xe / GPU SVM

2025-04-22 Thread Matthew Brost
Minimal set of patches to enable compute UMD SVM atomics. Collaboration with Himal. Matt Himal Prasad Ghimiray (1): drm/gpusvm: Introduce devmem_only flag for allocation Matthew Brost (4): drm/xe: Strict migration policy for atomic SVM faults drm/gpusvm: Add timeslicing support to GPU

[PATCH v3 5/5] drm/xe: Add atomic_svm_timeslice_ms debugfs entry

2025-04-22 Thread Matthew Brost
Add some informal control for atomic SVM fault GPU timeslice to be able to play around with values and tweak performance. v2: - Reduce timeslice default value to 5ms Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_debugfs.c | 38 drivers/gpu/drm/xe

[PATCH v3 0/5] Enable SVM atomics in Xe / GPU SVM

2025-04-22 Thread Matthew Brost
Minimal set of patches to enable compute UMD SVM atomics. Collaboration with Himal. Matt Himal Prasad Ghimiray (1): drm/gpusvm: Introduce devmem_only flag for allocation Matthew Brost (4): drm/xe: Strict migration policy for atomic SVM faults drm/gpusvm: Add timeslicing support to GPU

[PATCH v3 4/5] drm/xe: Timeslice GPU on atomic SVM fault

2025-04-22 Thread Matthew Brost
Ensure GPU can make forward progress on an atomic SVM GPU fault by giving the GPU a timeslice of 5ms v2: - Reduce timeslice to 5ms - Double timeslice on retry - Split out GPU SVM changes into independent patch Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_svm.c | 3 +++ 1 file

[PATCH v3 3/5] drm/gpusvm: Add timeslicing support to GPU SVM

2025-04-22 Thread Matthew Brost
Add timeslicing support to GPU SVM which will guarantee the GPU a minimum execution time on piece of physical memory before migration back to CPU. Intended to implement strict migration policies which require memory to be in a certain placement for correct execution. Signed-off-by: Matthew Brost

[PATCH v3 1/5] drm/gpusvm: Introduce devmem_only flag for allocation

2025-04-22 Thread Matthew Brost
rn an -EFAULT error. v3: - s/vram_only/devmem_only/ Signed-off-by: Matthew Brost Signed-off-by: Himal Prasad Ghimiray --- drivers/gpu/drm/drm_gpusvm.c | 5 + include/drm/drm_gpusvm.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gp

[PATCH v3 2/5] drm/xe: Strict migration policy for atomic SVM faults

2025-04-22 Thread Matthew Brost
set vram_only on DGFX (Himal) - Bail on get_pages failure if vram_only and retry count exceeded (Himal) - s/vram_only/devmem_only - Update xe_svm_range_is_valid to accept devmem_only argument Signed-off-by: Himal Prasad Ghimiray Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_module.c

Re: [PATCH v2 2/5] drm/xe: Strict migration policy for atomic SVM faults

2025-04-22 Thread Matthew Brost
On Mon, Apr 21, 2025 at 12:09:15PM +0530, Ghimiray, Himal Prasad wrote: > > > On 17-04-2025 09:43, Matthew Brost wrote: > > Mixing GPU and CPU atomics does not work unless a strict migration > > policy of GPU atomics must be device memory. Enforce a policy of must be >

[PATCH v2 1/5] drm/gpusvm: Introduce vram_only flag for VRAM allocation

2025-04-18 Thread Matthew Brost
From: Himal Prasad Ghimiray This commit adds a new flag, vram_only, to the drm_gpusvm structure. The purpose of this flag is to ensure that the get_pages function allocates memory exclusively from the device's VRAM. If the allocation from VRAM fails, the function will return an -EFAULT error. Si

Re: [RFC PATCH 0/4] Enable SVM atomics in Xe / GPU SVM

2025-04-17 Thread Matthew Brost
On Wed, Apr 16, 2025 at 12:59:08PM -0700, Matthew Brost wrote: > On Wed, Apr 16, 2025 at 11:11:03AM -0700, Matthew Brost wrote: > > Minimal set of patches to enable compute UMD SVM atomics. > > > > Collaboration with Himal. > > > > Sending as RFC to see if we

[PATCH v2 2/5] drm/xe: Strict migration policy for atomic SVM faults

2025-04-16 Thread Matthew Brost
-by: Himal Prasad Ghimiray Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_module.c | 3 -- drivers/gpu/drm/xe/xe_module.h | 1 - drivers/gpu/drm/xe/xe_svm.c| 57 ++ drivers/gpu/drm/xe/xe_svm.h| 5 --- 4 files changed, 44 insertions(+), 22 deletions

[PATCH v2 4/5] drm/xe: Timeslice GPU on atomic SVM fault

2025-04-16 Thread Matthew Brost
Ensure GPU can make forward progress on an atomic SVM GPU fault by giving the GPU a timeslice of 5ms v2: - Reduce timeslice to 5ms - Double timeslice on retry - Split out GPU SVM changes into independent patch Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_svm.c | 2 ++ 1 file

[PATCH v2 3/5] drm/gpusvm: Add timeslicing support to GPU SVM

2025-04-16 Thread Matthew Brost
Add timeslicing support to GPU SVM which will guarantee the GPU a minimum execution time on piece of physical memory before migration back to CPU. Intended to implement strict migration policies which require memory to be in a certain placement for correct execution. Signed-off-by: Matthew Brost

[PATCH v2 0/5] Enable SVM atomics in Xe / GPU SVM

2025-04-16 Thread Matthew Brost
Minimal set of patches to enable compute UMD SVM atomics. Collaboration with Himal. Matt Himal Prasad Ghimiray (1): drm/gpusvm: Introduce vram_only flag for VRAM allocation Matthew Brost (4): drm/xe: Strict migration policy for atomic SVM faults drm/gpusvm: Add timeslicing support to GPU

[PATCH v2 5/5] drm/xe: Add atomic_svm_timeslice_ms debugfs entry

2025-04-16 Thread Matthew Brost
Add some informal control for atomic SVM fault GPU timeslice to be able to play around with values and tweak performance. v2: - Reduce timeslice default value to 5ms Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_debugfs.c | 38 drivers/gpu/drm/xe

Re: [RFC PATCH 0/4] Enable SVM atomics in Xe / GPU SVM

2025-04-16 Thread Matthew Brost
On Wed, Apr 16, 2025 at 11:11:03AM -0700, Matthew Brost wrote: > Minimal set of patches to enable compute UMD SVM atomics. > > Collaboration with Himal. > > Sending as RFC to see if we should pursue merging this series ASAP, the > solution of timeslicing may not be the final

[RFC PATCH 1/4] drm/gpusvm: Introduce vram_only flag for VRAM allocation

2025-04-16 Thread Matthew Brost
From: Himal Prasad Ghimiray This commit adds a new flag, vram_only, to the drm_gpusvm structure. The purpose of this flag is to ensure that the get_pages function allocates memory exclusively from the device's VRAM. If the allocation from VRAM fails, the function will return an -EFAULT error. Si

[RFC PATCH 4/4] drm/xe: Add atomic_svm_timeslice_ms debugfs entry

2025-04-16 Thread Matthew Brost
Add some informal control for atomic SVM fault GPU timeslice to be able to play around with values and tweak performance. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_debugfs.c | 38 drivers/gpu/drm/xe/xe_device.c | 1 + drivers/gpu/drm/xe

[RFC PATCH 2/4] drm/xe: Strict migration policy for atomic SVM faults

2025-04-16 Thread Matthew Brost
Mixing GPU and CPU atomics does not work unless a strict migration policy of GPU atomics must be device memory. Enforce a policy of must be in VRAM with a retry loop of 2 attempts, if retry loop fails abort fault. Signed-off-by: Himal Prasad Ghimiray Signed-off-by: Matthew Brost --- drivers

[RFC PATCH 3/4] drm/xe: Timeslice GPU on atomic SVM fault

2025-04-16 Thread Matthew Brost
Ensure GPU can make forward progress on an atomic SVM GPU fault by giving the GPU a timeslice of 10 MS. Signed-off-by: Matthew Brost --- drivers/gpu/drm/drm_gpusvm.c | 9 + drivers/gpu/drm/xe/xe_svm.c | 1 + include/drm/drm_gpusvm.h | 5 + 3 files changed, 15 insertions

[RFC PATCH 0/4] Enable SVM atomics in Xe / GPU SVM

2025-04-16 Thread Matthew Brost
(1): drm/gpusvm: Introduce vram_only flag for VRAM allocation Matthew Brost (3): drm/xe: Strict migration policy for atomic SVM faults drm/xe: Timeslice GPU on atomic SVM fault drm/xe: Add atomic_svm_timeslice_ms debugfs entry drivers/gpu/drm/drm_gpusvm.c | 14 +++ drivers

Re: [PATCH v2 2/4] drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access

2025-04-09 Thread Matthew Brost
On Thu, Apr 03, 2025 at 03:28:48PM -0600, Cavitt, Jonathan wrote: > -Original Message- > From: Intel-xe On Behalf Of Matthew > Brost > Sent: Thursday, April 3, 2025 1:27 PM > To: intel...@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Subject: [PATCH v

Re: [PATCH 5/7] drm/gpusvm: lower get/unmap pages

2025-04-05 Thread Matthew Brost
e next > patch we want to extract get/unmap/free to operate on a different range > type. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Matthew Brost > --- > drivers/gpu/drm/drm_gpusvm.c | 90 ++-- > 1 file change

[PATCH v2 4/4] drm/xe: Abort printing coredump in VM printer output if full

2025-04-05 Thread Matthew Brost
Abort printing coredump in VM printer output if full. Helps speedup large coredumps which need to walked multiple times in xe_devcoredump_read. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_vm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers

[PATCH v2 0/4] Large devcoredump file support

2025-04-05 Thread Matthew Brost
Devcoredump were truncated at 2G, remove this restriction. While here, add support for GPU copies of BOs to increase devcoredump speed. v2: - Fix build error - Abort printing once printer if full Matthew Brost (4): drm/xe: Add devcoredump chunking drm/xe: Update xe_ttm_access_memory to use

Re: [PATCH v2 7/7] drm/xe/pt: unify xe_pt_svm_pre_commit with userptr

2025-04-04 Thread Matthew Brost
On Fri, Apr 04, 2025 at 09:19:34AM +0100, Matthew Auld wrote: > On 03/04/2025 22:25, Matthew Brost wrote: > > On Fri, Mar 28, 2025 at 06:10:36PM +, Matthew Auld wrote: > > > We now use the same notifier lock for SVM and userptr, with that we can > > > combine x

Re: [PATCH v2 7/7] drm/xe/pt: unify xe_pt_svm_pre_commit with userptr

2025-04-03 Thread Matthew Brost
On Fri, Mar 28, 2025 at 06:10:36PM +, Matthew Auld wrote: > We now use the same notifier lock for SVM and userptr, with that we can > combine xe_pt_userptr_pre_commit and xe_pt_svm_pre_commit. > > Suggested-by: Matthew Brost > Signed-off-by: Matthew Auld > Cc: Himal Pra

Re: [PATCH v2 1/4] drm/xe: Add devcoredump chunking

2025-04-03 Thread Matthew Brost
On Thu, Apr 03, 2025 at 03:41:16PM -0700, John Harrison wrote: > On 4/3/2025 3:32 PM, Matthew Brost wrote: > > On Thu, Apr 03, 2025 at 02:39:16PM -0700, John Harrison wrote: > > > On 4/3/2025 1:27 PM, Matthew Brost wrote: > > > > Chunk devcoredump into 1.5G pieces

Re: [PATCH v2 1/4] drm/xe: Add devcoredump chunking

2025-04-03 Thread Matthew Brost
On Thu, Apr 03, 2025 at 02:39:16PM -0700, John Harrison wrote: > On 4/3/2025 1:27 PM, Matthew Brost wrote: > > Chunk devcoredump into 1.5G pieces to avoid hitting the kvmalloc limit > > of 2G. Simple algorithm reads 1.5G at time in xe_devcoredump_read > > callback as needed. &

Re: [PATCH v2 7/7] drm/xe/pt: unify xe_pt_svm_pre_commit with userptr

2025-04-03 Thread Matthew Brost
On Fri, Mar 28, 2025 at 06:10:36PM +, Matthew Auld wrote: > We now use the same notifier lock for SVM and userptr, with that we can > combine xe_pt_userptr_pre_commit and xe_pt_svm_pre_commit. > > Suggested-by: Matthew Brost > Signed-off-by: Matthew Auld > Cc: Himal Pra

Re: [PATCH v2 3/7] drm/gpusvm: pull out drm_gpusvm_pages substructure

2025-04-03 Thread Matthew Brost
s, which can then be re-used for stuff like userptr. > > v2: > - Move seq into pages struct (Matt B) > > Suggested-by: Matthew Brost Reviewed-by: Matthew Brost > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > ---

[PATCH v2 3/4] drm/print: Add drm_printer_is_full

2025-04-03 Thread Matthew Brost
Add drm_printer_is_full which indicates if a drm printer's output is full. Useful to short circuit coredump printing once printer's output is full. Signed-off-by: Matthew Brost --- include/drm/drm_print.h | 17 + 1 file changed, 17 insertions(+) diff --git a/i

[PATCH v2 1/4] drm/xe: Add devcoredump chunking

2025-04-03 Thread Matthew Brost
Chunk devcoredump into 1.5G pieces to avoid hitting the kvmalloc limit of 2G. Simple algorithm reads 1.5G at time in xe_devcoredump_read callback as needed. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_devcoredump.c | 59 ++- drivers/gpu/drm/xe

  1   2   3   4   5   6   7   8   9   10   >