diff options
author | Christian König <christian.koenig@amd.com> | 2022-12-12 17:31:57 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-12-14 16:48:00 -0500 |
commit | 47722220660cfb935e27e62d385959ecc296cddb (patch) | |
tree | d94195317d0b06af19102d5bf448662508172e84 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | 3273f11675ef11959d25a56df3279f712bcd41b7 (diff) | |
download | linux-47722220660cfb935e27e62d385959ecc296cddb.tar.gz linux-47722220660cfb935e27e62d385959ecc296cddb.tar.bz2 linux-47722220660cfb935e27e62d385959ecc296cddb.zip |
drm/amdgpu: revert "generally allow over-commit during BO allocation"
This reverts commit f9d00a4a8dc8fff951c97b3213f90d6bc7a72175.
This causes problem for KFD because when we overcommit we accidentially
bind the BO to GTT for moving it into VRAM. We also need to make sure
that this is done only as fallback after trying to evict first.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 0f6385941480..4e684c2afc70 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -580,7 +580,11 @@ int amdgpu_bo_create(struct amdgpu_device *adev, bo->flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE; bo->tbo.bdev = &adev->mman.bdev; - amdgpu_bo_placement_from_domain(bo, bp->domain); + if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA | + AMDGPU_GEM_DOMAIN_GDS)) + amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU); + else + amdgpu_bo_placement_from_domain(bo, bp->domain); if (bp->type == ttm_bo_type_kernel) bo->tbo.priority = 1; |