summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-05-01 16:20:42 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-05-02 13:15:25 -0400
commit42ce22439fdbbdb4d95d2979056ed5b075dd8403 (patch)
treef11aa8a8c13f56318f0525cd542822a3ef47c4c3 /drivers/gpu/drm/amd
parent80112bffb0ed50257165f673aa73301a4458cd95 (diff)
downloadop-kernel-dev-42ce22439fdbbdb4d95d2979056ed5b075dd8403.zip
op-kernel-dev-42ce22439fdbbdb4d95d2979056ed5b075dd8403.tar.gz
drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation
Rather than using a hardcoded value. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 4073fd2..ad2e08a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -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,
OpenPOWER on IntegriCloud