Re: [PATCH] drm/ttm: WIP limit the TTM pool to 32bit CPUs

2025-08-07 Thread Thomas Hellström
On Thu, 2025-08-07 at 11:53 +0200, Christian König wrote: > On 06.08.25 19:43, Thomas Hellström wrote: > > Hi, Christian > > > > On Wed, 2025-08-06 at 15:28 +0200, Christian König wrote: > > > On some old x86 systems we had the problem that changing the > > &

Re: [PATCH] drm/ttm: WIP limit the TTM pool to 32bit CPUs

2025-08-06 Thread Thomas Hellström
Hi, Christian On Wed, 2025-08-06 at 15:28 +0200, Christian König wrote: > On some old x86 systems we had the problem that changing the caching > flags > of system memory requires changing the global MTRR/PAT tables. > > But on any modern x86 system (CPUs introduced rughly after 2004) we > actuall

Re: [PATCH 11/11] fs: Remove aops->writepage

2025-05-02 Thread Thomas Hellström
Hi, Matthew, On Tue, 2025-04-01 at 17:26 +0100, Matthew Wilcox wrote: > On Tue, Mar 18, 2025 at 09:10:38AM +0100, Thomas Hellström wrote: > > On Mon, 2025-03-17 at 22:30 +, Matthew Wilcox wrote: > > > This patch fixes the compilation problem.  But I don't understa

Re: [PULL] drm-xe-next

2025-04-28 Thread Thomas Hellström
    drm/xe: Update xe_ttm_access_memory to use GPU for non-visible > access >   drm/print: Add drm_coredump_printer_is_full >   drm/xe: Abort printing coredump in VM printer output if full >   drm/xe: Drop force_alloc from xe_bo_evict in selftests > > Michal Wajdeczko (2)

Re: [PATCH 11/11] fs: Remove aops->writepage

2025-03-18 Thread Thomas Hellström
On Mon, 2025-03-17 at 22:30 +, Matthew Wilcox wrote: > On Mon, Mar 17, 2025 at 03:22:30AM +, Matthew Wilcox wrote: > > On Sun, Mar 16, 2025 at 06:08:52PM -0700, Fan Ni wrote: > > > On Fri, Mar 07, 2025 at 01:54:11PM +, Matthew Wilcox (Oracle) > > > wrote: > > > > All callers and impleme

Re: [PULL] drm-xe-fixes

2025-01-02 Thread Thomas Hellström
On Mon, 2024-12-23 at 18:53 +0100, Thomas Hellstrom wrote: > Hi Dave, Simona > > The Xe fixes for -rc5. This PR just got superseded by a new one (drm-xe-fixes-2025-01-02), that includes also the commits mentioned here. Thanks, Thomas > > Thanks, > Thomas > > drm-xe-fixes-2024-12-23: > UAPI

Re: 6.13-rc1 graphics fail

2024-12-02 Thread Thomas Hellström
Hi, On Mon, 2024-12-02 at 13:40 -0500, Genes Lists wrote: > > 6.12.1 on same system with same userspace works fine (as did 6.12) > while 6.13-rc1 boots, but without working graphics using gnome with > wayland. > > Laptop is raptor lake with Intel XE (lspci attached). > No kernel errors are logge

Re: [PULL] drm-xe-next

2024-10-25 Thread Thomas Hellström
On Fri, 2024-10-25 at 12:34 +0300, Jani Nikula wrote: > On Fri, 25 Oct 2024, Thomas Hellström > wrote: > > On Thu, 2024-10-24 at 19:22 +, Matthew Brost wrote: > > > On Thu, Oct 24, 2024 at 07:52:11PM +0200, Thomas Hellstrom wrote: > > > > Hi, Dave & Simona

Re: [PULL] drm-xe-next

2024-10-25 Thread Thomas Hellström
On Thu, 2024-10-24 at 19:22 +, Matthew Brost wrote: > On Thu, Oct 24, 2024 at 07:52:11PM +0200, Thomas Hellstrom wrote: > > Hi, Dave & Simona, > > > > This week's drm-xe-next PR > > > > Thanks, > > Thomas > > > > > > drm-xe-next-2024-10-24: > > UAPI Changes: > > - Define and parse OA sync p

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

