drm/amdgpu: keep amdgpu_ctx_mgr in ctx structure
Keep amdgpu_ctx_mgr in ctx structure to track fpriv. v2: add missing fpriv declaration lost in rebase Signed-off-by: James Zhu <James.Zhu@amd.com> Acked-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d425c6f48b
commit
c30e326e48
|
@ -303,6 +303,7 @@ static int amdgpu_ctx_get_stable_pstate(struct amdgpu_ctx *ctx,
|
|||
static int amdgpu_ctx_init(struct amdgpu_ctx_mgr *mgr, int32_t priority,
|
||||
struct drm_file *filp, struct amdgpu_ctx *ctx)
|
||||
{
|
||||
struct amdgpu_fpriv *fpriv = filp->driver_priv;
|
||||
u32 current_stable_pstate;
|
||||
int r;
|
||||
|
||||
|
@ -331,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue