drm/amd/display: allocate fbc buffer in AMDGPU_GEM_DOMAIN_GTT
authorShirish S <shirish.s@amd.com>
Tue, 20 Feb 2018 09:04:16 +0000 (14:34 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Mar 2018 20:34:17 +0000 (15:34 -0500)
Currently the FBC buffer is allocated in VRAM, since VRAM usage is
dedicatedly for scanouts, by allocating FBC back buffer in GTT
shall help in conserving VRAM for other purposes.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index fa7b2fa25e22dc44b012cf1e02ad3ed2c7a9b01b..92fe2111e77497afd3c836b16d46cd7a4afd932f 100644 (file)
@@ -374,7 +374,7 @@ static void amdgpu_dm_fbc_init(struct drm_connector *connector)
 
        if (max_size) {
                int r = amdgpu_bo_create_kernel(adev, max_size * 4, PAGE_SIZE,
-                           AMDGPU_GEM_DOMAIN_VRAM, &compressor->bo_ptr,
+                           AMDGPU_GEM_DOMAIN_GTT, &compressor->bo_ptr,
                            &compressor->gpu_addr, &compressor->cpu_addr);
 
                if (r)