|
@@ -915,7 +915,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
|
goto out;
|
|
goto out;
|
|
} else
|
|
} else
|
|
parser->prepare_job = amdgpu_cs_parser_prepare_job;
|
|
parser->prepare_job = amdgpu_cs_parser_prepare_job;
|
|
-
|
|
|
|
|
|
+ parser->ring = ring;
|
|
parser->run_job = amdgpu_cs_parser_run_job;
|
|
parser->run_job = amdgpu_cs_parser_run_job;
|
|
parser->free_job = amdgpu_cs_parser_free_job;
|
|
parser->free_job = amdgpu_cs_parser_free_job;
|
|
amd_sched_push_job(ring->scheduler,
|
|
amd_sched_push_job(ring->scheduler,
|
|
@@ -965,24 +965,16 @@ int amdgpu_cs_wait_ioctl(struct drm_device *dev, void *data,
|
|
ctx = amdgpu_ctx_get(filp->driver_priv, wait->in.ctx_id);
|
|
ctx = amdgpu_ctx_get(filp->driver_priv, wait->in.ctx_id);
|
|
if (ctx == NULL)
|
|
if (ctx == NULL)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
- if (amdgpu_enable_scheduler) {
|
|
|
|
- r = amd_sched_wait_ts(&ctx->rings[ring->idx].c_entity,
|
|
|
|
- wait->in.handle, true, timeout);
|
|
|
|
- if (r)
|
|
|
|
- return r;
|
|
|
|
- r = 1;
|
|
|
|
- } else {
|
|
|
|
- fence = amdgpu_ctx_get_fence(ctx, ring, wait->in.handle);
|
|
|
|
- if (IS_ERR(fence))
|
|
|
|
- r = PTR_ERR(fence);
|
|
|
|
|
|
|
|
- else if (fence) {
|
|
|
|
- r = fence_wait_timeout(fence, true, timeout);
|
|
|
|
- fence_put(fence);
|
|
|
|
|
|
+ fence = amdgpu_ctx_get_fence(ctx, ring, wait->in.handle);
|
|
|
|
+ if (IS_ERR(fence))
|
|
|
|
+ r = PTR_ERR(fence);
|
|
|
|
+ else if (fence) {
|
|
|
|
+ r = fence_wait_timeout(fence, true, timeout);
|
|
|
|
+ fence_put(fence);
|
|
|
|
+ } else
|
|
|
|
+ r = 1;
|
|
|
|
|
|
- } else
|
|
|
|
- r = 1;
|
|
|
|
- }
|
|
|
|
amdgpu_ctx_put(ctx);
|
|
amdgpu_ctx_put(ctx);
|
|
if (r < 0)
|
|
if (r < 0)
|
|
return r;
|
|
return r;
|