All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: simplify gds_compute_max_wave_id computation
@ 2019-09-25 20:35 Marek Olšák
       [not found] ` <20190925203502.30996-1-maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Olšák @ 2019-09-25 20:35 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Marek Olšák <marek.olsak@amd.com>

Signed-off-by: Marek Olšák <marek.olsak@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

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

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

* Re: [PATCH] drm/amdgpu: simplify gds_compute_max_wave_id computation
       [not found] ` <20190925203502.30996-1-maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2019-10-07 18:05   ` Marek Olšák
       [not found]     ` <CAAxE2A7rOodqyZVWCQYcbx6Xsc=XQ_EsVCF+G_tFOWcB7omMmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Olšák @ 2019-10-07 18:05 UTC (permalink / raw)
  To: amd-gfx mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1873 bytes --]

ping

On Wed, Sep 25, 2019 at 4:35 PM Marek Olšák <maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> From: Marek Olšák <marek.olsak-5C7GfCeVMHo@public.gmane.org>
>
> Signed-off-by: Marek Olšák <marek.olsak-5C7GfCeVMHo@public.gmane.org>
> ---
>  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
>
>

[-- Attachment #1.2: Type: text/html, Size: 2630 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

* Re: [PATCH] drm/amdgpu: simplify gds_compute_max_wave_id computation
       [not found]     ` <CAAxE2A7rOodqyZVWCQYcbx6Xsc=XQ_EsVCF+G_tFOWcB7omMmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-10-07 18:46       ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2019-10-07 18:46 UTC (permalink / raw)
  To: Marek Olšák; +Cc: amd-gfx mailing list

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

On Mon, Oct 7, 2019 at 2:05 PM Marek Olšák <maraeo@gmail.com> wrote:
>
> ping
>
> On Wed, Sep 25, 2019 at 4:35 PM Marek Olšák <maraeo@gmail.com> wrote:
>>
>> From: Marek Olšák <marek.olsak@amd.com>
>>
>> Signed-off-by: Marek Olšák <marek.olsak@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
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2019-10-07 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 20:35 [PATCH] drm/amdgpu: simplify gds_compute_max_wave_id computation Marek Olšák
     [not found] ` <20190925203502.30996-1-maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-10-07 18:05   ` Marek Olšák
     [not found]     ` <CAAxE2A7rOodqyZVWCQYcbx6Xsc=XQ_EsVCF+G_tFOWcB7omMmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-07 18:46       ` Alex Deucher

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.