diff options
| author | Nicolai Hähnle <[email protected]> | 2016-10-04 07:43:30 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2016-10-12 19:44:14 +0000 |
| commit | ce199ad690bd0a6ac6bf9e4df2c87b59d76f84da (patch) | |
| tree | e9ba88b2c13b3fcb10c104d942bf88c9c88c9548 | |
| parent | drm/amdgpu/gfx8: fix CGCG_CGLS handling (diff) | |
| download | kernel-ce199ad690bd0a6ac6bf9e4df2c87b59d76f84da.tar.gz kernel-ce199ad690bd0a6ac6bf9e4df2c87b59d76f84da.zip | |
drm/amdgpu: initialize the context reset_counter in amdgpu_ctx_init
Ensure that we really only report a GPU reset if one has happened since the
creation of the context.
Signed-off-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
Signed-off-by: Alex Deucher <[email protected]>
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index e203e5561107..a5e2fcbef0f0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -43,6 +43,9 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, struct amdgpu_ctx *ctx) ctx->rings[i].sequence = 1; ctx->rings[i].fences = &ctx->fences[amdgpu_sched_jobs * i]; } + + ctx->reset_counter = atomic_read(&adev->gpu_reset_counter); + /* create context entity for each ring */ for (i = 0; i < adev->num_rings; i++) { struct amdgpu_ring *ring = adev->rings[i]; |
