]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 1 May 2017 20:20:42 +0000 (16:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 May 2017 17:15:25 +0000 (13:15 -0400)
Rather than using a hardcoded value.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index 4073fd24dd13cb725caf0106f88a139b3e90905a..ad2e08a943cd1c9dcdeb57215347a78b41db4883 100644 (file)
@@ -39,7 +39,6 @@
 
 #define GFX9_NUM_GFX_RINGS     1
 #define GFX9_NUM_COMPUTE_RINGS 8
-#define GFX9_NUM_SE            4
 #define RLCG_UCODE_LOADING_START_ADDRESS 0x2000
 
 MODULE_FIRMWARE("amdgpu/vega10_ce.bin");
@@ -842,7 +841,7 @@ static int gfx_v9_0_ngg_create_buf(struct amdgpu_device *adev,
        }
        size_se = size_se ? size_se : default_size_se;
 
-       ngg_buf->size = size_se * GFX9_NUM_SE;
+       ngg_buf->size = size_se * adev->gfx.config.max_shader_engines;
        r = amdgpu_bo_create_kernel(adev, ngg_buf->size,
                                    PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM,
                                    &ngg_buf->bo,