diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2018-06-12 21:28:20 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-06-15 20:20:44 +0300 |
commit | c8c5e569c5b0c9ad523c35497af2ae5788a29581 (patch) | |
tree | f03ca4a92ca6b1ce0278315852f705e9d0606261 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | 923ff76eb035b0de3725edd7c13cda3b068ba197 (diff) | |
download | linux-c8c5e569c5b0c9ad523c35497af2ae5788a29581.tar.xz |
drm/amdgpu: Consolidate visible vs. real vram check v2.
Move all instnaces of this check into a function in amdgpu_gmc.h
Rename the original function to a more proper name.
v2:
Add more places to cleanup.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 987a9fa33d35..f5b0b180a6cc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -463,7 +463,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, if (unlikely(r != 0)) return r; - if (adev->gmc.visible_vram_size < adev->gmc.real_vram_size && + if (!amdgpu_gmc_vram_full_visible(&adev->gmc) && bo->tbo.mem.mem_type == TTM_PL_VRAM && bo->tbo.mem.start < adev->gmc.visible_vram_size >> PAGE_SHIFT) amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, |