drm/amdgpu: fix preamble handling
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix preamble handling
At this point the command submission can still be interrupted.
Signed-off-by Christian König <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +9 -7
@@ -1015,13 +1015,9 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,if (r)return r; -if (chunk_ib->flags &AMDGPU_IB_FLAG_PREAMBLE ) { - parser->job->preamble_status |=AMDGPU_PREAMBLE_IB_PRESENT ; -if (!parser->ctx->preamble_presented) { - parser->job->preamble_status |=AMDGPU_PREAMBLE_IB_PRESENT_FIRST ; - parser->ctx->preamble_presented = true; - } - } +if (chunk_ib->flags &AMDGPU_IB_FLAG_PREAMBLE ) + parser->job->preamble_status |= +AMDGPU_PREAMBLE_IB_PRESENT ;if (parser->entity && parser->entity != entity)return -EINVAL ;
@@ -1244,6 +1240,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *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; job->uf_sequence = seq;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180821131037.8565-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Acked-byQuoted 4 lines · Christian König
At this point the command submission can still be interrupted.
Signed-off-by Christian König <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 41 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +9
-8@@ -1015,13 +1015,9 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,if (r)return r; -if (chunk_ib->flags &AMDGPU_IB_FLAG_PREAMBLE ) { - parser->job->preamble_status |=AMDGPU_PREAMBLE_IB_PRESENT ; -if (!parser->ctx->preamble_presented) { - parser->job->preamble_status |=AMDGPU_PREAMBLE_IB_PRESENT_FIRST ; - parser->ctx->preamble_presented = true; - } - } +if (chunk_ib->flags &AMDGPU_IB_FLAG_PREAMBLE ) + parser->job->preamble_status |= +AMDGPU_PREAMBLE_IB_PRESENT ;if (parser->entity && parser->entity != entity)return -EINVAL ;@@ -1244,6 +1240,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *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; job->uf_sequence = seq; --2.14.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx