]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Remove duplicate struct member
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Mon, 12 Jan 2026 10:22:38 +0000 (10:22 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 23 Feb 2026 19:16:31 +0000 (14:16 -0500)
Struct amdgpu_ctx contains two copies of the pointer to the context
manager. Remove one.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.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
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h

index f2c038c91c708d4753c2c5c820a5c1b282e45d2b..92f6f74ddc80ae20eaf7f3efee15f19a221815bc 100644 (file)
@@ -231,7 +231,8 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip,
        } else {
                struct amdgpu_fpriv *fpriv;
 
-               fpriv = container_of(ctx->ctx_mgr, struct amdgpu_fpriv, ctx_mgr);
+               /* TODO: Stop using fpriv here, we only need the xcp_id. */
+               fpriv = container_of(ctx->mgr, struct amdgpu_fpriv, ctx_mgr);
                r = amdgpu_xcp_select_scheds(adev, hw_ip, hw_prio, fpriv,
                                                &num_scheds, &scheds);
                if (r)
@@ -348,7 +349,6 @@ static int amdgpu_ctx_init(struct amdgpu_ctx_mgr *mgr, int32_t priority,
        else
                ctx->stable_pstate = current_stable_pstate;
 
-       ctx->ctx_mgr = &(fpriv->ctx_mgr);
        return 0;
 }
 
index aed758d0acaadfd43910afe8b46957e3dd1ec4d1..cf8d700a22fe80799d1388bc6dc1a4dea6eb7fd6 100644 (file)
@@ -56,7 +56,6 @@ struct amdgpu_ctx {
        unsigned long                   ras_counter_ce;
        unsigned long                   ras_counter_ue;
        struct amdgpu_ctx_mgr           *mgr;
-       struct amdgpu_ctx_mgr           *ctx_mgr;
        struct amdgpu_ctx_entity        *entities[AMDGPU_HW_IP_NUM][AMDGPU_MAX_ENTITY_NUM];
 };