2024-10-10 Thread Thomas Hellström
On Thu, 2024-10-10 at 16:09 +1100, Stephen Rothwell wrote: > Hi all, > > After merging the drm-misc tree, today's linux-next build (htmldocs) > produced these warnings: > > include/drm/ttm/ttm_device.h:255: warning: Incorrect use of kernel- > doc format:  * @unevictable Buffer objects whi

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-08 Thread Thomas Hellström
On Sat, 2024-10-05 at 04:14 +, Matthew Brost wrote: > On Fri, Oct 04, 2024 at 04:28:29PM +0200, Thomas Hellström wrote: > > On Wed, 2024-10-02 at 14:54 +0200, Thomas Hellström wrote: > > > On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > > > > Am 02

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-04 Thread Thomas Hellström
On Wed, 2024-10-02 at 14:54 +0200, Thomas Hellström wrote: > On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > > Am 02.10.24 um 14:24 schrieb Thomas Hellström: > > > The ttm_device_init funcition uses multiple bool arguments. That > > > means > > > re

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-04 Thread Thomas Hellström
On Thu, 2024-10-03 at 00:28 -0400, Zack Rusin wrote: > On Wed, Oct 2, 2024 at 8:24 AM Thomas Hellström > wrote: > > > > The ttm_device_init funcition uses multiple bool arguments. That > > means > > readability in the caller becomes poor, and all callers need to

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Thomas Hellström
On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > Am 02.10.24 um 14:24 schrieb Thomas Hellström: > > The ttm_device_init funcition uses multiple bool arguments. That > > means > > readability in the caller becomes poor, and all callers need to > > change if &g

[PATCH v2 2/2] drm/ttm: Add a device flag to propagate -ENOSPC on OOM

2024-10-02 Thread Thomas Hellström
corrective action can be taken at the driver level. Cc: Christian König Cc: Matthew Brost Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/ttm/ttm_device.c | 1 + include/drm/ttm/ttm_device.h | 13 + 3 files changed, 15 insertions(+), 1

[PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-02 Thread Thomas Hellström
-...@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: spice-de...@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Cc: Zack Rusin Cc: Cc: Sui Jingfeng Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 -- drivers

[PATCH v2 0/2] drm/ttm: Add an option to report graphics memory OOM

2024-10-02 Thread Thomas Hellström
corrective action can be taken at the driver level. The first patch deals with a ttm_device_init() interface change, The Second patch adds the actual functionality. A follow-up will be posted for Xe once this is merged / backmerged. Thomas Hellström (2): drm/ttm: Change ttm_device_init to use a

Re: RESEND Re: [RFC PATCH] dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling()

2024-09-20 Thread Thomas Hellström
On Wed, 2024-09-18 at 15:18 +0200, Christian König wrote: > Sorry, somehow completely missed that. Feel free to push it to > drm-misc-next. > > Christian. Pushed, thanks. /Thomas > > Am 18.09.24 um 14:34 schrieb Thomas Hellström: > > Christian, > > > > Pi

RESEND Re: [RFC PATCH] dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling()

2024-09-18 Thread Thomas Hellström
Christian, Ping? On Wed, 2024-08-14 at 10:37 +0200, Thomas Hellström wrote: > Christian, > > Ack to merge this through drm-misc-next, or do you want to pick it up > for dma-buf? > > Thanks, > Thomas > > > On Wed, 2024-08-14 at 09:10 +0200, Daniel Vetter wrote:

[PATCH 2/2] drm/ttm: Add a device flag to propagate -ENOSPC on OOM

2024-09-05 Thread Thomas Hellström
corrective action can be taken at the driver level. Cc: Christian König Cc: Matthew Brost Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/ttm/ttm_device.c | 1 + include/drm/ttm/ttm_device.h | 13 + 3 files changed, 15 insertions(+), 1

[PATCH 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-09-05 Thread Thomas Hellström
-...@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Cc: spice-de...@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Cc: Zack Rusin Cc: Cc: Sui Jingfeng Cc: Signed-off-by: Thomas Hellström --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 -- drivers

[PATCH 0/2] drm/ttm: Add an option to report graphics memory OOM

2024-09-05 Thread Thomas Hellström
corrective action can be taken at the driver level. The first patch deals with a ttm_device_init() interface change, The Second patch adds the actual functionality. A follow-up will be posted for Xe once this is merged / backmerged. Thomas Hellström (2): drm/ttm: Change ttm_device_init to use a

Re: [PATCH v5 1/2] drm/xe: Align all VRAM scanout buffers to 64k physical pages when needed.

2024-08-26 Thread Thomas Hellström
s to a VM can still be > aligned > to 4k, just like for normal buffers. > > Signed-off-by: Maarten Lankhorst > Co-developed-by: Zbigniew Kempczyński > > Cc: Matthew Auld > Cc: Rodrigo Vivi > Cc: Thomas Hellström > Cc: Maarten Lankhorst > Cc: Juha-Pekka Heikk

Re: [RFC PATCH] dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling()

2024-08-14 Thread Thomas Hellström
Christian, Ack to merge this through drm-misc-next, or do you want to pick it up for dma-buf? Thanks, Thomas On Wed, 2024-08-14 at 09:10 +0200, Daniel Vetter wrote: > On Fri, May 26, 2023 at 01:11:28PM +0200, Thomas Hellström wrote: > > Daniel, > > > > On 4/28/23 14:52, T

Re: [PATCH v3 1/2] drm/xe/bmg: implement Wa_16023588340

2024-07-03 Thread Thomas Hellström
Hi, Matt On Tue, 2024-07-02 at 16:06 +0100, Matthew Auld wrote: > This involves enabling l2 caching of host side memory access to VRAM > through the CPU BAR. The main fallout here is with display since VRAM > writes from CPU can now be cached in GPU l2, and display is never > coherent with caches,

Re: [RFC PATCH 0/3] Introducing I915_FORMAT_MOD_4_TILED_XE2_CCS Modifier for Xe2

2024-05-14 Thread Thomas Hellström
On Tue, 2024-05-14 at 12:25 +0300, Joonas Lahtinen wrote: > Quoting Kenneth Graunke (2024-05-11 03:58:34) > > On Tuesday, May 7, 2024 3:56:57 PM PDT Matt Roper wrote: > > > On Mon, May 06, 2024 at 09:52:35PM +0300, Juha-Pekka Heikkila > > > wrote: > > > > These patches introduce I915_FORMAT_MOD_4_T

Re: [PATCH v3] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-29 Thread Thomas Hellström
On Thu, 2024-04-25 at 20:42 +0200, Janusz Krzysztofik wrote: > Hi Thomas, > > On Tuesday, 16 April 2024 18:40:12 CEST Rodrigo Vivi wrote: > > On Tue, Apr 16, 2024 at 10:09:46AM +0200, Janusz Krzysztofik wrote: > > > Hi Rodrigo, > > > > > > On Tuesday, 16 April 2024 03:16:31 CEST Rodrigo Vivi wrot

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 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 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 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 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 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 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 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 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 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 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 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 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] 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-de...@lists.freedesktop.org Cc: # v6.4+ --- drivers/gpu/drm/ttm/

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

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] 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-de...@lists.freedesktop.org Cc: intel-gfx@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] drm/xe: Fix build without CONFIG_FAULT_INJECTION

2023-12-18 Thread Thomas Hellström
avoid build breakages. Another solution would be us including the linux/types.h as well, but this creates unnecessary cases. Reference: https://lore.kernel.org/all/20230816134748.979231-1-himal.prasad.ghimi...@intel.com/ Cc: Himal Prasad Ghimiray Cc: Oded Gabbay Cc: Thomas Hellström Cc: Luc

Re: [Intel-gfx] [PULL] drm-misc-next

2023-11-06 Thread Thomas Hellström
On 11/6/23 11:37, Thomas Hellström wrote: Hi, On 11/6/23 11:20, Maxime Ripard wrote: On Mon, Nov 06, 2023 at 11:01:51AM +0100, Thomas Hellström wrote: Hi, David. On 11/3/23 17:37, David Edelsohn wrote: Dual-license drm_gpuvm to GPL-2.0 OR MIT. diff --git a/drivers/gpu/drm/drm_gpuvm.c b

Re: [Intel-gfx] [PULL] drm-misc-next

2023-11-06 Thread Thomas Hellström
Hi, On 11/6/23 11:20, Maxime Ripard wrote: On Mon, Nov 06, 2023 at 11:01:51AM +0100, Thomas Hellström wrote: Hi, David. On 11/3/23 17:37, David Edelsohn wrote: Dual-license drm_gpuvm to GPL-2.0 OR MIT. diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c index 02ce6baacdad

Re: [Intel-gfx] [PULL] drm-misc-next

2023-11-06 Thread Thomas Hellström
Hi, David. On 11/3/23 17:37, David Edelsohn wrote: Dual-license drm_gpuvm to GPL-2.0 OR MIT. diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c index 02ce6baacdad..08c088319652 100644 --- a/drivers/gpu/drm/drm_gpuvm.c

[Intel-gfx] [RFC PATCH] locking/ww_mutex: Adjust to lockdep nest_lock requirements

2023-09-11 Thread Thomas Hellström
: Boqun Feng Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Christian König Cc: intel...@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedestkop.org Signed-off-by: Thomas Hellström --- include/linux/ww_mutex.h | 14 ++ 1 file changed, 14 insertions

Re: [Intel-gfx] [PATCH v2 0/4] drm/ttm: Fixes around resources and bulk moves

2023-06-27 Thread Thomas Hellström
On 6/26/23 11:14, Thomas Hellström wrote: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A couple of ttm fixes for issues that either were hit while developing the xe driver or, for the resource leak patches, discovered during code inspection. v2

Re: [Intel-gfx] [Intel-xe] [PATCH v2 2/4] drm/ttm: Don't shadow the operation context

2023-06-26 Thread Thomas Hellström
On Mon, 2023-06-26 at 17:18 +0200, Thomas Hellström wrote: > On Mon, 2023-06-26 at 17:15 +0200, Christian König wrote: > > Am 26.06.23 um 11:14 schrieb Thomas Hellström: > > > ttm_bo_swapout() shadows the ttm operation context which may > > > cause > > > majo

Re: [Intel-gfx] [PATCH v2 2/4] drm/ttm: Don't shadow the operation context

2023-06-26 Thread Thomas Hellström
On Mon, 2023-06-26 at 17:15 +0200, Christian König wrote: > Am 26.06.23 um 11:14 schrieb Thomas Hellström: > > ttm_bo_swapout() shadows the ttm operation context which may cause > > major confusion in driver callbacks when swapping out > > !TTM_PL_SYSTEM > > memo

Re: [Intel-gfx] [PATCH v2 4/4] drm/ttm: Don't leak a resource on swapout move error

