diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 502b94fb116a..09703c87d676 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -1012,13 +1012,9 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev, | |||
1012 | if (r) | 1012 | if (r) |
1013 | return r; | 1013 | return r; |
1014 | 1014 | ||
1015 | if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE) { | 1015 | if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE) |
1016 | parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT; | 1016 | parser->job->preamble_status |= |
1017 | if (!parser->ctx->preamble_presented) { | 1017 | AMDGPU_PREAMBLE_IB_PRESENT; |
1018 | parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST; | ||
1019 | parser->ctx->preamble_presented = true; | ||
1020 | } | ||
1021 | } | ||
1022 | 1018 | ||
1023 | if (parser->ring && parser->ring != ring) | 1019 | if (parser->ring && parser->ring != ring) |
1024 | return -EINVAL; | 1020 | return -EINVAL; |
@@ -1241,6 +1237,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, | |||
1241 | 1237 | ||
1242 | amdgpu_cs_post_dependencies(p); | 1238 | amdgpu_cs_post_dependencies(p); |
1243 | 1239 | ||
1240 | if ((job->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) && | ||
1241 | !p->ctx->preamble_presented) { | ||
1242 | job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST; | ||
1243 | p->ctx->preamble_presented = true; | ||
1244 | } | ||
1245 | |||
1244 | cs->out.handle = seq; | 1246 | cs->out.handle = seq; |
1245 | job->uf_sequence = seq; | 1247 | job->uf_sequence = seq; |
1246 | 1248 | ||