Re: [git pull] drm for 6.18-rc1

2025-10-03 Thread Dave Airlie
On Fri, 3 Oct 2025 at 05:54, Linus Torvalds wrote: > > [ Miguel: Rust conflict resolution question at the end ] > > On Tue, 30 Sept 2025 at 21:06, Dave Airlie wrote: > > > > As usual, let me know if there are any problems. > > You are still corrupting indentati

[git pull] drm fixes for 6.17-rc8/final

2025-09-25 Thread Dave Airlie
drm/amd/display: Use mpc.preblend flag to indicate preblend Dave Airlie (4): Merge tag 'amd-drm-fixes-6.17-2025-09-24' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes Merge tag 'drm-intel-fixes-2025-09-25' of https://gitlab.freedesktop.org/drm/i915/ker

[git pull] drm fixes for 6.17-rc7

2025-09-18 Thread Dave Airlie
omment" Dan Carpenter (1): drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue() Daniele Ceraolo Spurio (2): drm/xe: Fix error handling if PXP fails to start drm/xe/guc: Set RCS/CCS yield policy Dave Airlie (4): Merge tag 'drm-intel-fixes-2025-09-17' of

Re: [GIT PULL] drm-misc-next

2025-09-14 Thread Dave Airlie
Hi Inki, I've already gotten the last drm-misc-next pull for 6.18 in my tree, there are some patches being pulled in that might be for 6.19? or do we want to get another drm-misc-next pull into 6.18? Dave. On Sun, 14 Sept 2025 at 13:15, Inki Dae wrote: > > Hi Dave and Daniel, > >Add DSIM br

Re: DisplayID checksum validation blocking hardware capabilities - CSO T3 panel

2025-09-14 Thread Dave Airlie
> Questions for Community > === > > This issue raises several questions about DisplayID validation approach: > > 1. Is this strict validation intentional for all hardware? What are the >security or stability reasons for treating checksum errors as fatal? > > 2. Are minor che

[git pull] drm fixes for 6.17-rc6

2025-09-11 Thread Dave Airlie
Krummrich (3): gpu: nova-core: depend on CONFIG_64BIT MAINTAINERS: Add drm-rust tree for Rust DRM drivers and infrastructure MAINTAINERS: drm-misc: fix X: entries for nova/nouveau Dave Airlie (6): Merge tag 'drm-rust-fixes-2025-09-05' of https://gitlab.freedesktop

Re: [PATCH 11/15] ttm/pool: enable memcg tracking and shrinker. (v2)

2025-09-08 Thread Dave Airlie
On Thu, 4 Sept 2025 at 21:30, Christian König wrote: > > On 04.09.25 04:25, Dave Airlie wrote: > > On Wed, 3 Sept 2025 at 00:23, Christian König > > wrote: > >> > >> On 02.09.25 06:06, Dave Airlie wrote: > >>> From: Dave Airlie > >>>

[git pull] drm fixes for 6.17-rc5

2025-09-07 Thread Dave Airlie
ice remove Alex Deucher (2): drm/amdgpu/mes11: make MES_MISC_OP_CHANGE_CONFIG failure non-fatal drm/amdgpu: drop hw access in non-DC audio fini Colin Ian King (1): drm/amd/amdgpu: Fix missing error return on kzalloc failure Dave Airlie (4): no

[PATCH 4/4] xe: populate buffers before exporting them.

2025-09-04 Thread Dave Airlie
From: Dave Airlie Before exporting a buffer, make sure it has been populated with pages at least once. Cc: Thomas Hellström Signed-off-by: Dave Airlie --- drivers/gpu/drm/xe/xe_dma_buf.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b

Re: [PATCH 11/15] ttm/pool: enable memcg tracking and shrinker. (v2)

2025-09-04 Thread Dave Airlie
On Wed, 3 Sept 2025 at 00:23, Christian König wrote: > > On 02.09.25 06:06, Dave Airlie wrote: > > From: Dave Airlie > > > > This enables all the backend code to use the list lru in memcg mode, > > and set the shrinker to be memcg aware. > > > > It adds

[PATCH 1/4] ttm/bo: add an API to populate a bo before exporting.

2025-09-04 Thread Dave Airlie
From: Dave Airlie While discussing cgroups we noticed a problem where you could export a BO to a dma-buf without having it ever being backed or accounted for. This meant in low memory situations or eventually with cgroups, a lower privledged process might cause the compositor to try and

[PATCH 3/4] nouveau: populate buffers before exporting them.

2025-09-03 Thread Dave Airlie
From: Dave Airlie Before exporting a buffer, make sure it has been populated with pages at least once. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_prime.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_prime.c b/drivers

