diff options
author | Christian König <christian.koenig@amd.com> | 2017-10-09 15:18:43 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-19 15:27:04 -0400 |
commit | e55f2b646df3318e24f12b8388ab6e5cccb3e92d (patch) | |
tree | de65b871c6ad10ddfc97a9b74b953d46b72e27f1 /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |
parent | 14e47f93c5cc4a1237dbacc137e174706093b69c (diff) | |
download | lwn-e55f2b646df3318e24f12b8388ab6e5cccb3e92d.tar.gz lwn-e55f2b646df3318e24f12b8388ab6e5cccb3e92d.zip |
drm/amdgpu: move the VRAM lost counter per context
Instead of per device track the VRAM lost per context and return ECANCELED
instead of ENODEV.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 4309820658c4..c184468e2b2b 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, } ctx->reset_counter = atomic_read(&adev->gpu_reset_counter); + ctx->vram_lost_counter = atomic_read(&adev->vram_lost_counter); ctx->init_priority = priority; ctx->override_priority = AMD_SCHED_PRIORITY_UNSET; |