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

Christian König deathsimple at vodafone.de
Tue May 2 07:55:38 UTC 2017


Am 01.05.2017 um 22:22 schrieb Alex Deucher:
> Rather than using a hardcoded value.
>
> Signed-off-by: Alex Deucher <alexander.deucher at 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 at 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,




More information about the amd-gfx mailing list