[PATCH] drm/amdgpu: simplify gds_compute_max_wave_id computation
Marek Olšák
maraeo at gmail.com
Mon Oct 7 18:05:18 UTC 2019
ping
On Wed, Sep 25, 2019 at 4:35 PM Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> Signed-off-by: Marek Olšák <marek.olsak at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index ca01643fa0c8..73cd254449b3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -5275,29 +5275,26 @@ static void gfx_v10_0_set_rlc_funcs(struct
> amdgpu_device *adev)
> case CHIP_NAVI12:
> adev->gfx.rlc.funcs = &gfx_v10_0_rlc_funcs;
> break;
> default:
> break;
> }
> }
>
> static void gfx_v10_0_set_gds_init(struct amdgpu_device *adev)
> {
> - /* init asic gds info */
> - switch (adev->asic_type) {
> - case CHIP_NAVI10:
> - default:
> - adev->gds.gds_size = 0x10000;
> - adev->gds.gds_compute_max_wave_id = 0x4ff;
> - break;
> - }
> + unsigned total_cu = adev->gfx.config.max_cu_per_sh *
> + adev->gfx.config.max_sh_per_se *
> + adev->gfx.config.max_shader_engines;
>
> + adev->gds.gds_size = 0x10000;
> + adev->gds.gds_compute_max_wave_id = total_cu * 32 - 1;
> adev->gds.gws_size = 64;
> adev->gds.oa_size = 16;
> }
>
> static void gfx_v10_0_set_user_wgp_inactive_bitmap_per_sh(struct
> amdgpu_device *adev,
> u32 bitmap)
> {
> u32 data;
>
> if (!bitmap)
> --
> 2.17.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20191007/6a946d4d/attachment-0001.html>
More information about the amd-gfx
mailing list