Skip to contentSkip to conversation

drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation

PATCH In review Alex Deucher 2 participants 2 messages May 1, 2017 – May 2, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation

Rather than using a hardcoded value.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -2
index cdd9ad5..d4a2212 100644
@@ -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");
@@ -814,7 +813,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,
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1493670134-17268-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 01.05.2017 um 22:22 schrieb Alex Deucher:

Quoted 12 lines

Rather than using a hardcoded value.

---
  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -0
index cdd9ad5..d4a2212 100644

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c line 42

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -1
@@ -39,7 +39,6 @@
 
  #define GFX9_NUM_GFX_RINGS     1
  #define GFX9_NUM_COMPUTE_RINGS 8
-#define GFX9_NUM_SE		4

The other defines look superfluous as well, should be get rid of them?

Anyway this patch is Reviewed-by: Christian König <[email protected]>

Regards,
Christian.

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_ngg_create_buf(struct amdgpu_device *adev, · line 819

Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
  #define RLCG_UCODE_LOADING_START_ADDRESS 0x2000
 
  MODULE_FIRMWARE("amdgpu/vega10_ce.bin");
@@ -814,7 +813,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,

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx