From: xinhui pan Date: Mon, 9 Mar 2020 14:28:01 +0000 (+0800) Subject: drm/amdgpu: Correct the condition of warning while bo release X-Git-Tag: v5.7-rc1~136^2~13^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fe58d0bbdb013d9712ae4455faeac72216bba0e;p=thirdparty%2Fkernel%2Flinux.git 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. Tested-by: Nicholas Johnson Reviewed-by: Christian König Signed-off-by: xinhui pan Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index e4a8c424d290f..5ba4f0309910d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -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);