summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-10-09 15:18:43 +0200
committerAlex Deucher <alexander.deucher@amd.com>2017-10-19 21:27:04 +0200
commite55f2b646df3318e24f12b8388ab6e5cccb3e92d (patch)
treede65b871c6ad10ddfc97a9b74b953d46b72e27f1 /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
parentdrm/amdgpu: keep copy of VRAM lost counter in job (diff)
downloadlinux-e55f2b646df3318e24f12b8388ab6e5cccb3e92d.tar.xz
linux-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.c1
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;