From 1763552ee8a7f39a1788d24e27b50d4dee383520 Mon Sep 17 00:00:00 2001 From: Chunming Zhou Date: Mon, 3 Aug 2015 11:43:19 +0800 Subject: drm/amdgpu: add kernel fence in ib_submit_kernel_helper every sbumission should be able to get a fence. Signed-off-by: Chunming Zhou Reviewed-by: Christian K?nig Reviewed-by: Jammy Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c index 161c83ad9349..23a17ec239c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c @@ -107,7 +107,8 @@ int amdgpu_sched_ib_submit_kernel_helper(struct amdgpu_device *adev, struct amdgpu_ib *ibs, unsigned num_ibs, int (*free_job)(struct amdgpu_cs_parser *), - void *owner) + void *owner, + struct fence **f) { int r = 0; if (amdgpu_enable_scheduler) { @@ -135,5 +136,8 @@ int amdgpu_sched_ib_submit_kernel_helper(struct amdgpu_device *adev, WARN(true, "emit timeout\n"); } else r = amdgpu_ib_schedule(adev, 1, ibs, owner); - return r; + if (r) + return r; + *f = &ibs[num_ibs - 1].fence->base; + return 0; } -- cgit v1.2.3