diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 6 |
3 files changed, 7 insertions, 17 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index b62bbe71662d..adc6a43e2333 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -1217,15 +1217,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, | |||
1217 | job->owner = p->filp; | 1217 | job->owner = p->filp; |
1218 | p->fence = dma_fence_get(&job->base.s_fence->finished); | 1218 | p->fence = dma_fence_get(&job->base.s_fence->finished); |
1219 | 1219 | ||
1220 | r = amdgpu_ctx_add_fence(p->ctx, entity, p->fence, &seq); | 1220 | amdgpu_ctx_add_fence(p->ctx, entity, p->fence, &seq); |
1221 | if (r) { | ||
1222 | dma_fence_put(p->fence); | ||
1223 | dma_fence_put(&job->base.s_fence->finished); | ||
1224 | amdgpu_job_free(job); | ||
1225 | amdgpu_mn_unlock(p->mn); | ||
1226 | return r; | ||
1227 | } | ||
1228 | |||
1229 | amdgpu_cs_post_dependencies(p); | 1221 | amdgpu_cs_post_dependencies(p); |
1230 | 1222 | ||
1231 | if ((job->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) && | 1223 | if ((job->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) && |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 987b7f256463..f9b54236102d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |||
@@ -434,9 +434,9 @@ int amdgpu_ctx_put(struct amdgpu_ctx *ctx) | |||
434 | return 0; | 434 | return 0; |
435 | } | 435 | } |
436 | 436 | ||
437 | int amdgpu_ctx_add_fence(struct amdgpu_ctx *ctx, | 437 | void amdgpu_ctx_add_fence(struct amdgpu_ctx *ctx, |
438 | struct drm_sched_entity *entity, | 438 | struct drm_sched_entity *entity, |
439 | struct dma_fence *fence, uint64_t* handle) | 439 | struct dma_fence *fence, uint64_t* handle) |
440 | { | 440 | { |
441 | struct amdgpu_ctx_entity *centity = to_amdgpu_ctx_entity(entity); | 441 | struct amdgpu_ctx_entity *centity = to_amdgpu_ctx_entity(entity); |
442 | uint64_t seq = centity->sequence; | 442 | uint64_t seq = centity->sequence; |
@@ -458,8 +458,6 @@ int amdgpu_ctx_add_fence(struct amdgpu_ctx *ctx, | |||
458 | dma_fence_put(other); | 458 | dma_fence_put(other); |
459 | if (handle) | 459 | if (handle) |
460 | *handle = seq; | 460 | *handle = seq; |
461 | |||
462 | return 0; | ||
463 | } | 461 | } |
464 | 462 | ||
465 | struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx, | 463 | struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx, |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h index d67c1d285a4f..b3b012c0a7da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | |||
@@ -65,9 +65,9 @@ int amdgpu_ctx_put(struct amdgpu_ctx *ctx); | |||
65 | 65 | ||
66 | int amdgpu_ctx_get_entity(struct amdgpu_ctx *ctx, u32 hw_ip, u32 instance, | 66 | int amdgpu_ctx_get_entity(struct amdgpu_ctx *ctx, u32 hw_ip, u32 instance, |
67 | u32 ring, struct drm_sched_entity **entity); | 67 | u32 ring, struct drm_sched_entity **entity); |
68 | int amdgpu_ctx_add_fence(struct amdgpu_ctx *ctx, | 68 | void amdgpu_ctx_add_fence(struct amdgpu_ctx *ctx, |
69 | struct drm_sched_entity *entity, | 69 | struct drm_sched_entity *entity, |
70 | struct dma_fence *fence, uint64_t *seq); | 70 | struct dma_fence *fence, uint64_t *seq); |
71 | struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx, | 71 | struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx, |
72 | struct drm_sched_entity *entity, | 72 | struct drm_sched_entity *entity, |
73 | uint64_t seq); | 73 | uint64_t seq); |