On Wed, 10 May 2023 at 22:24, Alex Deucher <alexander.deucher@xxxxxxx> wrote: > > From: James Zhu <James.Zhu@xxxxxxx> > > Keep amdgpu_ctx_mgr in ctx structure to track fpriv. > > Signed-off-by: James Zhu <James.Zhu@xxxxxxx> > Acked-by: Lijo Lazar <lijo.lazar@xxxxxxx> > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 + > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c > index e3d047663d61..06d68a08251a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c > @@ -332,6 +332,7 @@ 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 5fd79f94e2d0..85376baaa92f 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h > @@ -57,6 +57,7 @@ struct amdgpu_ctx { > unsigned long ras_counter_ce; > unsigned long ras_counter_ue; > uint32_t stable_pstate; > + struct amdgpu_ctx_mgr *ctx_mgr; > }; > > struct amdgpu_ctx_mgr { > -- > 2.40.1 > Hi This isn't compiling for me with clang 16 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c:348:19: error: use of undeclared identifier 'fpriv' ctx->ctx_mgr = &(fpriv->ctx_mgr); ^ 1 error generated. Cheers Mike