Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nicolai Hähnle and committed by
Alex Deucher
ce199ad6 6ae81452

+3
+3
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
··· 43 43 ctx->rings[i].sequence = 1; 44 44 ctx->rings[i].fences = &ctx->fences[amdgpu_sched_jobs * i]; 45 45 } 46 + 47 + ctx->reset_counter = atomic_read(&adev->gpu_reset_counter); 48 + 46 49 /* create context entity for each ring */ 47 50 for (i = 0; i < adev->num_rings; i++) { 48 51 struct amdgpu_ring *ring = adev->rings[i];