drm/amdgpu: Reserve space for shared fence
Subsystems (3)
PATCH 1/1 drm/amdgpu: Reserve space for shared fence
Call reservation_object_reserve_shared to reserve space for shared fence. Otherwise it will trigger BUG_ON condition in reservation_object_add_shared_fence.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +4 -0
@@ -2152,12 +2152,16 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem* Add process eviction fence to bo so they can * evict each other. */ + ret =reservation_object_reserve_shared (gws_bo->tbo.resv,1 ); +if (ret) + goto reserve_shared_fail;amdgpu_bo_fence (gws_bo, &process_info->eviction_fence->base, true);amdgpu_bo_unreserve (gws_bo);mutex_unlock (&(*mem)->process_info->lock);return ret; +reserve_shared_fail: bo_validation_failure:amdgpu_bo_unreserve (gws_bo); bo_reservation_failure:
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1560270022-4934-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org
Christian König
Acked-byAm 11.06.19 um 18:20 schrieb Zeng, Oak:
Quoted 6 lines
Call
reservation_object_reserve_sharedto reserve space for shared fence. Otherwise it will triggerBUG_ONcondition inreservation_object_add_shared_fence.Change-Id Ib0fae16247e33ee68f95bffa723451c0cd619344Signed-off-by Oak Zeng <[email protected]>
Quoted 15 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +3
-0@@ -2152,12 +2152,16 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem* Add process eviction fence to bo so they can * evict each other. */ + ret =reservation_object_reserve_shared (gws_bo->tbo.resv,1 ); +if (ret) + goto reserve_shared_fail;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem · line 2167
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +1
-0amdgpu_bo_fence (gws_bo, &process_info->eviction_fence->base, true);amdgpu_bo_unreserve (gws_bo);mutex_unlock (&(*mem)->process_info->lock);return ret; +reserve_shared_fail: bo_validation_failure:amdgpu_bo_unreserve (gws_bo); bo_reservation_failure:
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Kuehling, Felix
Reviewed-by Felix KuehlingQuoted 6 lines · Oak
Call
reservation_object_reserve_sharedto reserve space for shared fence. Otherwise it will triggerBUG_ONcondition inreservation_object_add_shared_fence.Change-Id Ib0fae16247e33ee68f95bffa723451c0cd619344Signed-off-by Oak Zeng <[email protected]>
Quoted 15 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +3
-0@@ -2152,12 +2152,16 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem* Add process eviction fence to bo so they can * evict each other. */ + ret =reservation_object_reserve_shared (gws_bo->tbo.resv,1 ); +if (ret) + goto reserve_shared_fail;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem · line 2167
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +1
-0amdgpu_bo_fence (gws_bo, &process_info->eviction_fence->base, true);amdgpu_bo_unreserve (gws_bo);mutex_unlock (&(*mem)->process_info->lock);return ret; +reserve_shared_fail: bo_validation_failure:amdgpu_bo_unreserve (gws_bo); bo_reservation_failure:
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx