AMD General
[cid:c2c184ee-b198-41fb-a9b0-d9543831f532]<https://outlook.office.com/bookwithme/user/[email protected]?anonymous&ep=owaSlotsEmailSignature> Book time to meet with me<https://outlook.office.com/bookwithme/user/[email protected]?anonymous&ep=owaSlotsEmailSignature> ________________________________ From: amd-gfx <[email protected]> on behalf of [email protected] <[email protected]> Sent: Friday, November 13, 2026 10:50 AM To: [email protected] <[email protected]> Subject: amd-gfx Digest, Vol 126, Issue 418 Send amd-gfx mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.freedesktop.org/mailman/listinfo/amd-gfx or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of amd-gfx digest..." Today's Topics: 1. Re: [PATCH 2/3] drm/amdgpu: unwind bo_init on GMC sw_init failure (Mario Limonciello) 2. [PATCH 1/3] Revert "drm/amdgpu: re-enable SPM updates in the the IB path" (Alex Deucher) 3. [PATCH 2/3] Revert "drm/amdgpu: reemit RLC SPM register in ring reemit" (Alex Deucher) ---------------------------------------------------------------------- Message: 1 Date: Fri, 13 Nov 2026 09:47:13 -0600 From: Mario Limonciello <[email protected]> To: [email protected] Cc: [email protected] Subject: Re: [PATCH 2/3] drm/amdgpu: unwind bo_init on GMC sw_init failure Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8; format=flowed On 11/13/26 08:56, [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 1 potential > issue to consider: > - [Medium] drm/amdgpu: gmc_v*_sw_init() calls amdgpu_bo_fini() with > GART/PDB0 BOs pinned > -- > > commit 4e2abeed7577cfdf2a67e81d9af414ebfbc361c6 > Author: Mario Limonciello <[email protected]> > > drm/amdgpu: unwind bo_init on GMC sw_init failure > > This commit unwinds amdgpu_bo_init() and amdgpu_vm_manager_init() when > gmc_v*_sw_init() fails after initializing the memory manager across GMC v6 > through v12. > >> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c >> b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c >> index 49f593fe2a876..e59fee3955af0 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c >> @@ -861,7 +861,7 @@ static int gmc_v10_0_sw_init(struct amdgpu_ip_block >> *ip_block) >> >> r = gmc_v10_0_gart_init(adev); >> if (r) >> - return r; >> + goto err_bo_fini; >> >> /* >> * number of VMs >> @@ -880,9 +880,15 @@ static int gmc_v10_0_sw_init(struct amdgpu_ip_block >> *ip_block) >> >> r = amdgpu_gmc_ras_sw_init(adev); >> if (r) >> - return r; >> + goto err_vm_fini; >> >> return 0; >> + >> +err_vm_fini: >> + amdgpu_vm_manager_fini(adev); >> +err_bo_fini: >> + amdgpu_bo_fini(adev); >> + return r; >> } > > [Severity: Medium] > Does jumping to err_vm_fini tear down TTM while adev->gart.bo is still > pinned? > > gmc_v10_0_gart_init() allocates and pins adev->gart.bo in VRAM. If > amdgpu_gmc_ras_sw_init() fails, err_vm_fini calls amdgpu_bo_fini() without > first freeing the GART table as gmc_v10_0_sw_fini() does. Because pinned > BOs cannot be evicted during amdgpu_ttm_fini(), gpu_buddy_fini() and > drm_mm_takedown() hit warnings and leak the pinned BOs and their backing > allocations. > > The same missing GART cleanup affects the err_vm_fini paths in GMC v7, v8, > v9, v11, and v12. On GMC v9 and v12, gmc_v*_gart_init() also allocates > and pins adev->gmc.pdb0_bo when amdgpu_gmc_is_pdb0_enabled() is true, so > both err_vm_fini and a failure in amdgpu_gmc_pdb0_alloc() within > gmc_v*_gart_init() reach amdgpu_bo_fini() with pinned BOs still allocated. > This finding looks correct. I'll re-spin. ------------------------------ Message: 2 Date: Fri, 13 Nov 2026 10:49:52 -0500 From: Alex Deucher <[email protected]> To: <[email protected]> Cc: Alex Deucher <[email protected]> Subject: [PATCH 1/3] Revert "drm/amdgpu: re-enable SPM updates in the the IB path" Message-ID: <[email protected]> Content-Type: text/plain This reverts commit d44428868e5b9f97c6216eee1b4f82aec7a6e8d2. This causes flakiness in gfx11 CI tests. Revert. Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 6210edf1937aa..f98a7c6797b3c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -121,9 +121,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, struct amdgpu_job *job, struct dma_fence **f) { struct amdgpu_device *adev = ring->adev; - bool emit_spm_needed = adev->gfx.rlc.funcs->update_spm_vmid && - (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE || - ring->funcs->type == AMDGPU_RING_TYPE_GFX); struct amdgpu_ib *ib; struct dma_fence *tmp = NULL; struct amdgpu_fence *af; @@ -212,10 +209,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, struct amdgpu_job *job, if (need_pipe_sync) amdgpu_ring_emit_pipeline_sync(ring); - if (emit_spm_needed) - adev->gfx.rlc.funcs->update_spm_vmid(adev, ring->xcc_id, - adev->vm_manager.spm_vmid); - if (emit_gds_needed) amdgpu_ring_emit_gds_switch(ring, job->vmid, job->gds_base, job->gds_size, job->gws_base, -- 2.56.0 ------------------------------ Message: 3 Date: Fri, 13 Nov 2026 10:49:53 -0500 From: Alex Deucher <[email protected]> To: <[email protected]> Cc: Alex Deucher <[email protected]> Subject: [PATCH 2/3] Revert "drm/amdgpu: reemit RLC SPM register in ring reemit" Message-ID: <[email protected]> Content-Type: text/plain This reverts commit 8a4dfdc0d2adfc362ec310ff70526e79ff8377b6. This causes flakiness in gfx11 CI tests. Revert. Signed-off-by: Alex Deucher <[email protected]> Acked-by: Vitaly Prosyak <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 324d25c77897a..c3f56253d3b87 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -715,9 +715,6 @@ void amdgpu_fence_driver_force_completion(struct amdgpu_ring *ring, void amdgpu_ring_set_fence_errors_and_reemit(struct amdgpu_ring *ring, struct amdgpu_fence *guilty_fence) { - bool emit_spm_needed = ring->adev->gfx.rlc.funcs->update_spm_vmid && - (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE || - ring->funcs->type == AMDGPU_RING_TYPE_GFX); struct dma_fence *unprocessed; struct dma_fence __rcu **ptr; struct amdgpu_fence *fence; @@ -749,9 +746,6 @@ void amdgpu_ring_set_fence_errors_and_reemit(struct amdgpu_ring *ring, } ring->reemit = true; amdgpu_ring_alloc(ring, ring->ring_backup_entries_to_copy); - if (emit_spm_needed) - ring->adev->gfx.rlc.funcs->update_spm_vmid(ring->adev, ring->xcc_id, - ring->adev->vm_manager.spm_vmid); spin_lock_irqsave(&ring->fence_drv.lock, flags); do { last_seq++; -- 2.56.0 ------------------------------ Subject: Digest Footer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx ------------------------------ End of amd-gfx Digest, Vol 126, Issue 418 *****************************************