Re: [PATCH 09/15] ttm/pool: initialise the shrinker earlier

2025-09-03 Thread Dave Airlie
On Wed, 3 Sept 2025 at 00:07, Christian König wrote: > > > > On 02.09.25 06:06, Dave Airlie wrote: > > From: Dave Airlie > > > > Later memcg enablement needs the shrinker initialised before the list lru, > > Just move it for now. > > Hui? That sh

Re: [PATCH 02/15] drm/ttm: use gpu mm stats to track gpu memory allocations. (v4)

2025-09-03 Thread Dave Airlie
On Wed, 3 Sept 2025 at 21:10, Maarten Lankhorst wrote: > > Hey, > > Den 2025-09-02 kl. 06:06, skrev Dave Airlie: > > From: Dave Airlie > > > > This uses the newly introduced per-node gpu tracking stats, > > to track GPU memory allocated via TTM and reclaima

[PATCH 2/4] amdgpu: populate buffers before exporting them.

2025-09-03 Thread Dave Airlie
From: Dave Airlie Before exporting a buffer, make sure it has been populated with pages at least once. Reviewed-by: Christian Koenig Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm

[PATCH 03/15] ttm/pool: port to list_lru. (v2)

2025-09-02 Thread Dave Airlie
From: Dave Airlie This is an initial port of the TTM pools for write combined and uncached pages to use the list_lru. This makes the pool's more NUMA aware and avoids needing separate NUMA pools (later commit enables this). Cc: Christian Koenig Cc: Johannes Weiner Cc: Dave Chinner S

[PATCH 09/15] ttm/pool: initialise the shrinker earlier

2025-09-02 Thread Dave Airlie
From: Dave Airlie Later memcg enablement needs the shrinker initialised before the list lru, Just move it for now. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_pool.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 06/15] ttm/pool: track allocated_pages per numa node.

2025-09-02 Thread Dave Airlie
From: Dave Airlie This gets the memory sizes from the nodes and stores the limit as 50% of those. I think eventually we should drop the limits once we have memcg aware shrinking, but this should be more NUMA friendly, and I think seems like what people would prefer to happen on NUMA aware

[PATCH 05/15] ttm/pool: make pool shrinker NUMA aware

2025-09-02 Thread Dave Airlie
From: Dave Airlie This enable NUMA awareness for the shrinker on the ttm pools. Cc: Christian Koenig Cc: Dave Chinner Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_pool.c | 38 +++--- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a

[PATCH 02/15] drm/ttm: use gpu mm stats to track gpu memory allocations. (v4)

2025-09-01 Thread Dave Airlie
From: Dave Airlie This uses the newly introduced per-node gpu tracking stats, to track GPU memory allocated via TTM and reclaimable memory in the TTM page pools. These stats will be useful later for system information and later when mem cgroups are integrated. Cc: Christian Koenig Cc: Matthew

[PATCH] amdgpu/ttm: make sure exported objects are populated (v2)

2025-09-01 Thread Dave Airlie
From: Dave Airlie While discussing cgroups we noticed a problem where you could export a BO to a dma-buf without having it ever being backed or accounted for. This meant in low memory situations or eventually with cgroups, a lower privledged process might cause the compositor to try and

[PATCH 11/15] ttm/pool: enable memcg tracking and shrinker. (v2)

2025-09-01 Thread Dave Airlie
From: Dave Airlie This enables all the backend code to use the list lru in memcg mode, and set the shrinker to be memcg aware. It adds the loop case for when pooled pages end up being reparented to a higher memcg group, that newer memcg can search for them there and take them back. Signed-off

[PATCH 04/15] ttm/pool: drop numa specific pools

2025-09-01 Thread Dave Airlie
From: Dave Airlie The list_lru will now handle numa for us, so need to keep separate pool types for it. Just consoldiate into the global ones. This adds a debugfs change to avoid dumping non-existant orders due to this change. Cc: Christian Koenig Cc: Johannes Weiner Signed-off-by: Dave

[PATCH 15/15] ttm: add support for a module option to disable memcg integration

2025-09-01 Thread Dave Airlie
From: Dave Airlie This adds a kconfig and a module option to turn off ttm memcg integration completely. When this is used, no object will ever end up using memcg aware paths. There is an existing workload that cgroup support might regress, the systems are setup to allocate 1GB of uncached

[PATCH 14/15] amdgpu: add support for memory cgroups

2025-09-01 Thread Dave Airlie
From: Dave Airlie This adds support for adding a obj cgroup to a buffer object, and passing in the placement flags to make sure it's accounted properly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 13/15] memcontrol: allow objcg api when memcg is config off.

2025-09-01 Thread Dave Airlie
From: Dave Airlie amdgpu wants to use the objcg api and not have to enable ifdef around it, so just add a dummy function for the config off path. Signed-off-by: Dave Airlie --- include/linux/memcontrol.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/memcontrol.h b

[PATCH 12/15] ttm: hook up memcg placement flags.

2025-09-01 Thread Dave Airlie
From: Dave Airlie This adds a placement flag that requests that any bo with this placement flag set gets accounted for memcg if it's a system memory allocation. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/ttm/ttm_bo_util.c | 6 +++--- driver

drm/ttm/memcg/lru: enable memcg tracking for ttm and amdgpu driver (complete series v3)

2025-09-01 Thread Dave Airlie
Hi all, This is a repost with some fixes and cleanups. I'd really like to land this into drm-next, Maarten posted xe support for this and some other work and I think we need to start moving this forward in tree as I'm not sure what else I can really do out of tree. Differences since last posti

[PATCH 10/15] ttm: add objcg pointer to bo and tt

2025-09-01 Thread Dave Airlie
From: Dave Airlie This just adds the obj cgroup pointer to the bo and tt structs, and sets it between them. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c | 1 + include/drm/ttm/ttm_bo.h | 6 ++ include/drm/ttm/ttm_tt.h | 2 ++ 3 files changed, 9 insertions(+) diff

[PATCH 07/15] memcg: add support for GPU page counters. (v3)

2025-09-01 Thread Dave Airlie
From: Dave Airlie This introduces 2 new statistics and 3 new memcontrol APIs for dealing with GPU system memory allocations. The stats corresponds to the same stats in the global vmstat, for number of active GPU pages, and number of pages in pools that can be reclaimed. The first API charges a

[PATCH 08/15] ttm: add a memcg accounting flag to the alloc/populate APIs

2025-09-01 Thread Dave Airlie
From: Dave Airlie This flag does nothing yet, but this just changes the APIs to accept it in the future across all users. This flag will eventually be filled out with when to account a tt populate to a memcg. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH 01/15] mm: add gpu active/reclaim per-node stat counters (v2)

2025-09-01 Thread Dave Airlie
From: Dave Airlie While discussing memcg intergration with gpu memory allocations, it was pointed out that there was no numa/system counters for GPU memory allocations. With more integrated memory GPU server systems turning up, and more requirements for memory tracking it seems we should start

Re: [PATCH 1/2] nouveau: fix disabling the nonstall irq due to storm code. (v2)

2025-09-01 Thread Dave Airlie
On Tue, 2 Sept 2025 at 04:18, M Henning wrote: > > On Thu, Aug 28, 2025 at 10:17 PM Dave Airlie wrote: > > > > From: Dave Airlie > > > > Nouveau has code that when it gets an IRQ with no allowed handler > > it disables it to avoid storms. > > >

[PATCH] amdgpu/ttm: make sure exported objects are populated

2025-08-31 Thread Dave Airlie
From: Dave Airlie While discussing cgroups we noticed a problem where you could export a BO to a dma-buf without having it ever being backed or accounted for. This meant in low memory situations or eventually with cgroups, a lower privledged process might cause the compositor to try and

[git pull] drm fixes for 6.16-rc4

2025-08-28 Thread Dave Airlie
ode block Carlos Llamas (1): drm/xe: switch to local xbasename() helper Chenyuan Yang (1): drm/msm/dpu: Add a null ptr check for dpu_encoder_needs_modeset Colin Ian King (1): drm/msm: Fix dereference of pointer minor before null check Dave Airlie (5): Merge tag 'drm

[PATCH 1/2] nouveau: fix disabling the nonstall irq due to storm code. (v2)

2025-08-28 Thread Dave Airlie
From: Dave Airlie Nouveau has code that when it gets an IRQ with no allowed handler it disables it to avoid storms. However with nonstall interrupts, we often disable them from the drm driver, but still request their emission via the push submission. Just don't disable nonstall irqs ev

[PATCH 2/2] nouveau: Membar before between semaphore writes and the interrupt

2025-08-28 Thread Dave Airlie
d-off-by: Faith Ekstrand Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/gv100_fence.c | 7 +- .../drm/nouveau/include/nvhw/class/clc36f.h | 85 +++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/gv100_fence.c b/drivers/

Re: [PATCH 1/2] nouveau: fix disabling the nonstall irq due to storm code.

2025-08-28 Thread Dave Airlie
> > +} > > + > > int > > ga100_fifo_runl_ctor(struct nvkm_fifo *fifo) > > { > > @@ -599,6 +604,7 @@ ga100_fifo = { > > .runl_ctor = ga100_fifo_runl_ctor, > > .mmu_fault = &tu102_fifo_mmu_fault, > > .nonstall_ctor = ga100_fifo_nonstall_ctor, > > + .nonstall_dtor = ga

[PATCH 1/2] nouveau: fix disabling the nonstall irq due to storm code.

2025-08-28 Thread Dave Airlie
From: Dave Airlie Nouveau has code that when it gets an IRQ with no allowed handler it disables it to avoid storms. However with nonstall interrupts, we often disable them from the drm driver, but still request their emission via the push submission. Just don't disable nonstall irqs ev

[PATCH 2/2] nouveau: Membar before between semaphore writes and the interrupt

2025-08-28 Thread Dave Airlie
d-off-by: Faith Ekstrand Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/gv100_fence.c | 7 +- .../drm/nouveau/include/nvhw/class/clc36f.h | 85 +++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/gv100_fence.c b/drivers/

Re: [GIT PULL] mediatek drm fixes - 20250825

2025-08-27 Thread Dave Airlie
> Louis-Alexis Eyraud (2): > drm/mediatek: dsi: Fix DSI host and panel bridge pre-enable order > drm/mediatek: mtk_hdmi: Fix inverted parameters in some > regmap_update_bits calls Hey, ^^^ this patch is missing a S-o-b line from the committer, please fix. Thanks, Dave. > > Ma Ke (1

[git pull] drm fixes for 6.17-rc3

2025-08-22 Thread Dave Airlie
lo Krummrich (5): MAINTAINERS: entry for DRM GPUVM rust: alloc: replace aligned_size() with Kmalloc::aligned_layout() rust: drm: ensure kmalloc() compatible Layout rust: drm: remove pin annotations from drm::Device rust: drm: don't pass the address of drm::Device to

[git pull] drm fixes for 6.17-rc2

2025-08-15 Thread Dave Airlie
ewly introduced drm_connector parameter for drm_bridge_detect Dave Airlie (4): Merge tag 'drm-misc-next-fixes-2025-08-12' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Merge tag 'amd-drm-fixes-6.17-2025-08-13' of https://gitlab.freedesktop.org/agd5f/l

[git pull] drm fixes for 6.17-rc1

2025-08-07 Thread Dave Airlie
ery: fix fw based ip discovery drm/amdgpu: add missing vram lost check for LEGACY RESET Amber Lin (1): drm/amdkfd: Destroy KFD debugfs after destroy KFD wq Balasubramani Vivekanandan (1): drm/xe/devcoredump: Defer devcoredump initialization during probe Dave Airlie (3):

Re: [PATCH 13/18] ttm/pool: enable memcg tracking and shrinker. (v2)

2025-08-05 Thread Dave Airlie
On Mon, 4 Aug 2025 at 19:22, Christian König wrote: > > Sorry for the delayed response, just back from vacation. > > On 22.07.25 01:16, David Airlie wrote: > @@ -162,7 +164,10 @@ static struct page *ttm_pool_alloc_page(struct > ttm_pool *pool, gfp_t gfp_flags, > p = a

Re: drm/ttm/memcg/lru: enable memcg tracking for ttm and amdgpu driver (complete series v2)

2025-08-05 Thread Dave Airlie
On Tue, 5 Aug 2025 at 20:58, Maarten Lankhorst wrote: > > Hey, > > Den 2025-07-14 kl. 07:18, skrev Dave Airlie: > > Hi all, > > > > This is a repost with some fixes and cleanups. > > > > Differences since last posting: > > 1. Added patch 18: add

[git pull] drm fixes for 6.17-rc1

2025-07-31 Thread Dave Airlie
/amdgpu: track whether a queue is a kernel queue in amdgpu_mqd_prop drm/amdgpu: update mmhub 4.1.0 client id mappings Ashutosh Dixit (1): drm/xe/oa: Fix static checker warning about null gt Dan Carpenter (1): drm/xe: Fix a NULL vs IS_ERR() bug in xe_i2c_register_adapter() Dave A

Re: [git pull] drm for 6.17-rc1

2025-07-30 Thread Dave Airlie
On Thu, 31 Jul 2025 at 14:59, Linus Torvalds wrote: > > On Wed, 30 Jul 2025 at 21:48, Linus Torvalds > wrote: > > > > Well, it's one of these: > > > > 3f2b24a1ef35 drm/amd/display: Monitor patch to ignore EDID audio SAB check > > aef3af22a456 drm/amd/display: Add definitions to support DID Ty

Re: [git pull] drm for 6.17-rc1

2025-07-30 Thread Dave Airlie
On Thu, 31 Jul 2025 at 14:32, Dave Airlie wrote: > > On Thu, 31 Jul 2025 at 14:27, Linus Torvalds > wrote: > > > > On Wed, 30 Jul 2025 at 21:21, Dave Airlie wrote: > > > > > > Okay I don't have an rx580, but I have an rx480 which is pretty close, &g

Re: [git pull] drm for 6.17-rc1

2025-07-30 Thread Dave Airlie
On Thu, 31 Jul 2025 at 14:27, Linus Torvalds wrote: > > On Wed, 30 Jul 2025 at 21:21, Dave Airlie wrote: > > > > Okay I don't have an rx580, but I have an rx480 which is pretty close, > > but it is booting fine with your tree at least, DP and HDMI connected, &

Re: [git pull] drm for 6.17-rc1

2025-07-30 Thread Dave Airlie
On Thu, 31 Jul 2025 at 14:03, Linus Torvalds wrote: > > On Wed, 30 Jul 2025 at 20:40, Linus Torvalds > wrote: > > > > I'm very unhappy with the end result, because it just results in a > > black screen at boot for me. No signal. > > It's not something in the merge, and it's not something in my tr

Re: [git pull] drm for 6.17-rc1

2025-07-30 Thread Dave Airlie
On Thu, 31 Jul 2025 at 13:41, Linus Torvalds wrote: > > On Wed, 30 Jul 2025 at 20:05, Linus Torvalds > wrote: > > > > Again: I'm not going to guarantee that I got it right. I *think* I did > > - I'm not feeling particularly unhappy with my merge end result. > > I spoke too soon. > > I'm very unha

Re: [git pull] drm for 6.17-rc1

2025-07-30 Thread Dave Airlie
On Thu, 31 Jul 2025 at 13:05, Linus Torvalds wrote: > > , > > On Tue, 29 Jul 2025 at 14:06, Dave Airlie wrote: > > > > I've done a pass at merging mostly taking from drm-tip: > > https://github.com/airlied/linux/tree/drm-next-6.17-rc1-merged > > Hmm. My

[git pull] drm fixes (part two) for 6.16-rc8/final

2025-07-25 Thread Dave Airlie
akash Deep Sarkar (1): drm/i915/display: Fix dma_fence_wait_timeout() return value handling Dave Airlie (2): Merge tag 'drm-intel-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes Merge tag 'drm-xe-fixes-2025-07-24' of https://gitla

Re: [git pull] drm fixes for 6.16-rc8/final (resend in txt for sure)

2025-07-23 Thread Dave Airlie
On Thu, 24 Jul 2025 at 11:59, Linus Torvalds wrote: > > On Wed, 23 Jul 2025 at 17:40, Dave Airlie wrote: > > > > (this time for sure, plain text). > > I knew you could do it! Third time's the charm! > > I hope I don't need to worry about the branch co

[git pull] drm fixes for 6.16-rc8/final (resend in txt for sure)

2025-07-23 Thread Dave Airlie
uddy during resume Ben Skeggs (1): drm/nouveau/nvif: fix null ptr deref on pre-fermi boards Dave Airlie (1): Merge tag 'drm-misc-fixes-2025-07-23' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Douglas Anderson (1): drm/bridge: ti-sn65dsi86: Remo

[git pull] drm fixes for 6.16-rc8/final (resend)

2025-07-23 Thread Dave Airlie
Reset the clear flag in buddy during resume Ben Skeggs (1): drm/nouveau/nvif: fix null ptr deref on pre-fermi boards Dave Airlie (1): Merge tag 'drm-misc-fixes-2025-07-23' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Douglas Anderson (1): drm/bridge:

[git pull] drm fixes for 6.16-rc8/final

2025-07-23 Thread Dave Airlie
): drm/nouveau/nvif: fix null ptr deref on pre-fermi boards Dave Airlie (1): Merge tag 'drm-misc-fixes-2025-07-23' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Douglas Anderson (1): drm/bridge: ti-sn65dsi86: Remove extra semicolon in ti_sn_bridge_probe

[PATCH 15/15] ttm: add support for a module option to disable memcg integration

2025-07-21 Thread Dave Airlie
From: Dave Airlie This adds a kconfig and a module option to turn off ttm memcg integration completely. When this is used, no object will ever end up using memcg aware paths. There is an existing workload that cgroup support might regress, the systems are setup to allocate 1GB of uncached

[PATCH 14/15] amdgpu: add support for memory cgroups

2025-07-21 Thread Dave Airlie
From: Dave Airlie This adds support for adding a obj cgroup to a buffer object, and passing in the placement flags to make sure it's accounted properly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 13/15] memcontrol: allow objcg api when memcg is config off.

2025-07-21 Thread Dave Airlie
From: Dave Airlie amdgpu wants to use the objcg api and not have to enable ifdef around it, so just add a dummy function for the config off path. Signed-off-by: Dave Airlie --- include/linux/memcontrol.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/memcontrol.h b

[PATCH 12/15] ttm: hook up memcg placement flags.

2025-07-21 Thread Dave Airlie
From: Dave Airlie This adds a placement flag that requests that any bo with this placement flag set gets accounted for memcg if it's a system memory allocation. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/ttm/ttm_bo_util.c | 6 +++--- driver

[PATCH 11/15] ttm/pool: enable memcg tracking and shrinker. (v2)

2025-07-21 Thread Dave Airlie
From: Dave Airlie This enables all the backend code to use the list lru in memcg mode, and set the shrinker to be memcg aware. It adds the loop case for when pooled pages end up being reparented to a higher memcg group, that newer memcg can search for them there and take them back. Signed-off

[PATCH 10/15] ttm: add objcg pointer to bo and tt

2025-07-21 Thread Dave Airlie
From: Dave Airlie This just adds the obj cgroup pointer to the bo and tt structs, and sets it between them. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c | 1 + include/drm/ttm/ttm_bo.h | 6 ++ include/drm/ttm/ttm_tt.h | 2 ++ 3 files changed, 9 insertions(+) diff

drm/ttm/memcg/lru: enable memcg tracking for ttm and amdgpu driver (complete series v3)

2025-07-21 Thread Dave Airlie
Hi all, This is a 2nd repost with some fixes and cleanups. Original post is below. https://lore.kernel.org/dri-devel/20250714052243.1149732-1-airl...@gmail.com/ is the 2nd post. https://lore.kernel.org/dri-devel/20250630045005.1337339-1-airl...@gmail.com/ is the 1st post. Differences since las

[PATCH 09/15] ttm/pool: initialise the shrinker earlier

2025-07-21 Thread Dave Airlie
From: Dave Airlie Later memcg enablement needs the shrinker initialised before the list lru, Just move it for now. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_pool.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 07/15] memcg: add support for GPU page counters. (v2)

2025-07-21 Thread Dave Airlie
From: Dave Airlie This introduces 2 new statistics and 3 new memcontrol APIs for dealing with GPU system memory allocations. The stats corresponds to the same stats in the global vmstat, for number of active GPU pages, and number of pages in pools that can be reclaimed. The first API charges a

[PATCH 08/15] ttm: add a memcg accounting flag to the alloc/populate APIs

2025-07-21 Thread Dave Airlie
From: Dave Airlie This flag does nothing yet, but this just changes the APIs to accept it in the future across all users. This flag will eventually be filled out with when to account a tt populate to a memcg. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH 06/15] ttm/pool: track allocated_pages per numa node.

2025-07-21 Thread Dave Airlie
From: Dave Airlie This gets the memory sizes from the nodes and stores the limit as 50% of those. I think eventually we should drop the limits once we have memcg aware shrinking, but this should be more NUMA friendly, and I think seems like what people would prefer to happen on NUMA aware

[PATCH 05/15] ttm/pool: make pool shrinker NUMA aware

2025-07-21 Thread Dave Airlie
From: Dave Airlie This enable NUMA awareness for the shrinker on the ttm pools. Cc: Christian Koenig Cc: Dave Chinner Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_pool.c | 38 +++--- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a

[PATCH 04/15] ttm/pool: drop numa specific pools

2025-07-21 Thread Dave Airlie
From: Dave Airlie The list_lru will now handle numa for us, so need to keep separate pool types for it. Just consoldiate into the global ones. This adds a debugfs change to avoid dumping non-existant orders due to this change. Cc: Christian Koenig Cc: Johannes Weiner Signed-off-by: Dave

[PATCH 03/15] ttm/pool: port to list_lru. (v2)

2025-07-21 Thread Dave Airlie
From: Dave Airlie This is an initial port of the TTM pools for write combined and uncached pages to use the list_lru. This makes the pool's more NUMA aware and avoids needing separate NUMA pools (later commit enables this). Cc: Christian Koenig Cc: Johannes Weiner Cc: Dave Chinner S

[PATCH 02/15] drm/ttm: use gpu mm stats to track gpu memory allocations. (v4)

2025-07-21 Thread Dave Airlie
From: Dave Airlie This uses the newly introduced per-node gpu tracking stats, to track GPU memory allocated via TTM and reclaimable memory in the TTM page pools. These stats will be useful later for system information and later when mem cgroups are integrated. Cc: Christian Koenig Cc: Matthew

[PATCH 01/15] mm: add gpu active/reclaim per-node stat counters (v2)

2025-07-21 Thread Dave Airlie
From: Dave Airlie While discussing memcg intergration with gpu memory allocations, it was pointed out that there was no numa/system counters for GPU memory allocations. With more integrated memory GPU server systems turning up, and more requirements for memory tracking it seems we should start

[git pull] drm fixes for 6.16-rc7

2025-07-18 Thread Dave Airlie
MT8195/88 Arnd Bergmann (1): drm/nouveau: check ioctl command codes better Balasubramani Vivekanandan (1): drm/xe/mocs: Initialize MOCS index early Clayton King (1): drm/amd/display: Free memory allocation Dave

[PATCH 18/18] ttm: add support for a module option to disable memcg pool

2025-07-13 Thread Dave Airlie
From: Dave Airlie There is an existing workload that cgroup support might regress, the systems are setup to allocate 1GB of uncached pages at system startup to prime the pool, then any further users will take them from the pool. The current cgroup code might handle that, but it also may regress

[PATCH 17/18] amdgpu: add support for memory cgroups

2025-07-13 Thread Dave Airlie
From: Dave Airlie This adds support for adding a obj cgroup to a buffer object, and passing in the placement flags to make sure it's accounted properly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 16/18] memcontrol: export current_obj_cgroup

2025-07-13 Thread Dave Airlie
From: Dave Airlie This is needed to use get_obj_cgroup_from_current from a module. Signed-off-by: Dave Airlie --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4c8ded9501c6..4c041c5b3a15 100644 --- a/mm/memcontrol.c +++ b/mm

[PATCH 15/18] memcontrol: allow objcg api when memcg is config off.

2025-07-13 Thread Dave Airlie
From: Dave Airlie amdgpu wants to use the objcg api and not have to enable ifdef around it, so just add a dummy function for the config off path. Signed-off-by: Dave Airlie --- include/linux/memcontrol.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/memcontrol.h b

[PATCH 14/18] ttm: hook up memcg placement flags.

2025-07-13 Thread Dave Airlie
From: Dave Airlie This adds a placement flag that requests that any bo with this placement flag set gets accounted for memcg if it's a system memory allocation. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/ttm/ttm_bo_util.c | 6 +++--- driver

[PATCH 13/18] ttm/pool: enable memcg tracking and shrinker. (v2)

2025-07-13 Thread Dave Airlie
From: Dave Airlie This enables all the backend code to use the list lru in memcg mode, and set the shrinker to be memcg aware. It adds the loop case for when pooled pages end up being reparented to a higher memcg group, that newer memcg can search for them there and take them back. Signed-off

[PATCH 12/18] ttm: add objcg pointer to bo and tt

2025-07-13 Thread Dave Airlie
From: Dave Airlie This just adds the obj cgroup pointer to the bo and tt structs, and sets it between them. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c | 1 + include/drm/ttm/ttm_bo.h | 6 ++ include/drm/ttm/ttm_tt.h | 2 ++ 3 files changed, 9 insertions(+) diff

[PATCH 11/18] ttm/pool: initialise the shrinker earlier

2025-07-13 Thread Dave Airlie
From: Dave Airlie Later memcg enablement needs the shrinker initialised before the list lru, Just move it for now. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_pool.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 09/18] memcg: export memcg_list_lru_alloc.

2025-07-13 Thread Dave Airlie
From: Dave Airlie This is need to use list lru with memcg from a module. drm/ttm wants to use this interface. Signed-off-by: Dave Airlie --- mm/list_lru.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/list_lru.c b/mm/list_lru.c index 315362e3df3d..2892c1d945dd 100644 --- a/mm

[PATCH 10/18] ttm: add a memcg accounting flag to the alloc/populate APIs

2025-07-13 Thread Dave Airlie
From: Dave Airlie This flag does nothing yet, but this just changes the APIs to accept it in the future across all users. This flag will eventually be filled out with when to account a tt populate to a memcg. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH 08/18] memcg: add support for GPU page counters. (v2)

2025-07-13 Thread Dave Airlie
From: Dave Airlie This introduces 2 new statistics and 3 new memcontrol APIs for dealing with GPU system memory allocations. The stats corresponds to the same stats in the global vmstat, for number of active GPU pages, and number of pages in pools that can be reclaimed. The first API charges a

[PATCH 07/18] ttm/pool: track allocated_pages per numa node.

2025-07-13 Thread Dave Airlie
From: Dave Airlie This gets the memory sizes from the nodes and stores the limit as 50% of those. I think eventually we should drop the limits once we have memcg aware shrinking, but this should be more NUMA friendly, and I think seems like what people would prefer to happen on NUMA aware

[PATCH 06/18] ttm/pool: make pool shrinker NUMA aware

2025-07-13 Thread Dave Airlie
From: Dave Airlie This enable NUMA awareness for the shrinker on the ttm pools. Cc: Christian Koenig Cc: Dave Chinner Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_pool.c | 38 +++--- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a

[PATCH 05/18] ttm/pool: drop numa specific pools

2025-07-13 Thread Dave Airlie
From: Dave Airlie The list_lru will now handle numa for us, so need to keep separate pool types for it. Just consoldiate into the global ones. This adds a debugfs change to avoid dumping non-existant orders due to this change. Cc: Christian Koenig Cc: Johannes Weiner Signed-off-by: Dave

[PATCH 04/18] ttm/pool: port to list_lru. (v2)

2025-07-13 Thread Dave Airlie
From: Dave Airlie This is an initial port of the TTM pools for write combined and uncached pages to use the list_lru. This makes the pool's more NUMA aware and avoids needing separate NUMA pools (later commit enables this). Cc: Christian Koenig Cc: Johannes Weiner Cc: Dave Chinner S

[PATCH 03/18] mm/list_lru: export list_lru_add.

2025-07-13 Thread Dave Airlie
From: Dave Airlie DRM/TTM wants to use this for it's page pool LRU tracking. This effective is a revert of 78c0ed09131b772f062b986a2fcca6600daa6285 Author: Kairui Song Date: Tue Nov 5 01:52:53 2024 +0800 mm/list_lru: don't export list_lru_add Cc: Kairui Song Cc: Johannes

[PATCH 02/18] drm/ttm: use gpu mm stats to track gpu memory allocations. (v3)

2025-07-13 Thread Dave Airlie
From: Dave Airlie This uses the newly introduced per-node gpu tracking stats, to track GPU memory allocated via TTM and reclaimable memory in the TTM page pools. These stats will be useful later for system information and later when mem cgroups are integrated. Cc: Christian Koenig Cc: Matthew

[PATCH 01/18] mm: add gpu active/reclaim per-node stat counters (v2)

2025-07-13 Thread Dave Airlie
From: Dave Airlie While discussing memcg intergration with gpu memory allocations, it was pointed out that there was no numa/system counters for GPU memory allocations. With more integrated memory GPU server systems turning up, and more requirements for memory tracking it seems we should start

drm/ttm/memcg/lru: enable memcg tracking for ttm and amdgpu driver (complete series v2)

2025-07-13 Thread Dave Airlie
Hi all, This is a repost with some fixes and cleanups. Differences since last posting: 1. Added patch 18: add a module option to allow pooled pages to not be stored in the lru per-memcg (Requested by Christian Konig) 2. Converged the naming and stats between vmstat and memcg (Suggested by Sh

[git pull] drm fixes for 6.16-rc5

2025-07-03 Thread Dave Airlie
for gfx7/8 Christian König (2): dma-buf: fix timeout handling in dma_resv_wait_timeout v2 drm/ttm: fix error handling in ttm_buffer_object_transfer Dan Carpenter (1): drm/i915/selftests: Change mock_request() to return error pointers Daniele Ceraolo Spurio (1): drm/xe: Exte

possible amdgpu_task_info reference leak

2025-07-03 Thread Dave Airlie
In this commit : a72002cb181f350734108228b24c5d10d358f95a Author: André Almeida Date: Tue Jun 17 09:49:49 2025 -0300 drm/amdgpu: Make use of drm_wedge_task_info @@ -164,13 +165,15 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job) i

