]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu: Remove live context error log and skip
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Mon, 1 Jun 2026 14:08:25 +0000 (15:08 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jun 2026 20:31:55 +0000 (16:31 -0400)
According to Christian the skip can only cause memory leaks if it would to
trigger, while it does nothing for the fact context manager will still get
zapped with live back references from dangling contexts.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

index 21104e91b44c5fe2e89cb04353f4fbb14264f394..eb5f75a12c990ea305f1d053122cd66a35dc69d5 100644 (file)
@@ -940,14 +940,8 @@ static void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
        struct amdgpu_ctx *ctx;
        uint32_t id;
 
-       idr_for_each_entry(&mgr->ctx_handles, ctx, id) {
-               if (kref_read(&ctx->refcount) != 1) {
-                       drm_err(adev_to_drm(mgr->adev), "ctx %p is still alive\n", ctx);
-                       continue;
-               }
-
+       idr_for_each_entry(&mgr->ctx_handles, ctx, id)
                amdgpu_ctx_put(ctx);
-       }
 }
 
 void amdgpu_ctx_mgr_fini(struct amdgpu_ctx_mgr *mgr)