Commit d98ff24e authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix preamble handling

At this point the command submission can still be interrupted.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8604ffcb
...@@ -1012,13 +1012,9 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev, ...@@ -1012,13 +1012,9 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
if (r) if (r)
return r; return r;
if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE) { if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE)
parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT; parser->job->preamble_status |=
if (!parser->ctx->preamble_presented) { AMDGPU_PREAMBLE_IB_PRESENT;
parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
parser->ctx->preamble_presented = true;
}
}
if (parser->ring && parser->ring != ring) if (parser->ring && parser->ring != ring)
return -EINVAL; return -EINVAL;
...@@ -1241,6 +1237,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, ...@@ -1241,6 +1237,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
amdgpu_cs_post_dependencies(p); amdgpu_cs_post_dependencies(p);
if ((job->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) &&
!p->ctx->preamble_presented) {
job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
p->ctx->preamble_presented = true;
}
cs->out.handle = seq; cs->out.handle = seq;
job->uf_sequence = seq; job->uf_sequence = seq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment