diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 1bf4cdc597aa..c539fb6a597e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |||
@@ -75,6 +75,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, | |||
75 | } | 75 | } |
76 | 76 | ||
77 | ctx->reset_counter = atomic_read(&adev->gpu_reset_counter); | 77 | ctx->reset_counter = atomic_read(&adev->gpu_reset_counter); |
78 | ctx->reset_counter_query = ctx->reset_counter; | ||
78 | ctx->vram_lost_counter = atomic_read(&adev->vram_lost_counter); | 79 | ctx->vram_lost_counter = atomic_read(&adev->vram_lost_counter); |
79 | ctx->init_priority = priority; | 80 | ctx->init_priority = priority; |
80 | ctx->override_priority = AMD_SCHED_PRIORITY_UNSET; | 81 | ctx->override_priority = AMD_SCHED_PRIORITY_UNSET; |
@@ -216,11 +217,11 @@ static int amdgpu_ctx_query(struct amdgpu_device *adev, | |||
216 | /* determine if a GPU reset has occured since the last call */ | 217 | /* determine if a GPU reset has occured since the last call */ |
217 | reset_counter = atomic_read(&adev->gpu_reset_counter); | 218 | reset_counter = atomic_read(&adev->gpu_reset_counter); |
218 | /* TODO: this should ideally return NO, GUILTY, or INNOCENT. */ | 219 | /* TODO: this should ideally return NO, GUILTY, or INNOCENT. */ |
219 | if (ctx->reset_counter == reset_counter) | 220 | if (ctx->reset_counter_query == reset_counter) |
220 | out->state.reset_status = AMDGPU_CTX_NO_RESET; | 221 | out->state.reset_status = AMDGPU_CTX_NO_RESET; |
221 | else | 222 | else |
222 | out->state.reset_status = AMDGPU_CTX_UNKNOWN_RESET; | 223 | out->state.reset_status = AMDGPU_CTX_UNKNOWN_RESET; |
223 | ctx->reset_counter = reset_counter; | 224 | ctx->reset_counter_query = reset_counter; |
224 | 225 | ||
225 | mutex_unlock(&mgr->lock); | 226 | mutex_unlock(&mgr->lock); |
226 | return 0; | 227 | return 0; |