[PATCH v3] drm/amdgpu: Add AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES

Grodzovsky, Andrey Andrey.Grodzovsky at amd.com
Mon Feb 4 15:45:01 UTC 2019


Thanks, I will update, add your RB and push.

Andrey

On 2/3/19 10:51 AM, Koenig, Christian wrote:

@@ -1090,6 +1091,14 @@ static int amdgpu_cs_process_fence_dep(struct amdgpu_cs_parser *p,

                fence = amdgpu_ctx_get_fence(ctx, entity,
                                             deps[i].handle);
+
+               if (chunk->chunk_id == AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES) {
+                       struct drm_sched_fence *s_fence = to_drm_sched_fence(fence);
+
+                       dma_fence_put(fence);
+                       fence = dma_fence_get(&s_fence->scheduled);


You need to change the order here or otherwise the dma_fence_put could
destroy the fence we want.

Apart from that looks really good to me,
Christian.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190204/0209bb63/attachment.html>


More information about the amd-gfx mailing list