mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-14 04:26:13 +07:00
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. Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> Acked-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c5e4c6bbbd
commit
96cf624b16
@ -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
|
* Add process eviction fence to bo so they can
|
||||||
* evict each other.
|
* 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_fence(gws_bo, &process_info->eviction_fence->base, true);
|
||||||
amdgpu_bo_unreserve(gws_bo);
|
amdgpu_bo_unreserve(gws_bo);
|
||||||
mutex_unlock(&(*mem)->process_info->lock);
|
mutex_unlock(&(*mem)->process_info->lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
reserve_shared_fail:
|
||||||
bo_validation_failure:
|
bo_validation_failure:
|
||||||
amdgpu_bo_unreserve(gws_bo);
|
amdgpu_bo_unreserve(gws_bo);
|
||||||
bo_reservation_failure:
|
bo_reservation_failure:
|
||||||
|
Loading…
Reference in New Issue
Block a user