[PATCH] nouveau/gsp: add a 50ms delay between fbsr and driver unload rpcs

2025-07-02 Thread Dave Airlie
From: Dave Airlie This fixes a bunch of command hangs after runtime suspend/resume. This fixes a regression caused by code movement in the commit below, the commit seems to just change timings enough to cause this to happen now, and adding the sleep seems to avoid it. I've spent some

[PATCH 17/17] amdgpu: add support for memory cgroups

2025-06-29 Thread Dave Airlie
From: Dave Airlie This adds support for adding a obj cgroup to a buffer object, and passing in the placement flags to make sure it's accounted properly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 16/17] memcontrol: export current_obj_cgroup

2025-06-29 Thread Dave Airlie
From: Dave Airlie This is needed to use get_obj_cgroup_from_current from a module. Signed-off-by: Dave Airlie --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 87d75963a9ed..1e52e43cc239 100644 --- a/mm/memcontrol.c +++ b/mm

[PATCH 15/17] memcontrol: allow objcg api when memcg is config off.

2025-06-29 Thread Dave Airlie
From: Dave Airlie amdgpu wants to use the objcg api and not have to enable ifdef around it, so just add a dummy function for the config off path. Signed-off-by: Dave Airlie --- include/linux/memcontrol.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/memcontrol.h b

  1   2   3   4   5   6   7   8   9   10   >