[PATCH v2 2/9] drm/ttm: Use LRU hitches

2024-04-16 Thread Thomas Hellström
omalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_device.c | 9 ++- drivers/gpu/drm/ttm/ttm_resource.c | 94 -- include/drm/ttm/ttm_resource.h | 16 +++-- 4 files changed, 82 inserti

[PATCH v2 1/9] drm/ttm: Allow TTM LRU list nodes of different types

2024-04-16 Thread Thomas Hellström
. Changes in previous series: - Update enum ttm_lru_item_type documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 13 -- drivers/gpu/drm/ttm/ttm_resource.c | 70 ++ include

[PATCH v2 0/9] TTM shrinker helpers and xe buffer object shrinker

2024-04-16 Thread Thomas Hellström
vers/gpu/drm/xe/xe_shrinker.c create mode 100644 drivers/gpu/drm/xe/xe_shrinker.h create mode 100644 drivers/gpu/drm/xe/xe_ttm_helpers.c create mode 100644 drivers/gpu/drm/xe/xe_ttm_helpers.h create mode 100644 include/drm/ttm/ttm_backup.h -- 2.44.0 Thomas Hellström (9): drm/ttm: Allow TTM LR

Re: Cross-device and cross-driver HMM support

2024-04-09 Thread Thomas Hellström
Hi, On Wed, 2024-04-03 at 12:09 -0300, Jason Gunthorpe wrote: > On Wed, Apr 03, 2024 at 04:06:11PM +0200, Christian König wrote: > > [UGH html emails, try to avoid those they don't get archived!] > > >    The problem with that isn't the software but the hardware. > >    At least on the AMD GPUs

Re: [RFC PATCH 0/8] TTM shrinker helpers and xe buffer object shrinker

2024-04-08 Thread Thomas Hellström
Hi, Amaranath, On Tue, 2024-04-02 at 17:25 +0530, Somalapuram, Amaranath wrote: > > On 3/29/2024 8:26 PM, Thomas Hellström wrote: > > This series implements TTM shrinker / eviction helpers and an xe bo > > shrinker. It builds on two previous series. First > > > >

Re: [PATCH 2/8] drm/ttm: Use LRU hitches

2024-04-08 Thread Thomas Hellström
On Fri, 2024-04-05 at 14:41 +0200, Christian König wrote: > Am 29.03.24 um 15:57 schrieb Thomas Hellström: > > Have iterators insert themselves into the list they are iterating > > over using hitch list nodes. Since only the iterator owner > > can remove these list nodes fro

Re: [PATCH 1/8] drm/ttm: Allow TTM LRU list nodes of different types

2024-04-08 Thread Thomas Hellström
Hi, Christian. Thanks for reviewing. On Fri, 2024-04-05 at 14:34 +0200, Christian König wrote: > Am 29.03.24 um 15:57 schrieb Thomas Hellström: > > To be able to handle list unlocking while traversing the LRU > > list, we want the iterators not only to point to the next > >

[RFC PATCH 8/8] drm/xe: Add a shrinker for xe bos

2024-03-29 Thread Thomas Hellström
m_tts. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_bo.c | 123 -- drivers/gpu/drm/xe/xe_bo.h | 3 + drivers/gpu/drm/xe/xe_device.c | 8 + drivers/gpu/drm/xe/xe_device_types.h | 2 + drivers/gp

[PATCH 1/8] drm/ttm: Allow TTM LRU list nodes of different types

2024-03-29 Thread Thomas Hellström
. v2: - Update enum ttm_lru_item_type documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 13 -- drivers/gpu/drm/ttm/ttm_resource.c | 70 ++ include/drm/ttm/ttm_resource.h

[PATCH 3/8] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves

2024-03-29 Thread Thomas Hellström
ty v3: - Avoid a NULL pointer dereference assigning manager->mem_type v4: - Remove some leftover code causing build problems Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++ drivers/gpu/drm/ttm/ttm_resource.c

[RFC PATCH 5/8] drm/ttm: Add a virtual base class for graphics memory backup

2024-03-29 Thread Thomas Hellström
abstraction, this functionality may actually come in handy for configurable dedicated graphics memory backup to fast nvme files or similar, whithout affecting swap-space. Could indeed be useful for VRAM backup on S4 and other cases. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/Makefile

[RFC PATCH 7/8] drm/xe, drm/ttm: Provide a generic LRU walker helper

2024-03-29 Thread Thomas Hellström
other drivers. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_resource.c | 3 + drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_ttm_helpers.c | 150 drivers/gpu/drm/xe/xe_ttm_helpers.h | 60 +++ 4 files changed, 214

[PATCH 4/8] drm/ttm: Allow continued swapout after -ENOSPC falure

2024-03-29 Thread Thomas Hellström
puram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index e8a6a1dab669..4a030b4bc848 100644 --- a/driver

[RFC PATCH 6/8] drm/ttm/pool: Provide a helper to shrink pages.

2024-03-29 Thread Thomas Hellström
im by the core. Due to potential backup- and recover errors, allow partially swapped out struct ttm_tt's, although mark them as swapped out stopping them from being swapped out a second time. More details in the ttm_pool.c DOC section. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/

[RFC PATCH 0/8] TTM shrinker helpers and xe buffer object shrinker

2024-03-29 Thread Thomas Hellström
rifying content preservation. Cc: Somalapuram Amaranath Cc: Christian König Cc: Thomas Hellström (8): drm/ttm: Allow TTM LRU list nodes of different types drm/ttm: Use LRU hitches drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves drm/ttm: Allow continue

[PATCH 2/8] drm/ttm: Use LRU hitches

2024-03-29 Thread Thomas Hellström
This will be addressed in a later patch. v2: - Updated ttm_resource_cursor_fini() documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_device.c | 9 ++- drivers/gpu/dr

Cross-device and cross-driver HMM support

2024-03-27 Thread Thomas Hellström
Hi! With our SVM mirror work we'll soon start looking at HMM cross-device support. The identified needs are 1) Instead of migrating foreign device memory to system when the current device is faulting, leave it in place... 1a) for access using internal interconnect, 1b) for access using PCIE p2p (

Re: [PATCH v4 0/4] TTM unlockable restartable LRU list iteration

2024-03-13 Thread Thomas Hellström
Hi! On Mon, 2024-03-11 at 14:07 +0100, Thomas Hellström wrote: > On Fri, 2024-03-08 at 13:13 +0530, Somalapuram, Amaranath wrote: > > Patches are tested on AMD platform. > > Repeated stress test on Unigine Heaven, memory full (VRAM + GTT + > > system > > SWAP), then

Re: [PATCH] drm/ttm: warn when resv objs are mixed in a bulk_move

2024-03-13 Thread Thomas Hellström
Tested with Xe CI, Reviewed-by: Thomas Hellström > --- >  drivers/gpu/drm/ttm/ttm_resource.c | 1 + >  include/drm/ttm/ttm_resource.h | 3 +++ >  2 files changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/ttm/ttm_resource.c > b/drivers/gpu/drm/ttm/ttm_resour

Re: [PATCH v4 0/4] TTM unlockable restartable LRU list iteration

2024-03-11 Thread Thomas Hellström
re testing locally against Intel Xe CI and Intel i915 CI which should give rather good coverage. If there are some amdgpu tests that exercise eviction / swapping also with a lot of local objects (Vulkan apps?) that would be great. Thanks, Thomas > > Regards, > S.Amarnath > On 3/6/2024 12

Re: [PATCH v4 2/4] drm/ttm: Use LRU hitches

2024-03-11 Thread Thomas Hellström
Hi! Thanks for reviewing. On Fri, 2024-03-08 at 18:50 +0530, Somalapuram, Amaranath wrote: > > On 3/6/2024 12:31 PM, Thomas Hellström wrote: > > Have iterators insert themselves into the list they are iterating > > over using hitch list nodes. Since only the iterator owner &g

[PATCH v4 3/4] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves

2024-03-05 Thread Thomas Hellström
ty v3: - Avoid a NULL pointer dereference assigning manager->mem_type v4: - Remove some leftover code causing build problems Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++ drivers/gpu/drm/ttm/ttm_resource.c

[PATCH v4 2/4] drm/ttm: Use LRU hitches

2024-03-05 Thread Thomas Hellström
This will be addressed in a later patch. v2: - Updated ttm_resource_cursor_fini() documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_device.c | 9 ++- drivers/gpu/dr

[PATCH v4 4/4] drm/ttm: Allow continued swapout after -ENOSPC falure

2024-03-05 Thread Thomas Hellström
puram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index e8a6a1dab669..4a030b4bc848 100644 --- a/driver

[PATCH v4 1/4] drm/ttm: Allow TTM LRU list nodes of different types

2024-03-05 Thread Thomas Hellström
. v2: - Update enum ttm_lru_item_type documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 13 -- drivers/gpu/drm/ttm/ttm_resource.c | 70 ++ include/drm/ttm/ttm_resource.h

[PATCH v4 0/4] TTM unlockable restartable LRU list iteration

2024-03-05 Thread Thomas Hellström
tover code causing build problems. Cc: Somalapuram Amaranath Cc: Christian König Cc: Thomas Hellström (4): drm/ttm: Allow TTM LRU list nodes of different types drm/ttm: Use LRU hitches drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves drm/ttm: Allow continu

[PATCH v3 4/4] drm/ttm: Allow continued swapout after -ENOSPC falure

2024-03-05 Thread Thomas Hellström
puram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index e8a6a1dab669..4a030b4bc848 100644 --- a/driver

[PATCH v3 3/4] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves

2024-03-05 Thread Thomas Hellström
ty v3: - Avoid a NULL pointer dereference assigning manager->mem_type Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++ drivers/gpu/drm/ttm/ttm_resource.c | 90 +- drivers/gpu/drm/xe

[PATCH v3 1/4] drm/ttm: Allow TTM LRU list nodes of different types

2024-03-05 Thread Thomas Hellström
. v2: - Update enum ttm_lru_item_type documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 13 -- drivers/gpu/drm/ttm/ttm_resource.c | 70 ++ include/drm/ttm/ttm_resource.h

[PATCH v3 2/4] drm/ttm: Use LRU hitches

2024-03-05 Thread Thomas Hellström
This will be addressed in a later patch. v2: - Updated ttm_resource_cursor_fini() documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_device.c | 9 ++- drivers/gpu/dr

[PATCH v3 0/4] TTM unlockable restartable LRU list iteration

2024-03-05 Thread Thomas Hellström
ranath Cc: Christian König Cc: Thomas Hellström (4): drm/ttm: Allow TTM LRU list nodes of different types drm/ttm: Use LRU hitches drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves drm/ttm: Allow continued swapout after -ENOSPC falure drivers/gpu/drm/

[PATCH v2 4/4] drm/ttm: Allow continued swapout after -ENOSPC falure

2024-03-05 Thread Thomas Hellström
puram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index e8a6a1dab669..4a030b4bc848 100644 --- a/driver

[PATCH v2 2/4] drm/ttm: Use LRU hitches

2024-03-05 Thread Thomas Hellström
This will be addressed in a later patch. v2: - Updated ttm_resource_cursor_fini() documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_device.c | 9 ++- drivers/gpu/dr

[PATCH v2 3/4] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves

2024-03-05 Thread Thomas Hellström
y Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++ drivers/gpu/drm/ttm/ttm_resource.c | 89 +- drivers/gpu/drm/xe/xe_vm.c | 4 ++ include/drm/ttm/ttm_device.h

[PATCH v2 1/4] drm/ttm: Allow TTM LRU list nodes of different types

2024-03-05 Thread Thomas Hellström
. v2: - Update enum ttm_lru_item_type documentation. Cc: Christian König Cc: Somalapuram Amaranath Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 13 -- drivers/gpu/drm/ttm/ttm_resource.c | 70 ++ include/drm/ttm/ttm_resource.h

[PATCH v2 0/4] TTM unlockable restartable LRU list iteration

2024-03-05 Thread Thomas Hellström
t. This is implemented in patch 3. The restartable property is used in patch 4 to restart swapout if needed, but the main purpose is this paves the way for shrinker- and exhaustive eviction. v2: - Rework patch 3 completely. Cc: Somalapuram Amaranath Cc: Christian König Cc: Thomas Hellström (4):

Re: [PATCH 0/4] TTM unlockable restartable LRU list iteration

2024-03-01 Thread Thomas Hellström
On Fri, 2024-03-01 at 15:20 +0100, Christian König wrote: > Am 01.03.24 um 14:45 schrieb Thomas Hellström: > > On Thu, 2024-02-29 at 18:34 +0100, Thomas Hellström wrote: > > > Hi, Christian. > > > > > > Thanks for having a look. > > > > > &

Re: [PATCH 0/4] TTM unlockable restartable LRU list iteration

2024-03-01 Thread Thomas Hellström
On Thu, 2024-02-29 at 18:34 +0100, Thomas Hellström wrote: > Hi, Christian. > > Thanks for having a look. > > On Thu, 2024-02-29 at 16:08 +0100, Christian König wrote: > > Am 16.02.24 um 15:20 schrieb Thomas Hellström: > > [SNIP] > > > > My approach was ba

Re: [PATCH 1/2] drm/ttm: improve idle/busy handling v5

2024-03-01 Thread Thomas Hellström
by Matthew > > Signed-off-by: Christian König > Reviewed-by: Zack Rusin v3 Now Xe CI passes \o/ Still some checkpatch.pl warnings on both these lines. For the first line I think it uses From: in the email as the author and when that doesn't match the SOB, it becomes unhapp

Re: [PATCH 0/4] TTM unlockable restartable LRU list iteration

2024-02-29 Thread Thomas Hellström
Hi, Christian. Thanks for having a look. On Thu, 2024-02-29 at 16:08 +0100, Christian König wrote: > Am 16.02.24 um 15:20 schrieb Thomas Hellström: > [SNIP] > > > My approach was basically to not only lock the current BO, but > > > also > > > the > > >

Re: Making drm_gpuvm work across gpu devices

2024-02-29 Thread Thomas Hellström
Hi, Christian. On Thu, 2024-02-29 at 10:41 +0100, Christian König wrote: > Am 28.02.24 um 20:51 schrieb Zeng, Oak: > > > > The mail wasn’t indent/preface correctly. Manually format it. > > > > *From:*Christian König > > *Sent:* Tuesday, February 27, 2024 1:54 AM > > *To:* Zeng, Oak ; Danilo Kru

Re: [PATCH] xe: avoid using writeq() on 32-bit

2024-02-28 Thread Thomas Hellström
Hi, Arnd, On Wed, 2024-02-28 at 13:27 +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > 32-bit kernels do not provide a writeq(), failing the build: > > drivers/gpu/drm/xe/xe_ggtt.c:78:2: error: use of undeclared > identifier 'writeq' >    78 | writeq(pte, &ggtt->gsm[addr >> XE_PTE_

Re: [PATCH 1/2] drm/ttm: improve idle/busy handling v4

2024-02-26 Thread Thomas Hellström
Hi, Christian On Fri, 2024-02-23 at 15:30 +0100, Christian König wrote: > Am 06.02.24 um 13:56 schrieb Christian König: > > Am 06.02.24 um 13:53 schrieb Thomas Hellström: > > > Hi, Christian, > > > > > > On Fri, 2024-01-26 at 15:09 +0100, Christian König wrot

Re: [PATCH 8/9] drm/xe/tests: Fix printf format specifiers in xe_migrate test

2024-02-22 Thread Thomas Hellström
ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel > GPUs") > Signed-off-by: David Gow Ack to merge through the Kunit tree. Acked-by: Thomas Hellström

Re: [PATCH] drm/ttm: Fix an invalid freeing on already freed page in error path

2024-02-22 Thread Thomas Hellström
On Thu, 2024-02-22 at 08:34 +0100, Thomas Hellström wrote: > On Wed, 2024-02-21 at 11:26 +0100, Christian König wrote: > > Am 21.02.24 um 08:33 schrieb Thomas Hellström: > > > If caching mode change fails due to, for example, OOM we > > > free the allocated pages in a

Re: [PATCH] drm/ttm: Fix an invalid freeing on already freed page in error path

2024-02-21 Thread Thomas Hellström
On Wed, 2024-02-21 at 11:26 +0100, Christian König wrote: > Am 21.02.24 um 08:33 schrieb Thomas Hellström: > > If caching mode change fails due to, for example, OOM we > > free the allocated pages in a two-step process. First the pages > > for which the caching change

[PATCH] drm/ttm: Fix an invalid freeing on already freed page in error path

2024-02-20 Thread Thomas Hellström
already freed in the first step. Fix. Signed-off-by: Thomas Hellström Fixes: 379989e7cbdc ("drm/ttm/pool: Fix ttm_pool_alloc error path") Cc: Christian König Cc: Dave Airlie Cc: Christian Koenig Cc: Huang Rui Cc: dri-devel@lists.freedesktop.org Cc: # v6.4+ --- drivers/gpu/drm/ttm/

Re: [PATCH 0/4] TTM unlockable restartable LRU list iteration

2024-02-16 Thread Thomas Hellström
On Fri, 2024-02-16 at 15:00 +0100, Christian König wrote: > Am 16.02.24 um 14:13 schrieb Thomas Hellström: > > This patch-set is a prerequisite for a standalone TTM shrinker > > and for exhaustive TTM eviction using sleeping dma_resv locks, > > which is the motivation it. &g

[PATCH 4/4] drm/ttm: Allow continued swapout after -ENOSPC falure

2024-02-16 Thread Thomas Hellström
ff-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index e8a6a1dab669..4a030b4bc848 100644 --- a/drivers/gpu/drm/ttm/ttm_device.c

[PATCH 3/4] drm/ttm: Consider hitch moves within bulk sublist moves

2024-02-16 Thread Thomas Hellström
. Sublist bumps are detected by checking the sublist age which is increased by 1 each time it was bumped. The age is then compared to that of the last iteration returning an item within the sublist. Cc: Christian König Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_resource.c

[PATCH 2/4] drm/ttm: Use LRU hitches

2024-02-16 Thread Thomas Hellström
This will be addressed in a later patch. Cc: Christian König Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_device.c | 9 ++- drivers/gpu/drm/ttm/ttm_resource.c | 94 -- include/drm/ttm/ttm_resource.h

[PATCH 1/4] drm/ttm: Allow TTM LRU list nodes of different types

2024-02-16 Thread Thomas Hellström
. Cc: Christian König Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 13 -- drivers/gpu/drm/ttm/ttm_resource.c | 70 ++ include/drm/ttm/ttm_resource.h | 51 +- 3 files changed, 110 insertions(+), 24 deletions

[PATCH 0/4] TTM unlockable restartable LRU list iteration

2024-02-16 Thread Thomas Hellström
roperty is used in patch 4 to restart swapout if needed, but the main purpose is this paves the way for shrinker- and exhaustive eviction. Cc: Christian König Cc: Thomas Hellström (4): drm/ttm: Allow TTM LRU list nodes of different types drm/ttm: Use LRU hitches drm/ttm: Consider hitch mo

Re: [PULL] drm-intel-gt-next

2024-02-16 Thread Thomas Hellström
On Fri, 2024-02-16 at 10:31 +0100, Thomas Hellström wrote: > Hi, Dave > > On Fri, 2024-02-16 at 12:58 +1000, Dave Airlie wrote: > > On Thu, 15 Feb 2024 at 20:06, Tvrtko Ursulin > > wrote: > > > > > > Hi Dave, Daniel, > > > > > > First

Re: [PULL] drm-intel-gt-next

2024-02-16 Thread Thomas Hellström
Hi, Dave On Fri, 2024-02-16 at 12:58 +1000, Dave Airlie wrote: > On Thu, 15 Feb 2024 at 20:06, Tvrtko Ursulin > wrote: > > > > Hi Dave, Daniel, > > > > First pull request for 6.9 with probably one more coming in one to > > two > > weeks. > > > > Nothing to interesting in this one, mostly a spr

Re: [PATCH] drm/xe: avoid function cast warnings

2024-02-14 Thread Thomas Hellström
Hi, On Tue, 2024-02-13 at 10:56 +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > clang-16 warns about a cast between incompatible function types: > > drivers/gpu/drm/xe/xe_range_fence.c:155:10: error: cast from 'void > (*)(const void *)' to 'void (*)(struct xe_range_fence *)' converts to >

Re: [PATCH] drm/xe: avoid function cast warnings

2024-02-13 Thread Thomas Hellström
trivial helper function that calls kfree() here. > > Fixes: 845f64bdbfc9 ("drm/xe: Introduce a range-fence utility") > Signed-off-by: Arnd Bergmann Thanks, will push as soon as it passes CI. Reviewed-by: Thomas Hellström > --- >  drivers/gpu/drm/xe/xe_range_fence.c | 7 +++

Re: [PATCH drm-misc-next] drm/xe: fix arguments to drm_err_printer()

2024-02-13 Thread Thomas Hellström
c04c8c40b ("drm/print: make drm_err_printer() device > specific by using drm_err()") > Cc: Luca Coelho > Cc: Maxime Ripard > Cc: Thomas Hellström > Signed-off-by: Jani Nikula Reviewed-by: Thomas Hellström > > --- > > Argh. This is getting embarrassing. This

[PATCH drm-misc-next] drm/xe: Fix a missing argument to drm_err_printer

2024-02-12 Thread Thomas Hellström
ned-off-by: Thomas Hellström --- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c index 7eef23a00d77..d42645fdfc02 100644 --- a/drivers/

Re: xe vs amdgpu userptr handling

2024-02-08 Thread Thomas Hellström
On Thu, 2024-02-08 at 12:08 +0100, Christian König wrote: > Am 08.02.24 um 10:43 schrieb Thomas Hellström: > > On Thu, 2024-02-08 at 10:38 +0100, Thomas Hellström wrote: > > > Hi, > > > > > > On Thu, 2024-02-08 at 07:30 +0100, Christian König wrote: >

Re: xe vs amdgpu userptr handling

2024-02-08 Thread Thomas Hellström
On Thu, 2024-02-08 at 10:38 +0100, Thomas Hellström wrote: > Hi, > > On Thu, 2024-02-08 at 07:30 +0100, Christian König wrote: > > Am 08.02.24 um 01:36 schrieb Dave Airlie: > > > Just cc'ing some folks. I've also added another question. > > > >

Re: xe vs amdgpu userptr handling

2024-02-08 Thread Thomas Hellström
Hi, On Thu, 2024-02-08 at 07:30 +0100, Christian König wrote: > Am 08.02.24 um 01:36 schrieb Dave Airlie: > > Just cc'ing some folks. I've also added another question. > > > > On Wed, 7 Feb 2024 at 21:08, Maíra Canal wrote: > > > Adding another point to this discussion, would it make sense to >

Re: Re: linux-next: build failure after merge of the drm-misc tree

2024-02-06 Thread Thomas Hellström
On Tue, 2024-02-06 at 14:21 -0600, Lucas De Marchi wrote: > On Tue, Feb 06, 2024 at 01:39:28PM +0100, Thomas Hellström wrote: > > Hi > > > > On Tue, 2024-02-06 at 12:28 +1100, Stephen Rothwell wrote: > > > Hi all, > > > > > > After merging the

Re: [PATCH 1/2] drm/ttm: improve idle/busy handling v4

2024-02-06 Thread Thomas Hellström
Hi, Christian, On Fri, 2024-01-26 at 15:09 +0100, Christian König wrote: > Previously we would never try to move a BO into the preferred > placements > when it ever landed in a busy placement since those were considered > compatible. > > Rework the whole handling and finally unify the idle and bu

Re: linux-next: build failure after merge of the drm-misc tree

2024-02-06 Thread Thomas Hellström
Hi On Tue, 2024-02-06 at 12:28 +1100, Stephen Rothwell wrote: > Hi all, > > After merging the drm-misc tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > > Caused by commit > >   a78a8da51b36 ("drm/ttm: replace busy placement with flags v6") > > interacting with comm

Re: [PULL] drm-xe-fixes

2024-02-01 Thread Thomas Hellström
On Thu, 2024-02-01 at 12:37 +0100, Thomas Hellstrom wrote: > Hi Dave and Sima, > > The xe fixes for 6.8-rc2. > Should ofc be 6.8-rc3. /Thomas

Re: [GIT PULL] Enable -Wstringop-overflow globally

2024-01-30 Thread Thomas Hellström
Hi, On 1/27/24 20:53, Gustavo A. R. Silva wrote: On 1/27/24 09:11, David Laight wrote: From: Linus Torvalds Sent: 26 January 2024 22:36 On Fri, 26 Jan 2024 at 14:24, Kees Cook wrote: I think xe has some other weird problems too. This may be related (under allocating): ../drivers/gpu/d

Re: [PATCH] drm/xe: Fix a build error

2024-01-30 Thread Thomas Hellström
On 1/30/24 15:31, Christian König wrote: Am 29.01.24 um 21:25 schrieb Thomas Hellström: Hi, On 1/29/24 17:48, Christian König wrote: Am 27.01.24 um 16:53 schrieb Oak Zeng: This fixes a build failure on drm-tip. This issue was introduced during merge of "drm/ttm: replace busy plac

Re: Making drm_gpuvm work across gpu devices

2024-01-30 Thread Thomas Hellström
erent address space on different CPU cores? Regards, Oak *From:*dri-devel *On Behalf Of *Christian König *Sent:* Monday, January 29, 2024 5:20 AM *To:* Zeng, Oak ; Thomas Hellström ; Daniel Vetter ; Dave Airlie *Cc:* Brost, Matthew ; Felix Kuehling ; Welty, Brian ; dri-devel@lists.freedes

Re: [PATCH] drm/xe: Fix a build error

2024-01-30 Thread Thomas Hellström
Christian had added somehow didn't work, so I removed it and added a new one. We never apply patches directly on drm-tip. /Thomas As long as drm-tip can build, I am all good. Thanks, Oak -Original Message----- From: Thomas Hellström Sent: Monday, January 29, 2024 3:26 PM To: Christia

Re: [PATCH] drm/xe: Fix a build error

2024-01-29 Thread Thomas Hellström
Hi, On 1/29/24 17:48, Christian König wrote: Am 27.01.24 um 16:53 schrieb Oak Zeng: This fixes a build failure on drm-tip. This issue was introduced during merge of "drm/ttm: replace busy placement with flags v6". For some reason, the xe_bo.c part of above change is not merged. Manually merge t

Re: Re: Re: [PATCH 3/5] drm/ttm: replace busy placement with flags v6

2024-01-29 Thread Thomas Hellström
On Fri, 2024-01-26 at 16:22 -0600, Lucas De Marchi wrote: > On Fri, Jan 26, 2024 at 04:16:58PM -0600, Lucas De Marchi wrote: > > On Thu, Jan 18, 2024 at 05:38:16PM +0100, Thomas Hellström wrote: > > > > > > On 1/17/24 13:27, Thomas Hellström wrote: > > >

Re: linux-next: build warning after merge of the drm tree

2024-01-26 Thread Thomas Hellström
On Thu, 2024-01-25 at 11:33 +1100, Stephen Rothwell wrote: > Hi all, > > On Fri, 5 Jan 2024 17:47:45 +1100 Stephen Rothwell > wrote: > > > > After merging the drm tree, today's linux-next build (htmldocs) > > produced > > this warning: > > > > Warning: /sys/devices/.../hwmon/hwmon/curr1_crit is

Re: Making drm_gpuvm work across gpu devices

2024-01-26 Thread Thomas Hellström
Hi, all On Thu, 2024-01-25 at 19:32 +0100, Daniel Vetter wrote: > On Wed, Jan 24, 2024 at 09:33:12AM +0100, Christian König wrote: > > Am 23.01.24 um 20:37 schrieb Zeng, Oak: > > > [SNIP] > > > Yes most API are per device based. > > > > > > One exception I know is actually the kfd SVM API. If you

Re: [PATCH] drm/exec, drm/gpuvm: Prefer u32 over uint32_t

2024-01-22 Thread Thomas Hellström
Hi, On 1/19/24 16:32, Jani Nikula wrote: On Fri, 19 Jan 2024, Lucas De Marchi wrote: On Fri, Jan 19, 2024 at 10:05:57AM +0100, Thomas Hellström wrote: The relatively recently introduced drm/exec utility was using uint32_t in its interface, which was then also carried over to drm/gpuvm

[PATCH] drm/exec, drm/gpuvm: Prefer u32 over uint32_t

2024-01-19 Thread Thomas Hellström
The relatively recently introduced drm/exec utility was using uint32_t in its interface, which was then also carried over to drm/gpuvm. Prefer u32 in new code and update drm/exec and drm/gpuvm accordingly. Cc: Christian König Cc: Danilo Krummrich Signed-off-by: Thomas Hellström --- drivers

Re: [PATCH 4/5] drm/ttm: improve idle/busy handling v3

2024-01-18 Thread Thomas Hellström
On 1/18/24 15:24, Thomas Hellström wrote: On Fri, 2024-01-12 at 13:51 +0100, Christian König wrote: Previously we would never try to move a BO into the preferred placements when it ever landed in a busy placement since those were considered compatible. Rework the whole handling and finally

Re: [PATCH 3/5] drm/ttm: replace busy placement with flags v6

2024-01-18 Thread Thomas Hellström
On 1/17/24 13:27, Thomas Hellström wrote: On 1/17/24 11:47, Thomas Hellström wrote: Hi, Christian Xe changes look good. Will send the series to xe ci to check for regressions. Hmm, there are some checkpatch warnings about author / SOB email mismatch, With those fixed, this patch is

Re: [PATCH 4/5] drm/ttm: improve idle/busy handling v3

2024-01-18 Thread Thomas Hellström
On Fri, 2024-01-12 at 13:51 +0100, Christian König wrote: > Previously we would never try to move a BO into the preferred > placements > when it ever landed in a busy placement since those were considered > compatible. > > Rework the whole handling and finally unify the idle and busy > handling. >

Re: [PATCH 3/5] drm/ttm: replace busy placement with flags v6

2024-01-17 Thread Thomas Hellström
On 1/17/24 11:47, Thomas Hellström wrote: Hi, Christian Xe changes look good. Will send the series to xe ci to check for regressions. Hmm, there are some checkpatch warnings about author / SOB email mismatch, But worserthere are some regressions in the dma-buf ktest (it tests evicting of

Re: [PATCH 3/5] drm/ttm: replace busy placement with flags v6

2024-01-17 Thread Thomas Hellström
Hi, Christian Xe changes look good. Will send the series to xe ci to check for regressions. /Thomas On 1/12/24 13:51, Christian König wrote: From: Somalapuram Amaranath Instead of a list of separate busy placement add flags which indicate that a placement should only be used when there is

Re: [PATCH 2/5] drm/ttm: return ENOSPC from ttm_bo_mem_space

2024-01-17 Thread Thomas Hellström
propagated back to drivers as well at some point, but then perhaps guarded with a flag in the operation context. In any case Reviewed-by: Thomas Hellström Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a

[PULL] drm-xe-next-fixes

2024-01-16 Thread Thomas Hellström
rm/xe: Fix exec IOCTL long running exec queue ring full condition Paul E. McKenney (1): drm/xe: Fix build bug for GCC 11 Thomas Hellström (6): drm/xe/vm: Fix an error path drm/xe: Use __iomem for the regs pointer drm/xe: Annotate xe_mem_region::mapping with __iomem d

Re: [PATCH] nightly.conf: Add the xe repo to drm-tip

2024-01-10 Thread Thomas Hellström
On Mon, 2024-01-08 at 16:22 -0600, Lucas De Marchi wrote: > On Mon, Jan 08, 2024 at 05:13:51PM -0500, Rodrigo Vivi wrote: > > On Wed, Jan 03, 2024 at 11:59:16PM -0600, Lucas De Marchi wrote: > > > On Wed, Jan 03, 2024 at 02:50:57PM +0100, Thomas Hellström wrote: > > > &g

[PATCH] nightly.conf: Reorder the xe repo URLs

2024-01-09 Thread Thomas Hellström
Select the https URL by default for xe since users may not have registered a gitlab ssh key yet, and may get confused by the corresponding error message. Suggested-by: Daniel Vetter Cc: intel...@lists.freedesktop.org Cc: Lucas De Marchi Signed-off-by: Thomas Hellström --- nightly.conf | 2

Re: [PATCH 2/5] drm/ttm: return ENOSPC from ttm_bo_mem_space

2024-01-09 Thread Thomas Hellström
On Tue, 2024-01-09 at 08:47 +0100, Christian König wrote: > Only convert it to ENOMEM in ttm_bo_validate. > Could we have a more elaborate commit description here, (why is this change needed)? > Signed-off-by: Christian König > --- >  drivers/gpu/drm/ttm/ttm_bo.c | 5 - >  1 file changed, 4

Re: Rework TTMs busy handling

2024-01-09 Thread Thomas Hellström
Hi, Christian On Tue, 2024-01-09 at 08:47 +0100, Christian König wrote: > Hi guys, > > I'm trying to make this functionality a bit more useful for years now > since we multiple reports that behavior of drivers can be suboptimal > when multiple placements be given. > > So basically instead of hac

Re: [PATCH] nightly.conf: Add the xe repo to drm-tip

2024-01-03 Thread Thomas Hellström
On Tue, 2023-12-26 at 13:30 -0500, Rodrigo Vivi wrote: > On Fri, Dec 22, 2023 at 12:36:39PM +0100, Thomas Hellström wrote: > > Add the xe repo to drm-tip and the dim tools. > > For now use the sha1 of the first drm-xe-next pull request for drm- > > tip, > > since t

Re: [PATCH -next] drm/xe: Remove unneeded semicolon

2024-01-03 Thread Thomas Hellström
Hi, Yang, On Wed, 2024-01-03 at 09:15 +0800, Yang Li wrote: > ./drivers/gpu/drm/xe/xe_rtp.c:168:2-3: Unneeded semicolon > Could you please reformulate using imperative "Remove..." rather than citing a style alert? With that, Reviewed-by: Thomas Hellström > Sig

Re: [PATCH] nightly.conf: Add the xe repo to drm-tip

2023-12-22 Thread Thomas Hellström
On 12/22/23 13:25, Thomas Hellström wrote: Hi, On 12/22/23 13:01, Jani Nikula wrote: On Fri, 22 Dec 2023, Thomas Hellström wrote: Add the xe repo to drm-tip and the dim tools. For now use the sha1 of the first drm-xe-next pull request for drm-tip, since that branch tip is currently adapted

Re: [PATCH] nightly.conf: Add the xe repo to drm-tip

2023-12-22 Thread Thomas Hellström
Hi, On 12/22/23 13:01, Jani Nikula wrote: On Fri, 22 Dec 2023, Thomas Hellström wrote: Add the xe repo to drm-tip and the dim tools. For now use the sha1 of the first drm-xe-next pull request for drm-tip, since that branch tip is currently adapted for our CI testing. I guess we'll need

[PATCH] nightly.conf: Add the xe repo to drm-tip

2023-12-22 Thread Thomas Hellström
...@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: intel-...@lists.freedesktop.org Signed-off-by: Thomas Hellström --- nightly.conf | 7 +++ 1 file changed, 7 insertions(+) diff --git a/nightly.conf b/nightly.conf index 24126b61b797..accd3ff2cc39 100644 --- a/nightly.conf +++ b

Re: [PATCH 00/11] Introduce drm evictable lru

2023-12-21 Thread Thomas Hellström
Hi Oak, Christian On 11/2/23 05:32, Oak Zeng wrote: We plan to implement xe driver's shared virtual memory manager (aka SVM) without buffer object concept. This means we won't build our shared virtual memory manager upon TTM infrastructure like amdgpu does. Even though this approach is more eff

Re: [PATCH] drm/xe/vm: Fix an error path

2023-12-20 Thread Thomas Hellström
On 12/20/23 17:29, Lucas De Marchi wrote: On Wed, Dec 20, 2023 at 05:17:49PM +0100, Thomas Hellström wrote: On 12/20/23 17:13, Lucas De Marchi wrote: On Wed, Dec 20, 2023 at 03:42:14PM +0100, Thomas Hellström wrote: If using the VM_BIND_OP_UNMAP_ALL without any bound vmas for the vm, we

[PATCH] locking/ww_mutex: Adjust to lockdep nest_lock requirements

2023-12-19 Thread Thomas Hellström
Long Cc: Boqun Feng Cc: Maarten Lankhorst Cc: Christian König Cc: dri-devel@lists.freedesktop.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Thomas Hellström --- include/linux/ww_mutex.h | 14 ++ kernel/locking/test-ww_mutex.c | 6 -- 2 files changed, 18 insertions(

Re: [PATCH v6] Documentation/gpu: VM_BIND locking document

2023-11-29 Thread Thomas Hellström
On 11/29/23 20:20, John Hubbard wrote: On 11/29/23 01:06, Thomas Hellström wrote: Add the first version of the VM_BIND locking document which is intended to be part of the xe driver upstreaming agreement. The document describes and discuss the locking used during exec- functions, evicton and

[PATCH v6] Documentation/gpu: VM_BIND locking document

2023-11-29 Thread Thomas Hellström
zillon, Rodrigo Vivi, Bagas Sanjaya) - Various minor fixes across the document (Boris Brezillon) Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Boris Brezillon Reviewed-by: Rodrigo Vivi Reviewed-by: Danilo Krummrich --- Documentation/core-api/pin_user_pages.rst | 2 + D

Re: [Intel-xe] [PATCH v5] Documentation/gpu: VM_BIND locking document

2023-11-28 Thread Thomas Hellström
On Mon, 2023-11-27 at 14:36 -0500, Rodrigo Vivi wrote: > On Tue, Nov 21, 2023 at 11:40:46AM +0100, Thomas Hellström wrote: > > Add the first version of the VM_BIND locking document which is > > intended to be part of the xe driver upstreaming agreement. > > > > The doc

Re: [PATCH v5] Documentation/gpu: VM_BIND locking document

2023-11-21 Thread Thomas Hellström
On 11/21/23 14:56, Boris Brezillon wrote: On Tue, 21 Nov 2023 11:40:46 +0100 Thomas Hellström wrote: Add the first version of the VM_BIND locking document which is intended to be part of the xe driver upstreaming agreement. The document describes and discuss the locking used during exec

[PATCH v5] Documentation/gpu: VM_BIND locking document

2023-11-21 Thread Thomas Hellström
illon) - Improve the documentation around locks that need to be grabbed from the dm-fence critical section (Boris Brezillon) - Add more references to the DRM GPUVM helpers (Danilo Krummrich and Boriz Brezillon) - Update the rfc/xe.rst document. Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström ---

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