drm/amdgpu: Correct the condition of warning while bo release
Subsystems (2)
PATCH 1/1 drm/amdgpu: Correct the condition of warning while bo release
Only kernel bo has kfd eviction fence.
This warning is to give a notice that kfd only remove eviction fence on individual bos.
Signed-off-by xinhui pan <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -1
@@ -1308,7 +1308,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)amdgpu_amdkfd_unreserve_memory_limit (abo);/* We only remove the fence if the resv has individualized. */ -WARN_ON_ONCE (bo->base.resv != &bo->base._resv); +WARN_ON_ONCE (bo->type == ttm_bo_type_kernel + && bo->base.resv != &bo->base._resv);if (bo->base.resv == &bo->base._resv)amdgpu_amdkfd_remove_fence_on_pt_pd_bos (abo);
Signature · 1 line
2.17.1
Am 09.03.20 um 15:34 schrieb xinhui pan:
Quoted 5 lines
Only kernel bo has kfd eviction fence.
This warning is to give a notice that kfd only remove eviction fence on individual bos.Signed-off-by xinhui pan <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2
-1@@ -1308,7 +1308,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)amdgpu_amdkfd_unreserve_memory_limit (abo);/* We only remove the fence if the resv has individualized. */ -WARN_ON_ONCE (bo->base.resv != &bo->base._resv); +WARN_ON_ONCE (bo->type == ttm_bo_type_kernel + && bo->base.resv != &bo->base._resv);if (bo->base.resv == &bo->base._resv)amdgpu_amdkfd_remove_fence_on_pt_pd_bos (abo);
Nicholas Johnson
Tested-byQuoted 8 lines · Christian König
Am 09.03.20 um 15:34 schrieb xinhui pan:
Quoted 5 lines
Only kernel bo has kfd eviction fence.
This warning is to give a notice that kfd only remove eviction fence on individual bos.Signed-off-by xinhui pan <[email protected]>Reviewed-by Christian König <[email protected]>
If applicable (I reported but was not the first to report / you were already aware):
Tested-by Nicholas Johnson <[email protected]>
The warning went away when applied.
Cheers!
Quoted 18 lines
Quoted 17 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2
-1@@ -1308,7 +1308,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)amdgpu_amdkfd_unreserve_memory_limit (abo);/* We only remove the fence if the resv has individualized. */ -WARN_ON_ONCE (bo->base.resv != &bo->base._resv); +WARN_ON_ONCE (bo->type == ttm_bo_type_kernel + && bo->base.resv != &bo->base._resv);if (bo->base.resv == &bo->base._resv)amdgpu_amdkfd_remove_fence_on_pt_pd_bos (abo);