drm/amdkfd: remove unnecessary cpu domain validation
authorJames Zhu <James.Zhu@amd.com>
Mon, 3 Mar 2025 18:10:33 +0000 (13:10 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Mar 2025 15:46:55 +0000 (10:46 -0500)
before move to GTT domain.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

index 62ca12e945810f0b6d76efb0424850e979d7b5f8..2ac6d4fa0601983f1b1881bc12de4f93d4cdd101 100644 (file)
@@ -595,12 +595,6 @@ kfd_mem_dmamap_dmabuf(struct kfd_mem_attachment *attachment)
 {
        struct ttm_operation_ctx ctx = {.interruptible = true};
        struct amdgpu_bo *bo = attachment->bo_va->base.bo;
-       int ret;
-
-       amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU);
-       ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
-       if (ret)
-               return ret;
 
        amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_GTT);
        return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);