[PATCH 2/5] drm/amdgpu:add hang_limit for sched
Monk Liu
Monk.Liu at amd.com
Fri Oct 20 03:33:02 UTC 2017
since gpu_scheduler source domain cannot access amdgpu variable
so need create the hang_limit membewr for sched, and it can
refer it for the upcoming GPU RESET patches
Change-Id: I977ae2717e55a8b87c59e58a288bffc3b458b653
Signed-off-by: Monk Liu <Monk.Liu at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 ++
drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 2167dac..f6a55cf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -453,6 +453,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
ring->name);
return r;
}
+
+ ring->sched.hang_limit = amdgpu_job_hang_limit;
}
return 0;
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
index 52c8e54..1dac7bc 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
@@ -142,6 +142,7 @@ struct amd_gpu_scheduler {
struct task_struct *thread;
struct list_head ring_mirror_list;
spinlock_t job_list_lock;
+ int hang_limit;
};
int amd_sched_init(struct amd_gpu_scheduler *sched,
--
2.7.4
More information about the amd-gfx
mailing list