All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation
@ 2017-05-01 20:22 Alex Deucher
       [not found] ` <1493670134-17268-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher @ 2017-05-01 20:22 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Rather than using a hardcoded value.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +--
 1 file changed, 1 insertion(+), 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 cdd9ad5..d4a2212 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");
@@ -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,
-- 
2.5.5

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation
       [not found] ` <1493670134-17268-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-05-02  7:55   ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2017-05-02  7:55 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Am 01.05.2017 um 22:22 schrieb Alex Deucher:
> Rather than using a hardcoded value.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +--
>   1 file changed, 1 insertion(+), 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 cdd9ad5..d4a2212 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

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

Anyway this patch is Reviewed-by: Christian König <christian.koenig@amd.com>

Regards,
Christian.

>   #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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-02  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-01 20:22 [PATCH] drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation Alex Deucher
     [not found] ` <1493670134-17268-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-05-02  7:55   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.