diff options
author | Dave Airlie <airlied@redhat.com> | 2017-09-13 00:34:11 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-09-13 00:34:11 -0400 |
commit | 47e0cd6b1dbbbff7591fe7eecc20bac5ca674351 (patch) | |
tree | a6469511eb106cee6898ac521614ab4dea46a576 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | 7846b12fe0b5feab5446d892f41b5140c1419109 (diff) | |
parent | 3d138c14c4174a2c80874a96935c87eee7c82ecf (diff) |
Merge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-next
A few fixes for 4.14. Nothing too major.
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 269b835571eb..60d8bedb694d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -1079,6 +1079,9 @@ static int amdgpu_cs_process_syncobj_out_dep(struct amdgpu_cs_parser *p, | |||
1079 | GFP_KERNEL); | 1079 | GFP_KERNEL); |
1080 | p->num_post_dep_syncobjs = 0; | 1080 | p->num_post_dep_syncobjs = 0; |
1081 | 1081 | ||
1082 | if (!p->post_dep_syncobjs) | ||
1083 | return -ENOMEM; | ||
1084 | |||
1082 | for (i = 0; i < num_deps; ++i) { | 1085 | for (i = 0; i < num_deps; ++i) { |
1083 | p->post_dep_syncobjs[i] = drm_syncobj_find(p->filp, deps[i].handle); | 1086 | p->post_dep_syncobjs[i] = drm_syncobj_find(p->filp, deps[i].handle); |
1084 | if (!p->post_dep_syncobjs[i]) | 1087 | if (!p->post_dep_syncobjs[i]) |
@@ -1150,7 +1153,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, | |||
1150 | cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, p->fence); | 1153 | cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, p->fence); |
1151 | job->uf_sequence = cs->out.handle; | 1154 | job->uf_sequence = cs->out.handle; |
1152 | amdgpu_job_free_resources(job); | 1155 | amdgpu_job_free_resources(job); |
1153 | amdgpu_cs_parser_fini(p, 0, true); | ||
1154 | 1156 | ||
1155 | trace_amdgpu_cs_ioctl(job); | 1157 | trace_amdgpu_cs_ioctl(job); |
1156 | amd_sched_entity_push_job(&job->base); | 1158 | amd_sched_entity_push_job(&job->base); |
@@ -1208,10 +1210,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
1208 | goto out; | 1210 | goto out; |
1209 | 1211 | ||
1210 | r = amdgpu_cs_submit(&parser, cs); | 1212 | r = amdgpu_cs_submit(&parser, cs); |
1211 | if (r) | ||
1212 | goto out; | ||
1213 | 1213 | ||
1214 | return 0; | ||
1215 | out: | 1214 | out: |
1216 | amdgpu_cs_parser_fini(&parser, r, reserved_buffers); | 1215 | amdgpu_cs_parser_fini(&parser, r, reserved_buffers); |
1217 | return r; | 1216 | return r; |