2023-06-26 Thread Thomas Hellström
Hi, Christian, Will you take a look at 2/4 as well? Will you merge these? Thanks, Thomas On 6/26/23 13:33, Christian König wrote: Am 26.06.23 um 11:14 schrieb Thomas Hellström: If moving the bo to system for swapout failed, we were leaking a resource. Fix. Fixes: bfa3357ef9ab ("dr

[Intel-gfx] [PATCH v2 3/4] drm/ttm: Don't leak a resource on eviction error

2023-06-26 Thread Thomas Hellström
Cc: dri-de...@lists.freedesktop.org Cc: # v5.15+ Signed-off-by: Thomas Hellström Reviewed-by: Nirmoy Das #v1 --- drivers/gpu/drm/ttm/ttm_bo.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 615d30c4262d..c0

[Intel-gfx] [PATCH v2 4/4] drm/ttm: Don't leak a resource on swapout move error

2023-06-26 Thread Thomas Hellström
If moving the bo to system for swapout failed, we were leaking a resource. Fix. Fixes: bfa3357ef9ab ("drm/ttm: allocate resource object instead of embedding it v2") Cc: Christian König Cc: "Christian König" Cc: dri-de...@lists.freedesktop.org Cc: # v5.14+ Signed-off-

[Intel-gfx] [PATCH v2 2/4] drm/ttm: Don't shadow the operation context

2023-06-26 Thread Thomas Hellström
947770cf34 ("drm/ttm: enable swapout for reserved BOs during allocation") Signed-off-by: Thomas Hellström Acked-by: Matthew Brost --- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/dr

[Intel-gfx] [PATCH v2 1/4] drm/ttm: Fix ttm_lru_bulk_move_pos_tail()

2023-06-26 Thread Thomas Hellström
lt;3> [218.967458] RBP: 0062 R08: 00e7 R09: ff78 <3> [218.967553] R10: 0058 R11: 0246 R12: 7f77b1a548a0 <3> [218.967648] R13: 0003 R14: 7f77b1a5d2e8 R15: 0000 <3> [218.967745]

[Intel-gfx] [PATCH v2 0/4] drm/ttm: Fixes around resources and bulk moves

2023-06-26 Thread Thomas Hellström
some RB's Thomas Hellström (4): drm/ttm: Fix ttm_lru_bulk_move_pos_tail() drm/ttm: Don't shadow the operation context drm/ttm: Don't leak a resource on eviction error drm/ttm: Don't leak a resource on swapout move error drivers/gpu/drm/ttm

Re: [Intel-gfx] [PATCH 3/4] drm/ttm: Don't leak a resource on eviction error

2023-06-22 Thread Thomas Hellström
On 6/22/23 16:48, Christian König wrote: Am 22.06.23 um 16:08 schrieb Thomas Hellström: On 6/22/23 15:55, Andi Shyti wrote: Hi Thomas, On Thu, Jun 22, 2023 at 12:14:11PM +0200, Thomas Hellström wrote: On eviction errors other than -EMULTIHOP we were leaking a resource. Fix. Fixes

Re: [Intel-gfx] [PATCH 3/4] drm/ttm: Don't leak a resource on eviction error

2023-06-22 Thread Thomas Hellström
On 6/22/23 15:55, Andi Shyti wrote: Hi Thomas, On Thu, Jun 22, 2023 at 12:14:11PM +0200, Thomas Hellström wrote: On eviction errors other than -EMULTIHOP we were leaking a resource. Fix. Fixes: 403797925768 ("drm/ttm: Fix multihop assert on eviction.") Cc: Andrey Grodzovsky Cc:

[Intel-gfx] [PATCH 4/4] drm/ttm: Don't leak a resource on swapout move error

2023-06-22 Thread Thomas Hellström
If moving the bo to system for swapout failed, we were leaking a resource. Fix. Fixes: bfa3357ef9ab ("drm/ttm: allocate resource object instead of embedding it v2") Cc: Christian König Cc: "Christian König" Cc: dri-de...@lists.freedesktop.org Cc: # v5.14+ Signed-off-

[Intel-gfx] [PATCH 3/4] drm/ttm: Don't leak a resource on eviction error

2023-06-22 Thread Thomas Hellström
On eviction errors other than -EMULTIHOP we were leaking a resource. Fix. Fixes: 403797925768 ("drm/ttm: Fix multihop assert on eviction.") Cc: Andrey Grodzovsky Cc: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: dri-de...@lists.freedesktop.org Cc: # v5.15+ Signed-off-

[Intel-gfx] [PATCH 2/4] drm/ttm: Don't shadow the operation context

2023-06-22 Thread Thomas Hellström
947770cf34 ("drm/ttm: enable swapout for reserved BOs during allocation") Signed-off-by: Thomas Hellström Acked-by: Matthew Brost --- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/dr

[Intel-gfx] [PATCH 1/4] drm/ttm: Fix ttm_lru_bulk_move_pos_tail()

2023-06-22 Thread Thomas Hellström
lt;3> [218.967458] RBP: 0062 R08: 00e7 R09: ff78 <3> [218.967553] R10: 0058 R11: 0246 R12: 7f77b1a548a0 <3> [218.967648] R13: 0003 R14: 7f77b1a5d2e8 R15: 0000 <3> [218.967745]

[Intel-gfx] [PATCH 0/4] drm/ttm: Fixes around resources and bulk moves

2023-06-22 Thread Thomas Hellström
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A couple of ttm fixes for issues that either were hit while developing the xe driver or, for the resource leak patches, discovered during code inspection. Thomas Hellström (4): drm/ttm: Fix

[Intel-gfx] [PATCH v2 6/6] drm/ttm: Don't shadow the operation context

2023-06-19 Thread Thomas Hellström
ttm_bo_swapout() shadows the ttm operation context which may cause major confusion in driver callbacks when swapping out !TTM_PL_SYSTEM memory. Fix this by reusing the operation context argument to ttm_bo_swapout(). Cc: "Christian König" Cc: Cc: Signed-off-by: Thomas Hellström

Re: [Intel-gfx] [RFC PATCH] dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling()

2023-05-26 Thread Thomas Hellström
Daniel, On 4/28/23 14:52, Thomas Hellström wrote: Condsider the following call sequence: /* Upper layer */ dma_fence_begin_signalling(); lock(tainted_shared_lock); /* Driver callback */ dma_fence_begin_signalling(); ... The driver might here use a utility that is annotated as intended for the

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Allow the driver to resolve a WW transaction rollback

2023-05-25 Thread Thomas Hellström
On Fri, 2023-05-05 at 16:17 +0200, Thomas Hellström wrote: > Allow drivers to resolve a WW transaction rollback. This allows for > 1) Putting a lower-priority transaction to sleep allowing another to > succeed instead both fighting using trylocks. > 2) Letting the driver know whethe

  1   2   3   4   5   6   7   8   9   10   >