On 1/9/26 14:33, Tvrtko Ursulin wrote: > Struct amdgpu_ctx contains two copies of the pointer to the context > manager. Remove one. > > Signed-off-by: Tvrtko Ursulin <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 3 +-- > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 1 - > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c > index a5f85ea9fbb6..526810c76821 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c > @@ -232,7 +232,7 @@ 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); > + fpriv = container_of(ctx->mgr, struct amdgpu_fpriv, ctx_mgr);
Please add "/* TODO: stop using fpriv here, we only need the xcp_id */". With that done Reviewed-by: Christian König <[email protected]> > r = amdgpu_xcp_select_scheds(adev, hw_ip, hw_prio, fpriv, > &num_scheds, &scheds); > if (r) > @@ -354,7 +354,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; > } > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h > index aed758d0acaa..cf8d700a22fe 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h > @@ -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]; > }; >
