aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
diff options
context:
space:
mode:
authorGravatar Christian König <christian.koenig@amd.com> 2023-04-19 15:17:57 +0200
committerGravatar Alex Deucher <alexander.deucher@amd.com> 2023-06-15 11:37:55 -0400
commitf88e295e9094deee93066f32a4380307e8cb3dd9 (patch)
tree0bf57795436d6a26eacedf3b91f7245b8f53a95f /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
parentdrm/amdgpu: reset VM when an error is detected (diff)
downloadlinux-f88e295e9094deee93066f32a4380307e8cb3dd9.tar.gz
linux-f88e295e9094deee93066f32a4380307e8cb3dd9.tar.bz2
linux-f88e295e9094deee93066f32a4380307e8cb3dd9.zip
drm/amdgpu: add VM generation token
Instead of using the VRAM lost counter add a 64bit token which indicates if a context or job is still valid to use. Should the VRAM be lost or the page tables need re-creation the token will change indicating that userspace needs to act and re-create the contexts and re-submit the work. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Luben Tuikov <luben.tuikov@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
index f1e27b6e16f4..85376baaa92f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
@@ -47,7 +47,7 @@ struct amdgpu_ctx {
struct amdgpu_ctx_mgr *mgr;
unsigned reset_counter;
unsigned reset_counter_query;
- uint32_t vram_lost_counter;
+ uint64_t generation;
spinlock_t ring_lock;
struct amdgpu_ctx_entity *entities[AMDGPU_HW_IP_NUM][AMDGPU_MAX_ENTITY_NUM];
bool preamble_presented;